"""alter adminuser

Revision ID: 4a5726981920
Revises: 882351d79124
Create Date: 2018-10-19 13:55:01.202936

"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql

# revision identifiers, used by Alembic.
revision = '4a5726981920'
down_revision = '882351d79124'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index('name', table_name='admin_users')
    op.drop_column('key_salt', 'user_level')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('key_salt', sa.Column('user_level', mysql.TINYINT(display_width=1), server_default=sa.text("'0'"), autoincrement=False, nullable=False))
    op.create_index('name', 'admin_users', ['name'], unique=True)
    # ### end Alembic commands ###
