Debugger Continuity (BE) (#3314)

This commit is contained in:
Jonathan Dobson
2025-08-28 20:05:24 -04:00
committed by GitHub
parent 916ab6c067
commit 1067e9a076
12 changed files with 306 additions and 2 deletions

View File

@@ -785,6 +785,27 @@ class DebugSessionModel(Base):
status = Column(String, nullable=False, default="created")
class BlockRunModel(Base):
"""
When a block is run in the debugger, it runs "as a 'workflow run'", but that
workflow run has just a single block in it. This table ties a block run to
the workflow run, and a particular output parameter id (which gets
overwritten on each run.)
Use the `created_at` timestamp to find the latest workflow run (and output
param id) for a given `(org_id, user_id, block_label)`.
"""
__tablename__ = "block_runs"
organization_id = Column(String, nullable=False)
user_id = Column(String, nullable=False)
block_label = Column(String, nullable=False)
output_parameter_id = Column(String, nullable=False)
workflow_run_id = Column(String, primary_key=True)
created_at = Column(DateTime, default=datetime.datetime.utcnow, nullable=False)
class ScriptModel(Base):
__tablename__ = "scripts"
__table_args__ = (