"""unique constraint in seasons

Revision ID: 52cd9c67142d
Revises: 60a827c82297
Create Date: 2017-08-11 19:52:45.226185

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = "52cd9c67142d"
down_revision = "60a827c82297"
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_unique_constraint(
        "series_season", "seasons", ["series_id", "season_number"]
    )
    # ### end Alembic commands ###


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