"""Linked videos with series

Revision ID: 11bf77399e0f
Revises: 7352cf06437d
Create Date: 2018-07-18 20:09:15.102202

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = "11bf77399e0f"
down_revision = "7352cf06437d"
branch_labels = None
depends_on = None


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


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