"""Relationship between episodes and videos

Revision ID: 6c12ddacf663
Revises: 9133ec0c2db6
Create Date: 2017-08-10 19:30:32.504111

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = "6c12ddacf663"
down_revision = "9133ec0c2db6"
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column("videos", sa.Column("episode_id", sa.Integer(), nullable=True))
    op.create_foreign_key(None, "videos", "episodes", ["episode_id"], ["episode_id"])
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, "videos", type_="foreignkey")
    op.drop_column("videos", "episode_id")
    # ### end Alembic commands ###
