"""Add content_pages table for CMS

Revision ID: fef1d20ce8b4
Revises: fa7d4d10e358
Create Date: 2025-11-22 13:41:18.069674

"""

from collections.abc import Sequence

from alembic import op

# revision identifiers, used by Alembic.
revision: str = "fef1d20ce8b4"
down_revision: str | None = "fa7d4d10e358"
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.drop_index("idx_roles_vendor_name", table_name="roles")
    op.drop_index("idx_vendor_users_invitation_token", table_name="vendor_users")
    op.create_index(
        op.f("ix_vendor_users_invitation_token"),
        "vendor_users",
        ["invitation_token"],
        unique=False,
    )
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f("ix_vendor_users_invitation_token"), table_name="vendor_users")
    op.create_index(
        "idx_vendor_users_invitation_token",
        "vendor_users",
        ["invitation_token"],
        unique=False,
    )
    op.create_index(
        "idx_roles_vendor_name", "roles", ["vendor_id", "name"], unique=False
    )
    # ### end Alembic commands ###
