Permalink
Browse files

Ahem, ACTUALLY drop types when loading.

  • Loading branch information...
1 parent 987116f commit 3511bf307641f9f57e95c2befc18694702edf6cd @eevee eevee committed Apr 1, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 pokedex/db/load.py
View
@@ -153,6 +153,8 @@ def load(session, tables=[], directory=None, drop_tables=False, verbose=False, s
bind = session.get_bind()
print_start('Dropping tables')
for n, table in enumerate(reversed(table_objs)):
+ table.drop(checkfirst=True)
+
# Drop columns' types if appropriate; needed for enums in
# postgresql
for column in table.c:
@@ -163,7 +165,6 @@ def load(session, tables=[], directory=None, drop_tables=False, verbose=False, s
else:
drop(bind=bind, checkfirst=True)
- table.drop(checkfirst=True)
print_status('%s/%s' % (n, len(table_objs)))
print_done()

0 comments on commit 3511bf3

Please sign in to comment.