"""Add settings table for game/version.

Revision ID: d7602d586661
Revises: 21c19a671b3b
Create Date: 2017-02-18 16:52:22.594299

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'd7602d586661'
down_revision = '21c19a671b3b'
branch_labels = None
depends_on = None


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


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