"""add last_stop_reason to agent state

Revision ID: 89fd4648866b
Revises: f6cd5a1e519d
Create Date: 2025-10-27 16:55:54.383688

"""

from typing import Sequence, Union

import sqlalchemy as sa

from alembic import op

# revision identifiers, used by Alembic.
revision: str = "89fd4648866b"
down_revision: Union[str, None] = "f6cd5a1e519d"
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("agents", sa.Column("last_stop_reason", sa.String(), nullable=True))
    # ### end Alembic commands ###


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