"""prefix_provider

Revision ID: f8013173ef21
Revises: 9227d42a8935
Create Date: 2017-08-27 14:12:28.917330

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = "f8013173ef21"
down_revision = "9227d42a8935"
branch_labels = ()
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint("unq_repo_name", "repository", type_="unique")
    op.create_unique_constraint(
        "unq_repo_name", "repository", ["provider", "owner_name", "name"]
    )


# ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint("unq_repo_name", "repository", type_="unique")
    op.create_unique_constraint("unq_repo_name", "repository", ["owner_name", "name"])


# ### end Alembic commands ###
