"""empty message

Revision ID: 2368ed0f9e85
Revises: 
Create Date: 2019-10-04 10:02:32.165214

"""
from alembic import op
import sqlalchemy as sa


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


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('user_model',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('password', sa.String(length=128), nullable=True),
    sa.Column('uuid', sa.String(), nullable=True),
    sa.Column('first_name', sa.String(length=64), nullable=True),
    sa.Column('last_name', sa.String(length=64), nullable=True),
    sa.Column('email', sa.String(length=120), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_user_model_email'), 'user_model', ['email'], unique=False)
    op.create_index(op.f('ix_user_model_first_name'), 'user_model', ['first_name'], unique=False)
    op.create_index(op.f('ix_user_model_last_name'), 'user_model', ['last_name'], unique=False)
    op.create_index(op.f('ix_user_model_uuid'), 'user_model', ['uuid'], unique=False)
    op.create_table('organisation_model',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('name', sa.String(length=64), nullable=True),
    sa.Column('user_id', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['user_id'], ['user_model.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_organisation_model_name'), 'organisation_model', ['name'], unique=False)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_organisation_model_name'), table_name='organisation_model')
    op.drop_table('organisation_model')
    op.drop_index(op.f('ix_user_model_uuid'), table_name='user_model')
    op.drop_index(op.f('ix_user_model_last_name'), table_name='user_model')
    op.drop_index(op.f('ix_user_model_first_name'), table_name='user_model')
    op.drop_index(op.f('ix_user_model_email'), table_name='user_model')
    op.drop_table('user_model')
    # ### end Alembic commands ###
