aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2020-12-21 13:27:35 +0000
committerChristopher Baines <mail@cbaines.net>2020-12-21 13:27:35 +0000
commitf01203650a9b687f292d029864aa3e8283df51d9 (patch)
tree3bff7337f08303a5fab0f8d9a77b5b286eb57e50
parent24d17bf6cfc46bf36c499c883bdf4d726446548e (diff)
downloadbuild-coordinator-f01203650a9b687f292d029864aa3e8283df51d9.tar
build-coordinator-f01203650a9b687f292d029864aa3e8283df51d9.tar.gz
Add an index on build_tags.build_id
This makes fetching the tags for a build faster.
-rw-r--r--sqitch/pg/deploy/add_build_tags_build_id_idx.sql7
-rw-r--r--sqitch/pg/revert/add_build_tags_build_id_idx.sql7
-rw-r--r--sqitch/pg/verify/add_build_tags_build_id_idx.sql7
-rw-r--r--sqitch/sqitch.plan1
-rw-r--r--sqitch/sqlite/deploy/add_build_tags_build_id_idx.sql7
-rw-r--r--sqitch/sqlite/revert/add_build_tags_build_id_idx.sql7
-rw-r--r--sqitch/sqlite/verify/add_build_tags_build_id_idx.sql7
7 files changed, 43 insertions, 0 deletions
diff --git a/sqitch/pg/deploy/add_build_tags_build_id_idx.sql b/sqitch/pg/deploy/add_build_tags_build_id_idx.sql
new file mode 100644
index 0000000..a46063d
--- /dev/null
+++ b/sqitch/pg/deploy/add_build_tags_build_id_idx.sql
@@ -0,0 +1,7 @@
+-- Deploy guix-build-coordinator:add_build_tags_build_id_idx to pg
+
+BEGIN;
+
+-- XXX Add DDLs here.
+
+COMMIT;
diff --git a/sqitch/pg/revert/add_build_tags_build_id_idx.sql b/sqitch/pg/revert/add_build_tags_build_id_idx.sql
new file mode 100644
index 0000000..7a26fb1
--- /dev/null
+++ b/sqitch/pg/revert/add_build_tags_build_id_idx.sql
@@ -0,0 +1,7 @@
+-- Revert guix-build-coordinator:add_build_tags_build_id_idx from pg
+
+BEGIN;
+
+-- XXX Add DDLs here.
+
+COMMIT;
diff --git a/sqitch/pg/verify/add_build_tags_build_id_idx.sql b/sqitch/pg/verify/add_build_tags_build_id_idx.sql
new file mode 100644
index 0000000..6a85f48
--- /dev/null
+++ b/sqitch/pg/verify/add_build_tags_build_id_idx.sql
@@ -0,0 +1,7 @@
+-- Verify guix-build-coordinator:add_build_tags_build_id_idx on pg
+
+BEGIN;
+
+-- XXX Add verifications here.
+
+ROLLBACK;
diff --git a/sqitch/sqitch.plan b/sqitch/sqitch.plan
index 95a522c..42ef7ad 100644
--- a/sqitch/sqitch.plan
+++ b/sqitch/sqitch.plan
@@ -23,3 +23,4 @@ build_allocation_agent_requested_systems 2020-07-02T19:45:02Z Christopher Baines
add_fixed_output_to_derivations 2020-07-18T14:49:51Z Christopher Baines <mail@cbaines.net> # Add derivations.fixed_output
add_unbuilt_outputs_table 2020-11-06T18:58:08Z Christopher Baines <mail@cbaines.net> # Add unbuilt_outputs
support_build_cancelation 2020-12-11T18:25:42Z Christopher Baines <mail@cbaines.net> # Add builds.canceled
+add_build_tags_build_id_idx 2020-12-21T13:20:54Z Christopher Baines <mail@cbaines.net> # Add an index on build_tags.build_id
diff --git a/sqitch/sqlite/deploy/add_build_tags_build_id_idx.sql b/sqitch/sqlite/deploy/add_build_tags_build_id_idx.sql
new file mode 100644
index 0000000..944be21
--- /dev/null
+++ b/sqitch/sqlite/deploy/add_build_tags_build_id_idx.sql
@@ -0,0 +1,7 @@
+-- Deploy guix-build-coordinator:add_build_tags_build_id_idx to sqlite
+
+BEGIN;
+
+CREATE INDEX build_tags_build_id_idx ON build_tags (build_id);
+
+COMMIT;
diff --git a/sqitch/sqlite/revert/add_build_tags_build_id_idx.sql b/sqitch/sqlite/revert/add_build_tags_build_id_idx.sql
new file mode 100644
index 0000000..c0033a1
--- /dev/null
+++ b/sqitch/sqlite/revert/add_build_tags_build_id_idx.sql
@@ -0,0 +1,7 @@
+-- Revert guix-build-coordinator:add_build_tags_build_id_idx from sqlite
+
+BEGIN;
+
+-- XXX Add DDLs here.
+
+COMMIT;
diff --git a/sqitch/sqlite/verify/add_build_tags_build_id_idx.sql b/sqitch/sqlite/verify/add_build_tags_build_id_idx.sql
new file mode 100644
index 0000000..23425ae
--- /dev/null
+++ b/sqitch/sqlite/verify/add_build_tags_build_id_idx.sql
@@ -0,0 +1,7 @@
+-- Verify guix-build-coordinator:add_build_tags_build_id_idx on sqlite
+
+BEGIN;
+
+-- XXX Add verifications here.
+
+ROLLBACK;