aboutsummaryrefslogtreecommitdiff
path: root/sqitch
diff options
context:
space:
mode:
Diffstat (limited to 'sqitch')
-rw-r--r--sqitch/pg/deploy/system_uptime.sql7
-rw-r--r--sqitch/pg/revert/system_uptime.sql7
-rw-r--r--sqitch/pg/verify/system_uptime.sql7
-rw-r--r--sqitch/sqitch.plan1
-rw-r--r--sqitch/sqlite/deploy/system_uptime.sql16
-rw-r--r--sqitch/sqlite/revert/system_uptime.sql7
-rw-r--r--sqitch/sqlite/verify/system_uptime.sql7
7 files changed, 52 insertions, 0 deletions
diff --git a/sqitch/pg/deploy/system_uptime.sql b/sqitch/pg/deploy/system_uptime.sql
new file mode 100644
index 0000000..916781c
--- /dev/null
+++ b/sqitch/pg/deploy/system_uptime.sql
@@ -0,0 +1,7 @@
+-- Deploy guix-build-coordinator:system_uptime to pg
+
+BEGIN;
+
+-- XXX Add DDLs here.
+
+COMMIT;
diff --git a/sqitch/pg/revert/system_uptime.sql b/sqitch/pg/revert/system_uptime.sql
new file mode 100644
index 0000000..2c74279
--- /dev/null
+++ b/sqitch/pg/revert/system_uptime.sql
@@ -0,0 +1,7 @@
+-- Revert guix-build-coordinator:system_uptime from pg
+
+BEGIN;
+
+-- XXX Add DDLs here.
+
+COMMIT;
diff --git a/sqitch/pg/verify/system_uptime.sql b/sqitch/pg/verify/system_uptime.sql
new file mode 100644
index 0000000..5676906
--- /dev/null
+++ b/sqitch/pg/verify/system_uptime.sql
@@ -0,0 +1,7 @@
+-- Verify guix-build-coordinator:system_uptime on pg
+
+BEGIN;
+
+-- XXX Add verifications here.
+
+ROLLBACK;
diff --git a/sqitch/sqitch.plan b/sqitch/sqitch.plan
index 8c7d459..c7604f4 100644
--- a/sqitch/sqitch.plan
+++ b/sqitch/sqitch.plan
@@ -44,3 +44,4 @@ build_results_counts 2022-10-28T09:36:35Z Chris <chris@felis> # Add build_result
replace_agent_status 2023-03-22T14:17:35Z Chris <chris@felis> # Replace agent_status
agent_status_add_processor_count 2023-03-24T09:28:47Z Chris <chris@felis> # Add agent_status.processor_count
remove_build_allocation_plan 2023-04-23T19:50:23Z Chris <chris@felis> # Remove build_allocation_plan
+system_uptime 2023-05-05T18:18:35Z Chris <chris@felis> # Add system uptime
diff --git a/sqitch/sqlite/deploy/system_uptime.sql b/sqitch/sqlite/deploy/system_uptime.sql
new file mode 100644
index 0000000..80214b0
--- /dev/null
+++ b/sqitch/sqlite/deploy/system_uptime.sql
@@ -0,0 +1,16 @@
+-- Deploy guix-build-coordinator:system_uptime to sqlite
+
+BEGIN;
+
+DROP TABLE agent_status;
+
+CREATE TABLE agent_status (
+ agent_id TEXT PRIMARY KEY ASC REFERENCES agents (id),
+ timestamp DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ status TEXT NOT NULL,
+ load_average_1min INTEGER,
+ system_uptime INTEGER,
+ processor_count INTEGER
+);
+
+COMMIT;
diff --git a/sqitch/sqlite/revert/system_uptime.sql b/sqitch/sqlite/revert/system_uptime.sql
new file mode 100644
index 0000000..418f77a
--- /dev/null
+++ b/sqitch/sqlite/revert/system_uptime.sql
@@ -0,0 +1,7 @@
+-- Revert guix-build-coordinator:system_uptime from sqlite
+
+BEGIN;
+
+-- XXX Add DDLs here.
+
+COMMIT;
diff --git a/sqitch/sqlite/verify/system_uptime.sql b/sqitch/sqlite/verify/system_uptime.sql
new file mode 100644
index 0000000..0c4870c
--- /dev/null
+++ b/sqitch/sqlite/verify/system_uptime.sql
@@ -0,0 +1,7 @@
+-- Verify guix-build-coordinator:system_uptime on sqlite
+
+BEGIN;
+
+-- XXX Add verifications here.
+
+ROLLBACK;