"""create user record

Revision ID: 204db736ac42
Revises: 
Create Date: 2020-07-16 22:50:31.851514

"""
from alembic import op
import sqlalchemy as sa


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


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('base_user',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('name', sa.String(length=64), nullable=True),
    sa.Column('email', sa.String(length=120), nullable=True),
    sa.Column('org', sa.String(length=240), nullable=True),
    sa.Column('password_hash', sa.String(length=128), nullable=True),
    sa.Column('admin', sa.Boolean(), nullable=True),
    sa.Column('created_date', sa.DateTime(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_base_user_email'), 'base_user', ['email'], unique=True)
    op.create_index(op.f('ix_base_user_name'), 'base_user', ['name'], unique=False)
    op.create_index(op.f('ix_base_user_org'), 'base_user', ['org'], unique=False)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_base_user_org'), table_name='base_user')
    op.drop_index(op.f('ix_base_user_name'), table_name='base_user')
    op.drop_index(op.f('ix_base_user_email'), table_name='base_user')
    op.drop_table('base_user')
    # ### end Alembic commands ###
