05-alembic-migrations.patch revision 6033
0N/A--- neutron-2015.1.2/neutron/db/migration/alembic_migrations/agent_init_ops.py.orig 2016-04-22 23:23:15.523526779 -0700
0N/A+++ neutron-2015.1.2/neutron/db/migration/alembic_migrations/agent_init_ops.py 2016-04-22 23:25:39.337181119 -0700
0N/A+ bind = op.get_bind()
0N/A+ insp = sa.engine.reflection.Inspector.from_engine(bind)
0N/A+ if 'agents' not in insp.get_table_names():
0N/A--- neutron-2015.1.2/neutron/db/migration/alembic_migrations/core_init_ops.py.orig 2016-04-22 23:25:50.350653015 -0700
0N/A+++ neutron-2015.1.2/neutron/db/migration/alembic_migrations/core_init_ops.py 2016-04-22 23:30:15.715403373 -0700
0N/A+ bind = op.get_bind()
0N/A+ insp = sa.engine.reflection.Inspector.from_engine(bind)
0N/A+ table_names = insp.get_table_names()
0N/A sa.PrimaryKeyConstraint('id'))
0N/A sa.PrimaryKeyConstraint('id'))
0N/A sa.PrimaryKeyConstraint('id'))
0N/A sa.PrimaryKeyConstraint('address', 'subnet_id'))
0N/A sa.PrimaryKeyConstraint('id'))
0N/A sa.PrimaryKeyConstraint('destination', 'nexthop', 'subnet_id'))
0N/A sa.PrimaryKeyConstraint('ip_address', 'subnet_id', 'network_id'))
0N/A ['ipallocationpools.id'], ondelete='CASCADE'),
0N/A sa.PrimaryKeyConstraint('allocation_pool_id', 'first_ip', 'last_ip'))
0N/A--- neutron-2015.1.2/neutron/db/migration/alembic_migrations/l3_init_ops.py.orig 2016-04-22 23:35:15.205163303 -0700
0N/A+++ neutron-2015.1.2/neutron/db/migration/alembic_migrations/l3_init_ops.py 2016-04-22 23:33:36.741262443 -0700
0N/A+ bind = op.get_bind()
+ insp = sa.engine.reflection.Inspector.from_engine(bind)
+ table_names = insp.get_table_names()
sa.PrimaryKeyConstraint('network_id'))
sa.PrimaryKeyConstraint('id'))
--- neutron-2015.1.2/neutron/db/migration/alembic_migrations/other_extensions_init_ops.py.orig 2016-04-22 23:35:35.724592904 -0700
+++ neutron-2015.1.2/neutron/db/migration/alembic_migrations/other_extensions_init_ops.py 2016-04-22 23:37:11.709485583 -0700
sa.PrimaryKeyConstraint('provider_name', 'resource_id'),
sa.UniqueConstraint('resource_id'))
+ bind = op.get_bind()
+ insp = sa.engine.reflection.Inspector.from_engine(bind)
+ if 'quotas' not in insp.get_table_names():
--- neutron-2015.1.2/neutron/db/migration/alembic_migrations/versions/1fcfc149aca4_agents_unique_by_type_and_host.py.orig 2016-04-23 01:59:50.554268246 -0700
+++ neutron-2015.1.2/neutron/db/migration/alembic_migrations/versions/1fcfc149aca4_agents_unique_by_type_and_host.py 2016-04-23 02:01:10.767910540 -0700
from neutron.db import migration
+ bind = op.get_bind()
+ insp = sa.engine.reflection.Inspector.from_engine(bind)
+ u_cons_list = insp.get_unique_constraints(TABLE_NAME)
+ u_cons.append(c['name'])
--- neutron-2015.1.2/neutron/db/migration/alembic_migrations/versions/2eeaf963a447_floatingip_status.py.orig 2016-04-22 23:41:17.060181778 -0700
+++ neutron-2015.1.2/neutron/db/migration/alembic_migrations/versions/2eeaf963a447_floatingip_status.py 2016-04-22 23:57:26.134124564 -0700
- op.add_column('floatingips',
+ bind = op.get_bind()
+ insp = sa.engine.reflection.Inspector.from_engine(bind)
+ col_names_list = insp.get_columns('floatingips')
+ col_names.append(c['name'])
+ op.add_column('floatingips',
sa.Column('last_known_router_id',
sa.String(length=36),
- op.add_column('floatingips',
+ op.add_column('floatingips',
sa.Column('status',
sa.String(length=16),
--- neutron-2015.1.2/neutron/db/migration/alembic_migrations/versions/2447ad0e9585_add_ipv6_mode_props.py.orig 2016-04-22 23:42:16.956052992 -0700
+++ neutron-2015.1.2/neutron/db/migration/alembic_migrations/versions/2447ad0e9585_add_ipv6_mode_props.py 2016-04-22 23:54:33.628120696 -0700
op.execute("CREATE TYPE ipv6_address_modes AS ENUM ('%s', '%s', '%s')"
- op.add_column('subnets',
+ bind = op.get_bind()
+ insp = sa.engine.reflection.Inspector.from_engine(bind)
+ col_names_list = insp.get_columns('subnets')
+ col_names.append(c['name'])
+ op.add_column('subnets',
sa.Column('ipv6_ra_mode',
sa.Enum('slaac',
- op.add_column('subnets',
+ op.add_column('subnets',
sa.Column('ipv6_address_mode',
sa.Enum('slaac',
--- neutron-2015.1.2/neutron/db/migration/alembic_migrations/versions/544673ac99ab_add_router_port_table.py.orig 2016-04-22 23:43:11.770727387 -0700
+++ neutron-2015.1.2/neutron/db/migration/alembic_migrations/versions/544673ac99ab_add_router_port_table.py 2016-04-22 23:45:53.016161819 -0700
+ bind = op.get_bind()
+ insp = sa.engine.reflection.Inspector.from_engine(bind)
+ if 'routerports' not in insp.get_table_names():
['ports.id'],
- op.execute(SQL_STATEMENT)
+ op.execute(SQL_STATEMENT)