Ahem, ACTUALLY drop types when loading.

This commit is contained in:
Eevee 2012-03-31 21:30:05 -07:00
parent 987116f662
commit 3511bf3076

View file

@ -153,6 +153,8 @@ def load(session, tables=[], directory=None, drop_tables=False, verbose=False, s
bind = session.get_bind() bind = session.get_bind()
print_start('Dropping tables') print_start('Dropping tables')
for n, table in enumerate(reversed(table_objs)): for n, table in enumerate(reversed(table_objs)):
table.drop(checkfirst=True)
# Drop columns' types if appropriate; needed for enums in # Drop columns' types if appropriate; needed for enums in
# postgresql # postgresql
for column in table.c: for column in table.c:
@ -163,7 +165,6 @@ def load(session, tables=[], directory=None, drop_tables=False, verbose=False, s
else: else:
drop(bind=bind, checkfirst=True) drop(bind=bind, checkfirst=True)
table.drop(checkfirst=True)
print_status('%s/%s' % (n, len(table_objs))) print_status('%s/%s' % (n, len(table_objs)))
print_done() print_done()