"""make character_label_ids a primary key

Revision ID: babc9bcf7b14
Revises: 27c3ed745239
Create Date: 2017-10-31 21:14:03.926580

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = "babc9bcf7b14"
down_revision = "27c3ed745239"
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column("character_labels", "character_label_id")
    op.execute(
        "ALTER TABLE character_labels ADD character_label_id INT PRIMARY KEY AUTO_INCREMENT;"
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column("character_labels", "character_label_id")
    op.execute("ALTER TABLE character_labels ADD character_label_id INT;")
    # ### end Alembic commands ###
