about summary refs log tree commit diff
path: root/gn_libs
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2025-03-25 12:55:25 -0500
committerFrederick Muriuki Muriithi2025-03-25 12:55:47 -0500
commitd4b7312423d5aef91b264bb21429e79ec65cec7c (patch)
treecb7e2e5c334acd994b7aa426eae6d22eded9975f /gn_libs
parent594a0f9632785a4acb6d99ddd6d5171138339b60 (diff)
downloadgn-libs-d4b7312423d5aef91b264bb21429e79ec65cec7c.tar.gz
Update jobs database schema.
Diffstat (limited to 'gn_libs')
-rw-r--r--gn_libs/jobs/migrations.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/gn_libs/jobs/migrations.py b/gn_libs/jobs/migrations.py
index cc463e3..86fb958 100644
--- a/gn_libs/jobs/migrations.py
+++ b/gn_libs/jobs/migrations.py
@@ -38,13 +38,13 @@ def __create_table_jobs_output_streams__(cursor: DbCursor):
     cursor.execute(
         """
         CREATE TABLE IF NOT EXISTS jobs_standard_outputs(
-          job_id TEXT PRIMARY KEY,
+          job_id TEXT NOT NULL,
           output_stream TEXT,
-          timestamp TEXT,
           value TEXT,
           FOREIGN KEY(job_id) REFERENCES jobs(job_id)
             ON UPDATE CASCADE ON DELETE RESTRICT,
-          CHECK (output_stream IN ('stdout', 'stderr'))
+          CHECK (output_stream IN ('stdout', 'stderr')),
+          PRIMARY KEY(job_id, output_stream)
         ) WITHOUT ROWID
         """)
     cursor.execute(