create_table in downgrade does not match table's content before migration

Bug #1250454 reported by Ann Taraday
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Undecided
Ann Taraday

Bug Description

create_table in downgrade in migration 2a6d0b51f4bb_cisco_plugin_cleanup does not match table's content created by migration folsom_initial, because of this there is a problem with downgrade.

File "/opt/stack/neutron/neutron/db/migration/alembic_migrations/versions/2a6d0b51f4bb_cisco_plugin_cleanup.py", line 87, in downgrade
    sa.PrimaryKeyConstraint(u'id')
  File "<string>", line 7, in create_table
  File "/opt/stack/neutron/.tox/py27/local/lib/python2.7/site-packages/alembic/operations.py", line 631, in create_table
    self._table(name, *columns, **kw)
  File "/opt/stack/neutron/.tox/py27/local/lib/python2.7/site-packages/alembic/operations.py", line 117, in _table
    t = sa_schema.Table(name, m, *columns, **kw)
  File "/opt/stack/neutron/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/schema.py", line 318, in __new__
    table._init(name, metadata, *args, **kw)
  File "/opt/stack/neutron/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/schema.py", line 385, in _init
    self._init_items(*args)
  File "/opt/stack/neutron/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/schema.py", line 64, in _init_items
    item._set_parent_with_dispatch(self)
  File "/opt/stack/neutron/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/events.py", line 234, in _set_parent_with_dispatch
    self._set_parent(parent)
  File "/opt/stack/neutron/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/schema.py", line 2131, in _set_parent
    "named '%s' is present." % (table.description, col))
ArgumentError: Can't create ForeignKeyConstraint on table 'portprofile_bindings': no column named 'ports' is present.

Tags: db
Changed in neutron:
assignee: nobody → Ann Kamyshnikova (akamyshnikova)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/56022

Changed in neutron:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/56022
Committed: http://github.com/openstack/neutron/commit/fe3fae10698ed465f45aec4a4022bc784307b4c3
Submitter: Jenkins
Branch: master

commit fe3fae10698ed465f45aec4a4022bc784307b4c3
Author: Ann Kamyshnikova <email address hidden>
Date: Tue Nov 12 16:54:40 2013 +0400

    Fix downgrade in migration

    Fixes a downgrade bug caused by a portprofile_bindings table
    definition mismatch between 2a6d0b51f4bb_cisco_plugin_cleanup
    and the initial definition.

    Change-Id: I051e5b41a4285b6cf24270ea6229b1bbca42106d
    Closes-Bug: #1250454

Changed in neutron:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in neutron:
milestone: none → icehouse-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: icehouse-1 → 2014.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.