]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Skip external tables for neutron-db-manage --autogenerate
authorHenry Gessau <gessau@cisco.com>
Mon, 25 May 2015 22:00:58 +0000 (18:00 -0400)
committerHenry Gessau <gessau@cisco.com>
Mon, 25 May 2015 22:19:07 +0000 (18:19 -0400)
commit9fc7f56565925a53f2212706431af479752bb8d9
tree6fd880e7ae6f1fc89ae9e2dddeb61a203747ec09
parent6ba78cec1a77921a591f99b717ff093ca3688c31
Skip external tables for neutron-db-manage --autogenerate

DB tables that do not have models in the neutron tree cause
neutron-db-manage --autogenerate to create commands to drop the
tables. This fix hooks into alembic's environment with a include_object
callback that ignores external tables.

We already had a list of external tables for use by the migration tests,
so re-use them for --autogenerate.

Partial-bug: #1458682

Change-Id: I2c0bc73f72840c401c578e87d8178a79f05aad82
neutron/db/migration/alembic_migrations/env.py
neutron/db/migration/alembic_migrations/external.py [new file with mode: 0644]
neutron/tests/functional/db/test_migrations.py