diff options
-rw-r--r-- | guix-build-coordinator/datastore/sqlite.scm | 16 | ||||
-rw-r--r-- | sqitch/pg/deploy/remove_build_allocation_plan.sql | 7 | ||||
-rw-r--r-- | sqitch/pg/revert/remove_build_allocation_plan.sql | 7 | ||||
-rw-r--r-- | sqitch/pg/verify/remove_build_allocation_plan.sql | 7 | ||||
-rw-r--r-- | sqitch/sqitch.plan | 1 | ||||
-rw-r--r-- | sqitch/sqlite/deploy/remove_build_allocation_plan.sql | 7 | ||||
-rw-r--r-- | sqitch/sqlite/revert/remove_build_allocation_plan.sql | 7 | ||||
-rw-r--r-- | sqitch/sqlite/verify/remove_build_allocation_plan.sql | 7 |
8 files changed, 59 insertions, 0 deletions
diff --git a/guix-build-coordinator/datastore/sqlite.scm b/guix-build-coordinator/datastore/sqlite.scm index 3221f9c..5772402 100644 --- a/guix-build-coordinator/datastore/sqlite.scm +++ b/guix-build-coordinator/datastore/sqlite.scm @@ -144,6 +144,19 @@ (sqlite-exec db "PRAGMA synchronous = NORMAL;") (sqlite-exec db "PRAGMA temp_store = MEMORY;") (sqlite-exec db "PRAGMA foreign_keys = ON;") + + (sqlite-exec db "ATTACH DATABASE 'file:/mem?vfs=memdb' AS mem;") + + (sqlite-exec + db + " +CREATE TABLE IF NOT EXISTS mem.build_allocation_plan ( + build_id INTEGER NOT NULL, + agent_id TEXT NOT NULL, + ordering INTEGER NOT NULL, + PRIMARY KEY (agent_id, build_id) +);") + (list db))) #:destructor (let ((writer-thread-destructor-counter @@ -189,6 +202,9 @@ (sqlite-exec db "PRAGMA temp_store = MEMORY;") (sqlite-exec db "PRAGMA busy_timeout = 4000;") (sqlite-exec db "PRAGMA cache_size = -16000;") + + (sqlite-exec db "ATTACH DATABASE 'file:/mem?vfs=memdb' AS mem;") + (list db))) #:destructor (let ((reader-thread-destructor-counter diff --git a/sqitch/pg/deploy/remove_build_allocation_plan.sql b/sqitch/pg/deploy/remove_build_allocation_plan.sql new file mode 100644 index 0000000..e622503 --- /dev/null +++ b/sqitch/pg/deploy/remove_build_allocation_plan.sql @@ -0,0 +1,7 @@ +-- Deploy guix-build-coordinator:remove_build_allocation_plan to pg + +BEGIN; + +-- XXX Add DDLs here. + +COMMIT; diff --git a/sqitch/pg/revert/remove_build_allocation_plan.sql b/sqitch/pg/revert/remove_build_allocation_plan.sql new file mode 100644 index 0000000..a0bb43d --- /dev/null +++ b/sqitch/pg/revert/remove_build_allocation_plan.sql @@ -0,0 +1,7 @@ +-- Revert guix-build-coordinator:remove_build_allocation_plan from pg + +BEGIN; + +-- XXX Add DDLs here. + +COMMIT; diff --git a/sqitch/pg/verify/remove_build_allocation_plan.sql b/sqitch/pg/verify/remove_build_allocation_plan.sql new file mode 100644 index 0000000..45b47b0 --- /dev/null +++ b/sqitch/pg/verify/remove_build_allocation_plan.sql @@ -0,0 +1,7 @@ +-- Verify guix-build-coordinator:remove_build_allocation_plan on pg + +BEGIN; + +-- XXX Add verifications here. + +ROLLBACK; diff --git a/sqitch/sqitch.plan b/sqitch/sqitch.plan index 1591710..8c7d459 100644 --- a/sqitch/sqitch.plan +++ b/sqitch/sqitch.plan @@ -43,3 +43,4 @@ build_counts 2022-10-28T09:36:25Z Chris <chris@felis> # Add builds_counts build_results_counts 2022-10-28T09:36:35Z Chris <chris@felis> # Add build_results_counts 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 diff --git a/sqitch/sqlite/deploy/remove_build_allocation_plan.sql b/sqitch/sqlite/deploy/remove_build_allocation_plan.sql new file mode 100644 index 0000000..8bdc7c7 --- /dev/null +++ b/sqitch/sqlite/deploy/remove_build_allocation_plan.sql @@ -0,0 +1,7 @@ +-- Deploy guix-build-coordinator:remove_build_allocation_plan to sqlite + +BEGIN; + +DROP TABLE build_allocation_plan; + +COMMIT; diff --git a/sqitch/sqlite/revert/remove_build_allocation_plan.sql b/sqitch/sqlite/revert/remove_build_allocation_plan.sql new file mode 100644 index 0000000..46a102e --- /dev/null +++ b/sqitch/sqlite/revert/remove_build_allocation_plan.sql @@ -0,0 +1,7 @@ +-- Revert guix-build-coordinator:remove_build_allocation_plan from sqlite + +BEGIN; + +-- XXX Add DDLs here. + +COMMIT; diff --git a/sqitch/sqlite/verify/remove_build_allocation_plan.sql b/sqitch/sqlite/verify/remove_build_allocation_plan.sql new file mode 100644 index 0000000..7158794 --- /dev/null +++ b/sqitch/sqlite/verify/remove_build_allocation_plan.sql @@ -0,0 +1,7 @@ +-- Verify guix-build-coordinator:remove_build_allocation_plan on sqlite + +BEGIN; + +-- XXX Add verifications here. + +ROLLBACK; |