¡@

Home 

OpenStack Study: 022_add_reason_column_to_service.py

OpenStack Index

**** CubicPower OpenStack Study ****

def upgrade(migrate_engine):

    meta = MetaData()

    meta.bind = migrate_engine

    services = Table('services', meta, autoload=True)

    reason = Column('disabled_reason', String(255))

    services.create_column(reason)

**** CubicPower OpenStack Study ****

def downgrade(migrate_engine):

    meta = MetaData()

    meta.bind = migrate_engine

    services = Table('services', meta, autoload=True)

    services.drop_column('disabled_reason')