From a10586c8eae837cee1434e5c3b8cbd6035821c78 Mon Sep 17 00:00:00 2001 From: QuantumGhost Date: Fri, 29 Aug 2025 14:37:11 +0800 Subject: [PATCH] fixup! feat(api): Add migration for WorkflowDraftVariableFile --- ...1601-76db8b6ed8f1_add_workflowdraftvariablefile.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/api/migrations/versions/2025_08_12_1601-76db8b6ed8f1_add_workflowdraftvariablefile.py b/api/migrations/versions/2025_08_12_1601-76db8b6ed8f1_add_workflowdraftvariablefile.py index fd18c3761c..51063ea49e 100644 --- a/api/migrations/versions/2025_08_12_1601-76db8b6ed8f1_add_workflowdraftvariablefile.py +++ b/api/migrations/versions/2025_08_12_1601-76db8b6ed8f1_add_workflowdraftvariablefile.py @@ -29,7 +29,7 @@ def upgrade(): "tenant_id", models.types.StringUUID(), nullable=False, - comment="The application to which the WorkflowDraftVariableFile belongs, referencing App.id", + comment="The tenant to which the WorkflowDraftVariableFile belongs, referencing Tenant.id", ), sa.Column( "app_id", @@ -71,11 +71,14 @@ def upgrade(): nullable=True, comment="Reference to WorkflowDraftVariableFile if variable is offloaded to external storage", ) - sa.sa.Column( + ) + batch_op.add_column( + sa.Column( "is_default_value", sa.Boolean, - nullable=False - server_default=sa.false(), + nullable=False, + server_default=sa.text(text="FALSE"), + comment="Indicates whether the current value is the default for a conversation variable. Always `FALSE` for other types of variables.", ) ) batch_op.create_index("workflow_draft_variable_file_id_idx", ["file_id"], unique=False)