"""add light profiles

Revision ID: 35194df60d9
Revises: 5a3a9074f32
Create Date: 2015-07-22 13:00:35.475751

"""

# revision identifiers, used by Alembic.
revision = '35194df60d9'
down_revision = '5a3a9074f32'

from alembic import op
import sqlalchemy as sa


def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_table('game',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('num_players', sa.Integer(), nullable=True),
    sa.Column('state_log', sa.String(length=2048), nullable=True),
    sa.Column('game_started', sa.Boolean(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('db_light_profile',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('secret', sa.Integer(), nullable=True),
    sa.Column('nickname', sa.String(length=128), nullable=True),
    sa.Column('gamename', sa.String(length=128), nullable=True),
    sa.Column('game_id', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['game_id'], ['game.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.drop_table('db_game')
    ### end Alembic commands ###


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_table('db_game',
    sa.Column('id', sa.INTEGER(), nullable=False),
    sa.Column('a_secret', sa.INTEGER(), nullable=True),
    sa.Column('b_secret', sa.INTEGER(), nullable=True),
    sa.Column('c_secret', sa.INTEGER(), nullable=True),
    sa.Column('d_secret', sa.INTEGER(), nullable=True),
    sa.Column('state_log', sa.VARCHAR(length=2048), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.drop_table('db_light_profile')
    op.drop_table('game')
    ### end Alembic commands ###
