sqlalchemy: migration error when running db-sync
migration incorrectly sorted order of tables for Events causing Event and Trait tables to be generated before unique_name table which both tables require Change-Id: I6fe7ceb0905ace3993116c6a274b6c39e11554bf Fixes:Bug #1186283
This commit is contained in:
parent
e5d876d028
commit
99702d4766
@ -51,11 +51,11 @@ tables = [unique_name, event, trait]
|
||||
|
||||
def upgrade(migrate_engine):
|
||||
meta.bind = migrate_engine
|
||||
for i in sorted(tables):
|
||||
for i in tables:
|
||||
i.create()
|
||||
|
||||
|
||||
def downgrade(migrate_engine):
|
||||
meta.bind = migrate_engine
|
||||
for i in sorted(tables, reverse=True):
|
||||
for i in reversed(tables):
|
||||
i.drop()
|
||||
|
Loading…
x
Reference in New Issue
Block a user