**** CubicPower OpenStack Study ****
def upgrade(migrate_engine):
meta = MetaData()
meta.bind = migrate_engine
snapshots = Table('snapshots', meta, autoload=True)
volumes = Table('volumes', meta, autoload=True)
ForeignKeyConstraint(
columns=[snapshots.c.volume_id],
refcolumns=[volumes.c.id]).create()
**** CubicPower OpenStack Study ****
def downgrade(migrate_engine):
meta = MetaData()
meta.bind = migrate_engine
snapshots = Table('snapshots', meta, autoload=True)
volumes = Table('volumes', meta, autoload=True)
ForeignKeyConstraint(
columns=[snapshots.c.volume_id],
refcolumns=[volumes.c.id]).drop()