"""empty message

Revision ID: f321d8ed00fa
Revises: 87dc92a45bb7
Create Date: 2018-12-23 01:30:03.948633

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

# revision identifiers, used by Alembic.
revision = 'f321d8ed00fa'
down_revision = '87dc92a45bb7'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint('roles_ibfk_2', 'roles', type_='foreignkey')
    op.drop_constraint('roles_ibfk_1', 'roles', type_='foreignkey')
    op.drop_column('roles', 'user_id')
    op.drop_column('roles', 'role_id')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('roles', sa.Column('role_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True))
    op.add_column('roles', sa.Column('user_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True))
    op.create_foreign_key('roles_ibfk_1', 'roles', 'roles', ['user_id'], ['id'])
    op.create_foreign_key('roles_ibfk_2', 'roles', 'users', ['role_id'], ['id'])
    # ### end Alembic commands ###
