"""add player id to turn table

Revision ID: 70ce1137b033
Revises: 6572e03b22b2
Create Date: 2020-03-22 02:28:11.440994

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '70ce1137b033'
down_revision = '6572e03b22b2'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('turn', sa.Column('player_id', sa.Integer(), nullable=False))
    op.create_foreign_key(None, 'turn', 'player', ['player_id'], ['id'])
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, 'turn', type_='foreignkey')
    op.drop_column('turn', 'player_id')
    # ### end Alembic commands ###
