"""empty message

Revision ID: a872290727d0
Revises: 0b8bdb1ce600
Create Date: 2018-02-26 17:52:34.379585

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

# revision identifiers, used by Alembic.
revision = 'a872290727d0'
down_revision = '0b8bdb1ce600'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('course', sa.Column('school_id', sa.Integer(), nullable=True))
    op.drop_constraint('course_ibfk_3', 'course', type_='foreignkey')
    op.create_foreign_key(None, 'course', 'school', ['school_id'], ['id'])
    op.drop_column('course', 'school_name')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('course', sa.Column('school_name', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True))
    op.drop_constraint(None, 'course', type_='foreignkey')
    op.create_foreign_key('course_ibfk_3', 'course', 'school', ['school_name'], ['id'])
    op.drop_column('course', 'school_id')
    # ### end Alembic commands ###
