aboutsummaryrefslogtreecommitdiff
path: root/sqitch/deploy
diff options
context:
space:
mode:
Diffstat (limited to 'sqitch/deploy')
-rw-r--r--sqitch/deploy/blocked_builds.sql19
1 files changed, 19 insertions, 0 deletions
diff --git a/sqitch/deploy/blocked_builds.sql b/sqitch/deploy/blocked_builds.sql
new file mode 100644
index 0000000..d3fa429
--- /dev/null
+++ b/sqitch/deploy/blocked_builds.sql
@@ -0,0 +1,19 @@
+-- Deploy guix-data-service:blocked_builds to pg
+
+BEGIN;
+
+CREATE TABLE blocked_builds (
+ build_server_id integer NOT NULL REFERENCES build_servers (id),
+ blocked_derivation_output_details_set_id integer NOT NULL REFERENCES derivation_output_details_sets (id),
+ blocking_derivation_output_details_set_id integer NOT NULL REFERENCES derivation_output_details_sets (id),
+ PRIMARY KEY (
+ build_server_id,
+ blocked_derivation_output_details_set_id,
+ blocking_derivation_output_details_set_id
+ )
+) PARTITION BY LIST (build_server_id);
+
+CREATE INDEX blocked_builds_blocked_derivation_output_details_set_id
+ ON blocked_builds (build_server_id, blocked_derivation_output_details_set_id);
+
+COMMIT;