"""add build request latency to step metrics

Revision ID: 750dd87faa12
Revises: 5b804970e6a0
Create Date: 2025-09-06 14:28:32.119084

"""

from typing import Sequence, Union

import sqlalchemy as sa

from alembic import op

# revision identifiers, used by Alembic.
revision: str = "750dd87faa12"
down_revision: Union[str, None] = "5b804970e6a0"
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.add_column("step_metrics", sa.Column("step_start_ns", sa.BigInteger(), nullable=True))
    op.add_column("step_metrics", sa.Column("llm_request_start_ns", sa.BigInteger(), nullable=True))
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column("step_metrics", "step_start_ns")
    op.drop_column("step_metrics", "llm_request_start_ns")
    # ### end Alembic commands ###
