"""add table merge_participate_in

Revision ID: 037012968521
Revises: 643e70db5fb5
Create Date: 2018-12-24 16:55:11.263735

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '037012968521'
down_revision = '643e70db5fb5'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('merge_participate_in',
    sa.Column('_id', sa.BigInteger(), autoincrement=True, nullable=False),
    sa.Column('created_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('update_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted', sa.Boolean(), server_default='0', nullable=False),
    sa.Column('initiate_user_id', sa.String(length=64), server_default='', nullable=False),
    sa.Column('game_instance_id', sa.BigInteger(), nullable=False),
    sa.PrimaryKeyConstraint('_id')
    )
    op.add_column('participate_in', sa.Column('merge_id', sa.BigInteger(), server_default='-1', nullable=False))
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('participate_in', 'merge_id')
    op.drop_table('merge_participate_in')
    # ### end Alembic commands ###
