"""add participate_in_id col

Revision ID: 3e9e41927fef
Revises: 1898ed6ce77e
Create Date: 2019-01-10 19:58:19.443085

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '3e9e41927fef'
down_revision = '1898ed6ce77e'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('merge_participate_in', 'initiate_user_id')
    op.drop_column('merge_participate_in', 'game_instance_id')
    op.add_column('merge_participate_in', sa.Column('participate_in_id', sa.BigInteger(), nullable=False))
    op.add_column('merge_participate_in', sa.Column('initiate_user_id', sa.String(length=64), server_default='', nullable=False))
    op.add_column('merge_participate_in', sa.Column('game_instance_id', sa.BigInteger(), nullable=False))

    op.create_unique_constraint(None, 'merge_participate_in', ['participate_in_id'])
    # ### end Alembic commands ###


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