, Arve Knudsen arve.knud...@gmail.com wrote:
Hi
What's the right way to clear a database all of content, but keep the
schema? I tried the method of deleting all tables athttp://
www.sqlalchemy.org/docs/05/metadata.html#reflecting-all-tables...,
but content still remains. I couldn't find
correct way to delete all data.
On Feb 15, 1:29 pm, Arve Knudsen arve.knud...@gmail.com wrote:
Thank you GHZ, it did work! Wondering about one thing though; the recipe
in
the documentation iterates over the tables in reverse sorted order, like
so:
for table in reversed(meta.sorted_tables
Hi
What's the right way to clear a database all of content, but keep the
schema? I tried the method of deleting all tables at
http://www.sqlalchemy.org/docs/05/metadata.html#reflecting-all-tables-at-once,
but content still remains. I couldn't find any documentation on Table.delete
either, for
in meta.tables.items():
print table.delete()
con.execute(table.delete())
trans.commit()
On Feb 14, 1:29 pm, Arve Knudsen arve.knud...@gmail.com wrote:
Hi
What's the right way to clear a database all of content, but keep the
schema? I tried the method of deleting all tables
athttp