**** CubicPower OpenStack Study ****
def upgrade(active_plugins=None, options=None):
if not migration.should_run(active_plugins, migration_for_plugins):
return
op.rename_table('nvp_network_bindings', 'tz_network_bindings')
op.rename_table('nvp_multi_provider_networks', 'multi_provider_networks')
engine = op.get_bind().engine
if engine.name == 'postgresql':
op.execute("ALTER TYPE nvp_network_bindings_binding_type "
"RENAME TO tz_network_bindings_binding_type;")
**** CubicPower OpenStack Study ****
def downgrade(active_plugins=None, options=None):
if not migration.should_run(active_plugins, migration_for_plugins):
return
engine = op.get_bind().engine
if engine.name == 'postgresql':
op.execute("ALTER TYPE tz_network_bindings_binding_type "
"RENAME TO nvp_network_bindings_binding_type;")
op.rename_table('multi_provider_networks', 'nvp_multi_provider_networks')
op.rename_table('tz_network_bindings', 'nvp_network_bindings')