"""empty message

Revision ID: a71814139c23
Revises: 16fd86128993
Create Date: 2020-05-23 01:26:51.180448

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'a71814139c23'
down_revision = '16fd86128993'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('admin_roles',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('admin_role', sa.String(length=50), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('admin_users',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('admin_user', sa.String(length=50), nullable=False),
    sa.Column('password_hash', sa.String(length=100), nullable=False),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('admin_user')
    )
    op.create_table('role_users',
    sa.Column('adminrole_id', sa.Integer(), nullable=True),
    sa.Column('adminuser_id', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['adminrole_id'], ['admin_roles.id'], ),
    sa.ForeignKeyConstraint(['adminuser_id'], ['admin_users.id'], )
    )
    # ### end Alembic commands ###


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