"""add missing unique constraints

Revision ID: fb87feaaa094
Revises: 1cb44194db49
Create Date: 2021-02-03 19:02:51.347109

"""

from alembic import op


# revision identifiers, used by Alembic.
revision = "fb87feaaa094"
down_revision = "1cb44194db49"
branch_labels = None
depends_on = None


def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_unique_constraint(
        "entity_link_uc", "entity_link", ["entity_in_id", "entity_out_id"]
    )
    op.create_unique_constraint(
        "schedule_item_uc",
        "schedule_item",
        ["project_id", "task_type_id", "object_id"],
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint("schedule_item_uc", "schedule_item", type_="unique")
    op.drop_constraint("entity_link_uc", "entity_link", type_="unique")
    # ### end Alembic commands ###
