"""missing_migrations

Revision ID: f25de6ad895a
Revises: b4983d976db2
Create Date: 2025-11-21 06:34:06.188118

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = 'f25de6ad895a'
down_revision: Union[str, Sequence[str], None] = 'b4983d976db2'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    """Upgrade schema."""
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('idx_policy_assoc_entity_enabled'), table_name='policy_associations')
    op.create_index('idx_policy_assoc_entity_enabled', 'policy_associations', ['entity_type', 'entity_id', 'enabled', sa.literal_column('priority DESC')], unique=False, schema='public')
    # ### end Alembic commands ###


def downgrade() -> None:
    """Downgrade schema."""
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index('idx_policy_assoc_entity_enabled', table_name='policy_associations', schema='public')
    op.create_index(op.f('idx_policy_assoc_entity_enabled'), 'policy_associations', ['entity_type', 'entity_id', 'enabled', sa.literal_column('priority DESC'), sa.literal_column('priority DESC')], unique=False)
    # ### end Alembic commands ###
