"""added index to artist name

Revision ID: ab9ecb88d7c1
Revises: f8ce90ec8532
Create Date: 2020-03-25 19:45:14.041720

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'ab9ecb88d7c1'
down_revision = 'f8ce90ec8532'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_index(op.f('ix_artists_name'), 'artists', ['name'], unique=True)
    op.drop_constraint('artists_name_key', 'artists', type_='unique')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_unique_constraint('artists_name_key', 'artists', ['name'])
    op.drop_index(op.f('ix_artists_name'), table_name='artists')
    # ### end Alembic commands ###
