"""create tables

Revision ID: adbf1d8a5b30
Revises: 
Create Date: 2018-06-02 13:29:17.257071

"""
from alembic import op
import sqlalchemy as sa


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


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('set',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('event', sa.String(length=16), nullable=True),
    sa.Column('notes', sa.Text(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_set_event'), 'set', ['event'], unique=False)
    op.create_table('jump_pass',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('setId', sa.Integer(), nullable=True),
    sa.Column('boatPath', sa.String(length=128), nullable=True),
    sa.Column('distance', sa.DECIMAL(), nullable=True),
    sa.Column('speed', sa.DECIMAL(), nullable=True),
    sa.Column('rampHeight', sa.DECIMAL(), nullable=True),
    sa.Column('zoSetting', sa.String(length=64), nullable=True),
    sa.ForeignKeyConstraint(['setId'], ['set.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('slalom_pass',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('setId', sa.Integer(), nullable=True),
    sa.Column('ropeLength', sa.DECIMAL(), nullable=True),
    sa.Column('boatSpeed', sa.DECIMAL(), nullable=True),
    sa.Column('buoyCount', sa.DECIMAL(), nullable=True),
    sa.Column('zoSetting', sa.String(length=8), nullable=True),
    sa.ForeignKeyConstraint(['setId'], ['set.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('trick_pass',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('setId', sa.Integer(), nullable=True),
    sa.Column('name', sa.String(length=128), nullable=True),
    sa.Column('points', sa.Integer(), nullable=True),
    sa.Column('speed', sa.DECIMAL(), nullable=True),
    sa.Column('zoSetting', sa.String(length=8), nullable=True),
    sa.ForeignKeyConstraint(['setId'], ['set.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_trick_pass_name'), 'trick_pass', ['name'], unique=False)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_trick_pass_name'), table_name='trick_pass')
    op.drop_table('trick_pass')
    op.drop_table('slalom_pass')
    op.drop_table('jump_pass')
    op.drop_index(op.f('ix_set_event'), table_name='set')
    op.drop_table('set')
    # ### end Alembic commands ###
