¡@

Home 

OpenStack Study: 3cabb850f4a5_table_to_track_port_.py

OpenStack Index

**** CubicPower OpenStack Study ****

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

    if not migration.should_run(active_plugins, migration_for_plugins):

        return

    ### commands auto generated by Alembic - please adjust! ###

    op.create_table('portlocations',

                    sa.Column('port_id', sa.String(length=255),

                              primary_key=True, nullable=False),

                    sa.Column('host_id',

                              sa.String(length=255), nullable=False)

                    )

    ### end Alembic commands ###

**** CubicPower OpenStack Study ****

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

    if not migration.should_run(active_plugins, migration_for_plugins):

        return

    ### commands auto generated by Alembic - please adjust! ###

    op.drop_table('portlocations')

    ### end Alembic commands ###