¡@

Home 

OpenStack Study: 40dffbf4b549_nvp_dist_router.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.create_table(

        'nsxrouterextattributess',

        sa.Column('router_id', sa.String(length=36), nullable=False),

        sa.Column('distributed', sa.Boolean(), nullable=False),

        sa.ForeignKeyConstraint(

            ['router_id'], ['routers.id'], ondelete='CASCADE'),

        sa.PrimaryKeyConstraint('router_id')

    )

**** CubicPower OpenStack Study ****

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

    if not migration.should_run(active_plugins, migration_for_plugins):

        return

    op.drop_table('nsxrouterextattributess')