]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Alter execute_alembic_command() to not assume all commands
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 1 Dec 2014 03:18:32 +0000 (22:18 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 1 Dec 2014 03:23:02 +0000 (22:23 -0500)
commit6a9d1121472028f3583e577b62a7e576fff5806f
tree75c86a676328d87d57d035168cbe1b23f3fcbfd1
parent4bdee18097a1362dba212ba8e13a50ec2ceab8c5
Alter execute_alembic_command() to not assume all commands

Alembic 0.7.1 is adding new diff directives add_fk and remove_fk.
The logic in execute_alembic_command() appears to assume all potential
commands are present in METHODS.   This patch adjusts it so that
it checks METHODS first, allowing the tests in neutron.tests.unit.db.test_migration
to pass.  However, if the design here requires that all potential
Alembic commands are handled, then this would not be the fix,
though I recommend that the potential list of Alembic directives
not be hardcoded.

Change-Id: Ib08685be252e1fdb0f10853f8fc9a7e19ac54a94
Closes-Bug: #1397796
neutron/db/migration/alembic_migrations/heal_script.py