feat(api): Add `node_execution_id` column to `WorkflowDraftVariable`

Introduce a `node_execution_id` column to the `WorkflowDraftVariable` table
to enable efficient implementation of the "reset to last run value" functionality.

This optimization avoids querying the potentially large `workflow_node_executions`
table, which is particularly beneficial for scaling in our SaaS environment.
pull/20746/head
QuantumGhost 12 months ago
parent 85859b6723
commit e6308d938c

@ -892,6 +892,7 @@ class WorkflowDraftVariable(Base):
# visible
visible: Mapped[bool] = mapped_column(sa.Boolean, nullable=False, default=True)
editable: Mapped[bool] = mapped_column(sa.Boolean, nullable=False, default=False)
node_execution_id: Mapped[str] = mapped_column(StringUUID, nullable=False)
def get_selector(self) -> list[str]:
selector = json.loads(self.selector)

Loading…
Cancel
Save