"""Adding game series achievements.

Revision ID: ef6b27f2fcc5
Revises: 6c3db80175f1
Create Date: 2016-12-18 23:09:23.805875

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'ef6b27f2fcc5'
down_revision = '6c3db80175f1'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('series_achievement',
    sa.Column('game', sa.String(length=32), nullable=False),
    sa.Column('userid', sa.Integer(), nullable=False),
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('type', sa.String(length=64), nullable=False),
    sa.Column('data', sa.JSON(), nullable=False),
    sa.UniqueConstraint('game', 'userid', 'id', 'type', name='game_userid_id_type'),
    mysql_charset='utf8mb4'
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('series_achievement')
    # ### end Alembic commands ###
