"""empty message

Revision ID: d886ccaad269
Revises: 2196aedb1f02
Create Date: 2018-10-09 08:26:00.195280

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

# revision identifiers, used by Alembic.
revision = 'd886ccaad269'
down_revision = '2196aedb1f02'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint('company_ibfk_1', 'company', type_='foreignkey')
    op.drop_column('company', 'created_by')
    op.drop_constraint('users_ibfk_3', 'users', type_='foreignkey')
    op.drop_column('users', 'created_company_id')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('users', sa.Column('created_company_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True))
    op.create_foreign_key('users_ibfk_3', 'users', 'company', ['created_company_id'], ['id'])
    op.add_column('company', sa.Column('created_by', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True))
    op.create_foreign_key('company_ibfk_1', 'company', 'users', ['created_by'], ['id'])
    # ### end Alembic commands ###
