**** CubicPower OpenStack Study ****
def upgrade(active_plugins=None, options=None):
if not migration.should_run(active_plugins, migration_for_plugins):
return
op.create_table(
'vcns_router_bindings',
sa.Column('status', sa.String(length=16), nullable=False),
sa.Column('status_description', sa.String(length=255), nullable=True),
sa.Column('router_id', sa.String(length=36), nullable=False),
sa.Column('edge_id', sa.String(length=16), nullable=True),
sa.Column('lswitch_id', sa.String(length=36), nullable=False),
sa.PrimaryKeyConstraint('router_id'),
mysql_engine='InnoDB'
)
op.add_column(
u'nsxrouterextattributess',
sa.Column('service_router', sa.Boolean(), nullable=False))
op.execute("UPDATE nsxrouterextattributess set service_router=False")
**** CubicPower OpenStack Study ****
def downgrade(active_plugins=None, options=None):
if not migration.should_run(active_plugins, migration_for_plugins):
return
op.drop_column(u'nsxrouterextattributess', 'service_router')
op.drop_table('vcns_router_bindings')