"""Remove extid column from refid table.

Revision ID: bc7d717a37d6
Revises: e918fab0402d
Create Date: 2017-04-20 23:26:01.459118

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

# revision identifiers, used by Alembic.
revision = 'bc7d717a37d6'
down_revision = 'e918fab0402d'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index('extid', table_name='refid')
    op.drop_column('refid', 'extid')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('refid', sa.Column('extid', mysql.INTEGER(display_width=11), autoincrement=False, nullable=False))
    op.create_index('extid', 'refid', ['extid'], unique=True)
    # ### end Alembic commands ###
