"""add topics

Revision ID: a3fb8937ae16
Revises: ebca7362eb22
Create Date: 2019-09-05 21:35:48.260827

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'a3fb8937ae16'
down_revision = 'ebca7362eb22'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('topic',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('forum_id', sa.Integer(), nullable=False),
    sa.ForeignKeyConstraint(['forum_id'], ['forum.id'], ),
    sa.ForeignKeyConstraint(['id'], ['thread.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('topic')
    # ### end Alembic commands ###
