From 3511bf307641f9f57e95c2befc18694702edf6cd Mon Sep 17 00:00:00 2001 From: Eevee Date: Sat, 31 Mar 2012 21:30:05 -0700 Subject: [PATCH] Ahem, ACTUALLY drop types when loading. --- pokedex/db/load.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pokedex/db/load.py b/pokedex/db/load.py index 74bf2fd..d241519 100644 --- a/pokedex/db/load.py +++ b/pokedex/db/load.py @@ -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()