"""add tool indexes for organization_id

Revision ID: af842aa6f743
Revises: 175dd10fb916
Create Date: 2025-12-07 15:30:43.407495

"""

from typing import Sequence, Union

import sqlalchemy as sa

from alembic import op

# revision identifiers, used by Alembic.
revision: str = "af842aa6f743"
down_revision: Union[str, None] = "175dd10fb916"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_index("ix_tools_organization_id", "tools", ["organization_id"], unique=False)
    op.create_index("ix_tools_organization_id_name", "tools", ["organization_id", "name"], unique=False)
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_index(op.f("ix_step_metrics_run_id"), "step_metrics", ["run_id"], unique=False)
    op.create_index(op.f("idx_messages_step_id"), "messages", ["step_id"], unique=False)
    # ### end Alembic commands ###
