"""empty message

Revision ID: 3f82af559c8a
Revises: None
Create Date: 2015-10-16 03:37:42.100489

"""

# revision identifiers, used by Alembic.
revision = '3f82af559c8a'
down_revision = None

from alembic import op
import sqlalchemy as sa


def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_table('crew_battle',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('team1_name', sa.String(length=64), nullable=False),
    sa.Column('team2_name', sa.String(length=64), nullable=False),
    sa.Column('total_stocks', sa.Integer(), nullable=False),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('crew_match',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('battle_id', sa.Integer(), nullable=False),
    sa.Column('battle_match_index', sa.Integer(), nullable=False),
    sa.ForeignKeyConstraint(['battle_id'], ['crew_battle.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('match_result',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('match_id', sa.Integer(), nullable=False),
    sa.Column('match_player_index', sa.Integer(), nullable=False),
    sa.Column('name', sa.String(length=64), nullable=False),
    sa.Column('character', sa.String(length=32), nullable=False),
    sa.Column('initial_stocks', sa.Integer(), nullable=False),
    sa.Column('final_stocks', sa.Integer(), nullable=False),
    sa.ForeignKeyConstraint(['match_id'], ['crew_match.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    ### end Alembic commands ###


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