"""Add case cursor pagination index

Revision ID: 13022d1ff78d
Revises: d1693ed72940
Create Date: 2025-06-27 23:01:41.503357

"""

from collections.abc import Sequence

from alembic import op

# revision identifiers, used by Alembic.
revision: str = "13022d1ff78d"
down_revision: str | None = "d1693ed72940"
branch_labels: str | Sequence[str] | None = None
depends_on: str | Sequence[str] | None = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_index(
        "idx_case_cursor_pagination",
        "cases",
        ["owner_id", "created_at", "id"],
        unique=False,
    )
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index("idx_case_cursor_pagination", table_name="cases")
    # ### end Alembic commands ###
