"""empty message

Revision ID: 6e469162ab8f
Revises: 70d0db914e82
Create Date: 2016-03-19 00:52:56.464140

"""

# revision identifiers, used by Alembic.
revision = '6e469162ab8f'
down_revision = '70d0db914e82'

from alembic import op
import app
import sqlalchemy as sa


def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_table('cursos',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('evento_id', sa.Integer(), nullable=True),
    sa.Column('nome', sa.String(), nullable=True),
    sa.Column('data_inicio', sa.DateTime(), nullable=True),
    sa.Column('duracao', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['evento_id'], ['eventos.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('cursos_inscricoes',
    sa.Column('curso_id', sa.Integer(), nullable=False),
    sa.Column('inscricao_id', sa.Integer(), nullable=False),
    sa.ForeignKeyConstraint(['curso_id'], ['cursos.id'], ),
    sa.ForeignKeyConstraint(['inscricao_id'], ['inscricoes.id'], ),
    sa.PrimaryKeyConstraint('curso_id', 'inscricao_id')
    )
    ### end Alembic commands ###


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