"""add execution pause_state for HITL Revision ID: 007_add_execution_pause_state Revises: 006_add_execution_parent_depth Create Date: 2026-04-08 """ from alembic import op import sqlalchemy as sa revision = "007_add_execution_pause_state" down_revision = "006_add_execution_parent_depth" branch_labels = None depends_on = None def upgrade() -> None: op.add_column( "executions", sa.Column("pause_state", sa.JSON(), nullable=True, comment="挂起快照(审批节点 HITL)"), ) op.alter_column( "executions", "status", existing_type=sa.String(length=20), type_=sa.String(length=32), existing_nullable=False, ) def downgrade() -> None: op.drop_column("executions", "pause_state") op.alter_column( "executions", "status", existing_type=sa.String(length=32), type_=sa.String(length=20), existing_nullable=False, )