Files
aiagent/backend/alembic/versions/007_add_execution_pause_state.py
renjianbo 0608161c82 feat: 完善企业场景多线路由与执行稳定性
补齐平台模板与场景 DSL、预算控制、执行看板和企业场景脚本,增强 Windows 启动/迁移与前端代理和聊天会话记忆,修复执行创建阶段 500 与异步链路排障体验。

Made-with: Cursor
2026-04-09 21:58:53 +08:00

40 lines
944 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""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,
)