PCv5/migrations/versions/4e05b43b18b1_recreate_threa...

34 lines
821 B
Python

"""Recreate Thread table
Revision ID: 4e05b43b18b1
Revises: 2dbb614a7236
Create Date: 2019-09-08 12:33:30.647277
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '4e05b43b18b1'
down_revision = '2dbb614a7236'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('thread',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('top_comment_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['top_comment_id'], ['comment.id'], ),
sa.PrimaryKeyConstraint('id')
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('thread')
# ### end Alembic commands ###