mirror of
https://github.com/veekun/pokedex.git
synced 2024-08-20 18:16:34 +00:00
Ahem, ACTUALLY drop types when loading.
This commit is contained in:
parent
987116f662
commit
3511bf3076
1 changed files with 2 additions and 1 deletions
|
@ -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()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue