diff --git a/migrations/versions/02be4c8fbd69_.py b/migrations/versions/02be4c8fbd69_.py new file mode 100644 index 0000000..f4fb79e --- /dev/null +++ b/migrations/versions/02be4c8fbd69_.py @@ -0,0 +1,34 @@ +"""empty message + +Revision ID: 02be4c8fbd69 +Revises: 0e0f8ad1362d +Create Date: 2019-10-09 10:05:32.403967 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = '02be4c8fbd69' +down_revision = '0e0f8ad1362d' +branch_labels = None +depends_on = None + + +def upgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.create_table('game_rooms_users', + sa.Column('user_id', sa.Integer(), nullable=False), + sa.Column('game_rooms_id', sa.Integer(), nullable=False), + sa.ForeignKeyConstraint(['game_rooms_id'], ['game_rooms.id'], ), + sa.ForeignKeyConstraint(['user_id'], ['users.id'], ), + sa.PrimaryKeyConstraint('user_id', 'game_rooms_id') + ) + # ### end Alembic commands ### + + +def downgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.drop_table('game_rooms_users') + # ### end Alembic commands ###