]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Fix wrong order of tables in downgrade
authorAnn Kamyshnikova <akamyshnikova@mirantis.com>
Tue, 29 Jul 2014 12:02:20 +0000 (16:02 +0400)
committerAnn Kamyshnikova <akamyshnikova@mirantis.com>
Tue, 29 Jul 2014 12:03:56 +0000 (16:03 +0400)
Heal migration fix bug https://bugs.launchpad.net/neutron/+bug/1336177.
Now table ml2_brocadenetworks has foreign key and downgrade
of 492a106273f8_brocade_ml2_mech_dri fails. To fix this change order
of tables in downgrade is needed.

Closes-bug: #1349810

Change-Id: Ida2ba66d35a952381f213080d417e475e18c196d

neutron/db/migration/alembic_migrations/versions/492a106273f8_brocade_ml2_mech_dri.py

index f8bf7995b3b41a7ed9e715e52fd30b4216fb25a5..65cde2e80dc36facc499923e1910e197ddecb8f9 100644 (file)
@@ -66,5 +66,5 @@ def downgrade(active_plugins=None, options=None):
     if not migration.should_run(active_plugins, migration_for_plugins):
         return
 
-    op.drop_table('ml2_brocadenetworks')
     op.drop_table('ml2_brocadeports')
+    op.drop_table('ml2_brocadenetworks')