Fix compatibility with sqlalchemy 0.9.7

Change  I326c00b8252f2630e72bb0c22ca294f79feee2be introduced sqlalchmey
1.0+ only Table attribute foreign_key_constraints. It should be sufficient
to use foreign_keys as only name is needed.

Closes-Bug: #1487351
Change-Id: I38dd8ab620cbe372265eb0568d806cf1c37d5e14
This commit is contained in:
Lukas Bezdicka 2015-08-24 16:38:12 +02:00 committed by Lukas Bezdicka
parent 75bb83ec21
commit 9f91154090
1 changed files with 1 additions and 1 deletions

View File

@ -83,7 +83,7 @@ def create_share_instances_table(connection):
# Remove columns moved to 'share_instances' table
with op.batch_alter_table("shares") as batch_op:
for fk in shares_table.foreign_key_constraints:
for fk in shares_table.foreign_keys:
batch_op.drop_constraint(fk.name, type_='foreignkey')
batch_op.drop_column('host')