补齐平台模板与场景 DSL、预算控制、执行看板和企业场景脚本,增强 Windows 启动/迁移与前端代理和聊天会话记忆,修复执行创建阶段 500 与异步链路排障体验。 Made-with: Cursor
40 lines
944 B
Python
40 lines
944 B
Python
"""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,
|
||
)
|