"""some uniqueness constraints

Revision ID: 6906302f0e6e
Revises: 52cd9c67142d
Create Date: 2017-08-11 20:11:05.347454

"""
from alembic import op
import sqlalchemy as sa


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


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_unique_constraint(
        "series_character", "characters", ["series_id", "character_name"]
    )
    op.create_unique_constraint(
        "season_episode", "episodes", ["episode_number", "season_id"]
    )
    # ### end Alembic commands ###


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