Fix column_name in migration from project_id change

This commit fixes a bug that was introduced in
https://review.openstack.org/352216 where an
incorrect table name was referenced.  This change
substitutes in the correct table name.

This commit appears to be causing OSA DB migration failures.
See: https://bugs.launchpad.net/neutron/+bug/1613299

Change-Id: I9cfb98e418432209840a75647e1683f1b9204c4a
Closes-bug: #1613299
This commit is contained in:
Nate Johnston 2016-08-15 14:52:43 +00:00
parent 93a2e8911d
commit fd77859612
1 changed files with 1 additions and 1 deletions

View File

@ -55,7 +55,7 @@ def upgrade():
# tenant_id columns renamed to project_id. Account for both scenarios.
bind = op.get_bind()
insp = reflection.Inspector.from_engine(bind)
columns = insp.get_columns('firewall_router_associations')
columns = insp.get_columns('routers')
if 'tenant_id' in [c['name'] for c in columns]:
op.execute(SQL_STATEMENT % 'tenant_id')
else: