Skip to content

Commit

Permalink
fix for sqlalchemy 0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
tardyp committed Dec 9, 2016
1 parent 277ebc8 commit 2d65847
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions master/buildbot/db/migrate/versions/047_cascading_deletes.py
Expand Up @@ -42,9 +42,10 @@ def upgrade(migrate_engine):
# migrate.xx.ForeignKeyConstraint is changing the model so initializing here
# would break the iteration (Set changed size during iteration)
fks_to_change.append((
(fk.columns, [c.column]), dict(name=fk.name, ondelete='CASCADE')))
table, (fk.columns, [c.column]), dict(name=fk.name, ondelete='CASCADE')))

for args, kwargs in fks_to_change:
for table, args, kwargs in fks_to_change:
fk = ForeignKeyConstraint(*args, **kwargs)
table.append_constraint(fk)
fk.drop()
fk.create()

0 comments on commit 2d65847

Please sign in to comment.