"""Remove unique constraint on customer,subscription, and benefit

Revision ID: 412c2088be03
Revises: 26cae817076b
Create Date: 2025-12-11 14:57:25.499264

"""

import sqlalchemy as sa
from alembic import op

# Polar Custom Imports

# revision identifiers, used by Alembic.
revision = "412c2088be03"
down_revision = "26cae817076b"
branch_labels: tuple[str] | None = None
depends_on: tuple[str] | None = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(op.f("benefit_grants_sbc_key"), "benefit_grants", type_="unique")
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_unique_constraint(
        op.f("benefit_grants_sbc_key"),
        "benefit_grants",
        ["subscription_id", "customer_id", "benefit_id"],
        postgresql_nulls_not_distinct=False,
    )
    # ### end Alembic commands ###
