"""Add scheduled work table.

Revision ID: d764dd3489e6
Revises: ef6b27f2fcc5
Create Date: 2016-12-21 23:27:07.138501

"""
from alembic import op
import sqlalchemy as sa


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


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('scheduled_work',
    sa.Column('game', sa.String(length=32), nullable=False),
    sa.Column('version', sa.Integer(), nullable=False),
    sa.Column('name', sa.String(length=32), nullable=False),
    sa.Column('schedule', sa.String(length=32), nullable=False),
    sa.Column('year', sa.Integer(), nullable=True),
    sa.Column('day', sa.Integer(), nullable=True),
    sa.UniqueConstraint('game', 'version', 'name', 'schedule', name='game_version_name_schedule'),
    mysql_charset='utf8mb4'
    )
    # ### end Alembic commands ###


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