"""bank card index

Revision ID: dd26d4d3822d
Revises: fabdcd0f32af
Create Date: 2019-09-06 19:21:14.140075

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'dd26d4d3822d'
down_revision = 'fabdcd0f32af'
branch_labels = None
depends_on = None


def upgrade(engine_name):
    globals()["upgrade_%s" % engine_name]()


def downgrade(engine_name):
    globals()["downgrade_%s" % engine_name]()





def upgrade_():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_unique_constraint('uix_bank_card_no_uid_merchant', 'bank_card', ['card_no', 'uid', 'merchant'])
    # ### end Alembic commands ###


def downgrade_():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint('uix_bank_card_no_uid_merchant', 'bank_card', type_='unique')
    # ### end Alembic commands ###


def upgrade_BACK():
    # ### commands auto generated by Alembic - please adjust! ###
    pass
    # ### end Alembic commands ###


def downgrade_BACK():
    # ### commands auto generated by Alembic - please adjust! ###
    pass
    # ### end Alembic commands ###

