"""memberstatusreport, statusreport: add unique constraints

Revision ID: 53052ccb8a54
Revises: e5d41b324114
Create Date: 2021-04-04 08:43:53.572045

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '53052ccb8a54'
down_revision = 'e5d41b324114'
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('uq_memberstatusreport_meeting_invite_content_1', 'memberstatusreport', ['meeting_id', 'invite_id', 'content_id'])
    op.create_unique_constraint('uq_statusreport_meeting_position_1', 'statusreport', ['meeting_id', 'position_id'])
    # ### end Alembic commands ###


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


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


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

