¡@

Home 

OpenStack Study: 2eeaf963a447_floatingip_status.py

OpenStack Index

**** CubicPower OpenStack Study ****

def upgrade(active_plugins=None, options=None):

    if not migration.should_run(active_plugins, migration_for_plugins):

        return

    op.add_column('floatingips',

                  sa.Column('last_known_router_id',

                            sa.String(length=36),

                            nullable=True))

    op.add_column('floatingips',

                  sa.Column('status',

                            sa.String(length=16),

                            nullable=True))

**** CubicPower OpenStack Study ****

def downgrade(active_plugins=None, options=None):

    if not migration.should_run(active_plugins, migration_for_plugins):

        return

    op.drop_column('floatingips', 'last_known_router_id')

    op.drop_column('floatingips', 'status')