¡@

Home 

OpenStack Study: 81c553f3776c_bsn_consistencyhashes.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(

        'consistencyhashes',

        sa.Column('hash_id', sa.String(255), primary_key=True),

        sa.Column('hash', sa.String(255), nullable=False)

    )

**** CubicPower OpenStack Study ****

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

    if not migration.should_run(active_plugins, migration_for_plugins):

        return

    op.drop_table('consistencyhashes')