mirror of
https://github.com/veekun/pokedex.git
synced 2024-08-20 18:16:34 +00:00
undo the table.create(bind=engine) change
This commit is contained in:
parent
99fa70de41
commit
bf1044a9ce
1 changed files with 1 additions and 2 deletions
|
@ -180,7 +180,7 @@ def load(session, tables=[], directory=None, drop_tables=False, verbose=False, s
|
||||||
|
|
||||||
print_start('Creating tables')
|
print_start('Creating tables')
|
||||||
for n, table in enumerate(table_objs):
|
for n, table in enumerate(table_objs):
|
||||||
table.create(bind=engine)
|
table.create()
|
||||||
print_status('%s/%s' % (n, len(table_objs)))
|
print_status('%s/%s' % (n, len(table_objs)))
|
||||||
print_done()
|
print_done()
|
||||||
|
|
||||||
|
@ -312,7 +312,6 @@ def load(session, tables=[], directory=None, drop_tables=False, verbose=False, s
|
||||||
# Remembering some zillion rows in the session consumes a lot of
|
# Remembering some zillion rows in the session consumes a lot of
|
||||||
# RAM. Let's not do that. Commit every 1000 rows
|
# RAM. Let's not do that. Commit every 1000 rows
|
||||||
if len(new_rows) >= 1000:
|
if len(new_rows) >= 1000:
|
||||||
print("flushing")
|
|
||||||
insert_and_commit()
|
insert_and_commit()
|
||||||
|
|
||||||
insert_and_commit()
|
insert_and_commit()
|
||||||
|
|
Loading…
Reference in a new issue