"""add trace filter indexes

Revision ID: e118961e5dcd
Revises: bf86fb585ed9
Create Date: 2026-02-24 23:02:30.642660
"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = 'e118961e5dcd'
down_revision: Union[str, None] = 'bf86fb585ed9'
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_traces_project_started', 'traces', ['project_id', 'started_at'], unique=False)
    op.create_index('ix_traces_project_status', 'traces', ['project_id', 'status'], unique=False)
    op.create_index('ix_traces_project_user_id', 'traces', ['project_id', 'user_id'], unique=False)
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index('ix_traces_project_user_id', table_name='traces')
    op.drop_index('ix_traces_project_status', table_name='traces')
    op.drop_index('ix_traces_project_started', table_name='traces')
    # ### end Alembic commands ###
