aboutsummaryrefslogtreecommitdiffstats
path: root/dashboard/app/aidb/migrations/1_initialize.up.sql
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2025-11-19 18:38:25 +0100
committerDmitry Vyukov <dvyukov@google.com>2026-01-05 09:14:02 +0000
commit77200b36494dbf8f7aa1500fbf5976585fffdb66 (patch)
treeb3b17c991bf49a7ef78b297166d26427c808e66e /dashboard/app/aidb/migrations/1_initialize.up.sql
parentd65130ca2efd4a9ccb21068e3d9cefaf365e8dc6 (diff)
dashboard/app: add support for AI workflows
Support for: - polling for AI jobs - handling completion of AI jobs - submitting job trajectory logs - basic visualization for AI jobs
Diffstat (limited to 'dashboard/app/aidb/migrations/1_initialize.up.sql')
-rw-r--r--dashboard/app/aidb/migrations/1_initialize.up.sql41
1 files changed, 40 insertions, 1 deletions
diff --git a/dashboard/app/aidb/migrations/1_initialize.up.sql b/dashboard/app/aidb/migrations/1_initialize.up.sql
index 981cd8d3a..4448242b1 100644
--- a/dashboard/app/aidb/migrations/1_initialize.up.sql
+++ b/dashboard/app/aidb/migrations/1_initialize.up.sql
@@ -1,3 +1,42 @@
-CREATE TABLE Test (
+CREATE TABLE Workflows (
Name STRING(1000) NOT NULL,
+ Type STRING(1000) NOT NULL,
+ LastActive TIMESTAMP NOT NULL,
) PRIMARY KEY (Name);
+
+CREATE TABLE Jobs (
+ ID STRING(36) NOT NULL,
+ Type STRING(1000) NOT NULL,
+ Workflow STRING(1000) NOT NULL,
+ Namespace STRING(1000) NOT NULL,
+ BugID STRING(1000),
+ Description STRING(1000) NOT NULL,
+ Link STRING(1000) NOT NULL,
+ Created TIMESTAMP NOT NULL,
+ Started TIMESTAMP,
+ Finished TIMESTAMP,
+ LLMModel STRING(1000),
+ CodeRevision STRING(1000),
+ Error STRING(MAX),
+ Args JSON,
+ Results JSON,
+) PRIMARY KEY (ID);
+
+CREATE TABLE TrajectorySpans (
+ JobID STRING(36) NOT NULL,
+ Seq INT64 NOT NULL,
+ Nesting INT64 NOT NULL,
+ Type STRING(1000) NOT NULL,
+ Name STRING(1000) NOT NULL,
+ Started TIMESTAMP NOT NULL,
+ Finished TIMESTAMP,
+ Error STRING(MAX),
+ Args JSON,
+ Results JSON,
+ Instruction STRING(MAX),
+ Prompt STRING(MAX),
+ Reply STRING(MAX),
+ Thoughts STRING(MAX),
+
+ CONSTRAINT FK_EventJob FOREIGN KEY (JobID) REFERENCES Jobs (ID),
+) PRIMARY KEY (JobID, Seq);