"""add query optimizing runs listing

Revision ID: f9ad1c25fd2b
Revises: 3bc3c031fbe4
Create Date: 2025-10-04 00:44:06.663817

"""

from typing import Sequence, Union

import sqlalchemy as sa

from alembic import op

# revision identifiers, used by Alembic.
revision: str = "f9ad1c25fd2b"
down_revision: Union[str, None] = "3bc3c031fbe4"
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_messages_run_err_sequence", "messages", ["run_id", "is_err", "sequence_id"], unique=False)
    # ### end Alembic commands ###


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