mirror of
https://github.com/minetest/contentdb.git
synced 2024-11-14 19:43:48 +01:00
35 lines
887 B
Python
35 lines
887 B
Python
|
"""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 ###
|