**** CubicPower OpenStack Study ****
def upgrade(active_plugins=None, options=None):
if not migration.should_run(active_plugins, migration_for_plugins):
return
op.create_unique_constraint(
name=CONSTRAINT_NAME,
source=TABLE_NAME,
local_cols=['id']
)
**** CubicPower OpenStack Study ****
def downgrade(active_plugins=None, options=None):
if not migration.should_run(active_plugins, migration_for_plugins):
return
op.drop_constraint(
CONSTRAINT_NAME,
TABLE_NAME,
type_='unique'
)