contentdb/migrations/versions/de004661c5e1_.py

35 lines
887 B
Python
Raw Normal View History

2018-06-12 00:38:03 +02:00
"""empty message
Revision ID: de004661c5e1
Revises: 605b3d74ada1
Create Date: 2018-06-11 23:38:38.611039
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'de004661c5e1'
down_revision = '605b3d74ada1'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('watchers',
sa.Column('user_id', sa.Integer(), nullable=False),
sa.Column('thread_id', sa.Integer(), nullable=False),
sa.ForeignKeyConstraint(['thread_id'], ['thread.id'], ),
sa.ForeignKeyConstraint(['user_id'], ['user.id'], ),
sa.PrimaryKeyConstraint('user_id', 'thread_id')
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('watchers')
# ### end Alembic commands ###