"""empty message

Revision ID: f97190ebbc45
Revises: 
Create Date: 2020-09-18 10:55:30.293810

"""
from alembic import op
import sqlalchemy as sa


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


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('cooker',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('nickname', sa.String(length=80), nullable=False),
    sa.Column('email', sa.String(length=120), nullable=False),
    sa.Column('password', sa.String(length=250), nullable=True),
    sa.Column('company', sa.String(length=100), nullable=False),
    sa.Column('name', sa.String(length=80), nullable=False),
    sa.Column('last_name', sa.String(length=80), nullable=False),
    sa.Column('is_admin', sa.Boolean(), nullable=False),
    sa.Column('is_active', sa.Boolean(), nullable=False),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('email'),
    sa.UniqueConstraint('nickname')
    )
    op.create_table('enterprise',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('nickname', sa.String(length=80), nullable=False),
    sa.Column('name', sa.String(length=80), nullable=False),
    sa.Column('email', sa.String(length=120), nullable=False),
    sa.Column('password', sa.String(length=250), nullable=True),
    sa.Column('last_name', sa.String(length=80), nullable=False),
    sa.Column('kitchen_number', sa.String(length=80), nullable=False),
    sa.Column('hired_hours', sa.String(length=80), nullable=False),
    sa.Column('enterprise', sa.String(length=100), nullable=False),
    sa.Column('is_active', sa.Boolean(), nullable=False),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('email'),
    sa.UniqueConstraint('nickname')
    )
    op.create_table('called',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('called_code', sa.String(length=20), nullable=False),
    sa.Column('status', sa.Enum('espera', 'listo', 'entregado', 'cancelado', 'proceso'), nullable=False),
    sa.Column('time', sa.String(length=280), nullable=False),
    sa.Column('logo_delivery', sa.String(length=280), nullable=False),
    sa.Column('room', sa.String(length=280), nullable=False),
    sa.Column('is_active', sa.Boolean(), nullable=False),
    sa.Column('cooker_id', sa.Integer(), nullable=False),
    sa.ForeignKeyConstraint(['cooker_id'], ['cooker.id'], ),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('called_code')
    )
    # ### end Alembic commands ###


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