"""empty message

Revision ID: 4631bafa1241
Revises: 4a8b48232b5f
Create Date: 2019-05-11 20:59:46.358542

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '4631bafa1241'
down_revision = '4a8b48232b5f'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint('roles_users_ibfk_2', 'roles_users', type_='foreignkey')
    op.drop_constraint('roles_users_ibfk_1', 'roles_users', type_='foreignkey')
    op.create_foreign_key(None, 'roles_users', 'users', ['user_id'], ['id'], ondelete='CASCADE')
    op.create_foreign_key(None, 'roles_users', 'role', ['role_id'], ['id'], ondelete='CASCADE')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, 'roles_users', type_='foreignkey')
    op.drop_constraint(None, 'roles_users', type_='foreignkey')
    op.create_foreign_key('roles_users_ibfk_1', 'roles_users', 'role', ['role_id'], ['id'])
    op.create_foreign_key('roles_users_ibfk_2', 'roles_users', 'users', ['user_id'], ['id'])
    # ### end Alembic commands ###
