"""add-foreign-key-on-Thread

Revision ID: 794d44c2bef8
Revises: 6498631e62c5
Create Date: 2019-08-21 16:48:06.623266

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '794d44c2bef8'
down_revision = '6498631e62c5'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_foreign_key(None, 'thread', 'comment', ['top_comment'], ['id'])
    # ### end Alembic commands ###


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