"""adding owner to game table

Revision ID: eb08c53b7f2c
Revises: 4bc0affb918e
Create Date: 2020-03-21 17:06:42.353134

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'eb08c53b7f2c'
down_revision = '4bc0affb918e'
branch_labels = None
depends_on = None


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


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