"""empty message

Revision ID: f66732ff5915
Revises: 8f5e1688ea9d
Create Date: 2025-05-28 16:18:58.047985

"""

import sqlalchemy as sa
from alembic import op

# Polar Custom Imports

# revision identifiers, used by Alembic.
revision = "f66732ff5915"
down_revision = "8f5e1688ea9d"
branch_labels: tuple[str] | None = None
depends_on: tuple[str] | None = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(
        "ix_notification_recipients_expo_push_token",
        table_name="notification_recipients",
    )
    op.create_index(
        "ix_notification_recipients_expo_push_token",
        "notification_recipients",
        ["user_id", "expo_push_token", "deleted_at"],
        unique=True,
        postgresql_nulls_not_distinct=True,
    )
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(
        "ix_notification_recipients_expo_push_token",
        table_name="notification_recipients",
        postgresql_nulls_not_distinct=True,
    )
    op.create_index(
        "ix_notification_recipients_expo_push_token",
        "notification_recipients",
        ["expo_push_token"],
        unique=True,
    )
    # ### end Alembic commands ###
