"""empty message

Revision ID: 3f6b2ca0c0fd
Revises: 
Create Date: 2021-06-14 15:41:58.105432

"""
from alembic import op
import sqlalchemy as sa


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


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('relacionamento',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('user',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('nome', sa.String(length=50), nullable=False),
    sa.Column('email', sa.String(length=50), nullable=False),
    sa.Column('cpf', sa.String(length=50), nullable=False),
    sa.Column('dre', sa.String(length=50), nullable=True),
    sa.Column('siape', sa.String(length=50), nullable=True),
    sa.Column('curso', sa.String(length=50), nullable=True),
    sa.Column('senha_hash', sa.String(length=280), nullable=False),
    sa.Column('classe', sa.Boolean(), nullable=True),
    sa.Column('relacionamento_id', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['relacionamento_id'], ['relacionamento.id'], ),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('cpf'),
    sa.UniqueConstraint('dre'),
    sa.UniqueConstraint('email'),
    sa.UniqueConstraint('siape')
    )
    op.create_table('criardisciplina',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('materia', sa.String(length=50), nullable=False),
    sa.Column('periodo', sa.String(length=50), nullable=False),
    sa.Column('codigo_materia', sa.String(length=5), nullable=False),
    sa.Column('codigo_turma', sa.String(length=5), nullable=False),
    sa.Column('user_id', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['user_id'], ['user.id'], ),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('codigo_turma')
    )
    op.create_table('association_disc_rel',
    sa.Column('criardisciplina_id', sa.Integer(), nullable=True),
    sa.Column('relacionamento_id', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['criardisciplina_id'], ['criardisciplina.id'], ),
    sa.ForeignKeyConstraint(['relacionamento_id'], ['relacionamento.id'], )
    )
    op.create_table('video',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('nome', sa.String(length=50), nullable=False),
    sa.Column('descricao', sa.String(length=50), nullable=False),
    sa.Column('link', sa.String(length=5), nullable=False),
    sa.Column('criardisciplina_id', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['criardisciplina_id'], ['criardisciplina.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('video')
    op.drop_table('association_disc_rel')
    op.drop_table('criardisciplina')
    op.drop_table('user')
    op.drop_table('relacionamento')
    # ### end Alembic commands ###
