¡@

Home 

OpenStack Study: 1b693c095aa3_quota_ext_db_grizzly.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(

        'quotas',

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

        sa.Column('tenant_id', sa.String(length=255), nullable=True),

        sa.Column('resource', sa.String(length=255), nullable=True),

        sa.Column('limit', sa.Integer(), nullable=True),

        sa.PrimaryKeyConstraint('id')

    )

    ### 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('quotas')

    ### end Alembic commands ###