"""empty message

Revision ID: 50683aeb21b9
Revises: 7b250ac636e2
Create Date: 2019-02-09 19:05:23.162191

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

# revision identifiers, used by Alembic.
revision = '50683aeb21b9'
down_revision = '7b250ac636e2'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    # op.create_foreign_key(None, 'tagmap', 'papers', ['paper_id'], ['id'])
    op.add_column('teaching', sa.Column('code', sa.String(length=300), nullable=False))
    op.add_column('teaching', sa.Column('link', sa.String(length=300), nullable=False))
    # op.alter_column('users', 'email',
    #            existing_type=mysql.VARCHAR(length=120),
    #            nullable=False)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('users', 'email',
               existing_type=mysql.VARCHAR(length=120),
               nullable=True)
    op.drop_column('teaching', 'link')
    op.drop_column('teaching', 'code')
    op.drop_constraint(None, 'tagmap', type_='foreignkey')
    # ### end Alembic commands ###
