aboutsummaryrefslogtreecommitdiff
path: root/sqitch/sqlite
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2020-06-27 21:33:24 +0100
committerChristopher Baines <mail@cbaines.net>2020-07-01 17:43:38 +0100
commitb5c4e8a4528e2c819176cbe070f6fd8e3e34facd (patch)
tree9d026e882411fc79b0736cdc9c97352d64ca7ef1 /sqitch/sqlite
parentab51128ee62b22971ea8b52d550e09d1c38f8ecd (diff)
downloadbuild-coordinator-b5c4e8a4528e2c819176cbe070f6fd8e3e34facd.tar
build-coordinator-b5c4e8a4528e2c819176cbe070f6fd8e3e34facd.tar.gz
Support storing when builds start
This isn't particularly accurate, what's actually being stored is the current time when the record is inserted in to the coordinator database, but that should happen just before the agent starts the build, so hopefully that's good enough.
Diffstat (limited to 'sqitch/sqlite')
-rw-r--r--sqitch/sqlite/deploy/build_starts.sql12
-rw-r--r--sqitch/sqlite/revert/build_starts.sql7
-rw-r--r--sqitch/sqlite/verify/build_starts.sql7
3 files changed, 26 insertions, 0 deletions
diff --git a/sqitch/sqlite/deploy/build_starts.sql b/sqitch/sqlite/deploy/build_starts.sql
new file mode 100644
index 0000000..fbf8e8c
--- /dev/null
+++ b/sqitch/sqlite/deploy/build_starts.sql
@@ -0,0 +1,12 @@
+-- Deploy guix-build-coordinator:build_starts to sqlite
+
+BEGIN;
+
+CREATE TABLE build_starts (
+ id INTEGER PRIMARY KEY ASC,
+ build_id TEXT NOT NULL REFERENCES builds (uuid),
+ agent_id TEXT NOT NULL REFERENCES agents (id),
+ start_time TEXT NOT NULL
+);
+
+COMMIT;
diff --git a/sqitch/sqlite/revert/build_starts.sql b/sqitch/sqlite/revert/build_starts.sql
new file mode 100644
index 0000000..49d8eea
--- /dev/null
+++ b/sqitch/sqlite/revert/build_starts.sql
@@ -0,0 +1,7 @@
+-- Revert guix-build-coordinator:build_starts from sqlite
+
+BEGIN;
+
+-- XXX Add DDLs here.
+
+COMMIT;
diff --git a/sqitch/sqlite/verify/build_starts.sql b/sqitch/sqlite/verify/build_starts.sql
new file mode 100644
index 0000000..e4d9460
--- /dev/null
+++ b/sqitch/sqlite/verify/build_starts.sql
@@ -0,0 +1,7 @@
+-- Verify guix-build-coordinator:build_starts on sqlite
+
+BEGIN;
+
+-- XXX Add verifications here.
+
+ROLLBACK;