"""add columns to task_runs table

Revision ID: 67784da0203e
Revises: 1faa2a5869cd
Create Date: 2025-12-09 23:08:29.686747+00:00

"""

from typing import Sequence, Union

import sqlalchemy as sa

from alembic import op

# revision identifiers, used by Alembic.
revision: str = "67784da0203e"
down_revision: Union[str, None] = "1faa2a5869cd"
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("task_runs", sa.Column("instance_type", sa.String(), nullable=True))
    op.add_column("task_runs", sa.Column("vcpu_millicores", sa.Integer(), nullable=True))
    op.add_column("task_runs", sa.Column("duration_ms", sa.BigInteger(), nullable=True))
    op.add_column("task_runs", sa.Column("compute_cost", sa.Numeric(), nullable=True))
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column("task_runs", "compute_cost")
    op.drop_column("task_runs", "duration_ms")
    op.drop_column("task_runs", "vcpu_millicores")
    op.drop_column("task_runs", "instance_type")
    # ### end Alembic commands ###
