**** CubicPower OpenStack Study ****
def upgrade(migrate_engine):
meta = sql.MetaData()
meta.bind = migrate_engine
mapping_table = sql.Table(
'mapping',
meta,
sql.Column('id', sql.String(64), primary_key=True),
sql.Column('rules', sql.Text(), nullable=False))
mapping_table.create(migrate_engine, checkfirst=True)
**** CubicPower OpenStack Study ****
def downgrade(migrate_engine):
meta = sql.MetaData()
meta.bind = migrate_engine
# Drop previously created tables
tables = ['mapping']
for table_name in tables:
table = sql.Table(table_name, meta, autoload=True)
table.drop()