"""Linked videos and actor_groups

Revision ID: 7352cf06437d
Revises: 8f5ca94205dc
Create Date: 2018-07-18 19:26:38.558941

"""
from alembic import op
import sqlalchemy as sa


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


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


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