]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Heal script: Drop fks before operating on columns
authorSalvatore Orlando <salv.orlando@gmail.com>
Thu, 7 Aug 2014 22:24:06 +0000 (15:24 -0700)
committerSalvatore Orlando <salv.orlando@gmail.com>
Tue, 26 Aug 2014 16:42:14 +0000 (09:42 -0700)
commitebb63260811f2466589b989dd551295f0ec52c52
tree0dea1510db6cd7a288a02539b1fd2bf63111a546
parent0bdd7c321a77b8ca5907cd25741504aebd6af832
Heal script: Drop fks before operating on columns

This patch fixes a small glitch in the healing script.
If the script detects that a foreign key must be removed,
and the columns that it references must be removed as well,
then the foreign key removal would fail as the column would
not exist anymore.

This patch simply ensures foreign key are dropped before all
the remaining table/column operations. New foreign keys are
instead added after all table/column operations are completed.

Change-Id: I3cce742146c70b71900cf53e50f9a6a61bc6a378
Closes-Bug: # 1354188
neutron/db/migration/alembic_migrations/heal_script.py