aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2022-06-17 12:51:10 +0100
committerChristopher Baines <mail@cbaines.net>2022-06-17 12:51:10 +0100
commit3b5950024b06ce0d01ece4d15fa4f8cec271b034 (patch)
treed4c3ca86fda094c53f6a29b5ab8d986aaada0783
parent22c2ed2fa7bc2eb448272676b80ee21cc435e18b (diff)
downloaddata-service-3b5950024b06ce0d01ece4d15fa4f8cec271b034.tar
data-service-3b5950024b06ce0d01ece4d15fa4f8cec271b034.tar.gz
Add an index on package_derivations_by_guix_revision_range
This helps render the package version range related pages.
-rw-r--r--sqitch/deploy/package_range_index.sql7
-rw-r--r--sqitch/revert/package_range_index.sql7
-rw-r--r--sqitch/sqitch.plan1
-rw-r--r--sqitch/verify/package_range_index.sql7
4 files changed, 22 insertions, 0 deletions
diff --git a/sqitch/deploy/package_range_index.sql b/sqitch/deploy/package_range_index.sql
new file mode 100644
index 0000000..cb94ba4
--- /dev/null
+++ b/sqitch/deploy/package_range_index.sql
@@ -0,0 +1,7 @@
+-- Deploy guix-data-service:package_range_index to pg
+
+BEGIN;
+
+CREATE INDEX range_package_name_idx ON package_derivations_by_guix_revision_range (package_name);
+
+COMMIT;
diff --git a/sqitch/revert/package_range_index.sql b/sqitch/revert/package_range_index.sql
new file mode 100644
index 0000000..bdbb199
--- /dev/null
+++ b/sqitch/revert/package_range_index.sql
@@ -0,0 +1,7 @@
+-- Revert guix-data-service:package_range_index from pg
+
+BEGIN;
+
+-- XXX Add DDLs here.
+
+COMMIT;
diff --git a/sqitch/sqitch.plan b/sqitch/sqitch.plan
index 1f329a5..f71fcbe 100644
--- a/sqitch/sqitch.plan
+++ b/sqitch/sqitch.plan
@@ -85,3 +85,4 @@ packages_replacement 2021-04-24T04:52:57Z Christopher Baines <mail@cbaines.net>
package_derivations_not_null_hash_index 2021-07-11T14:19:32Z Christopher Baines <mail@cbaines.net> # Add an index to package_derivations
git_branch_id 2022-05-23T18:11:14Z Chris <chris@felis> # Add git_branch.id
partition_package_derivations_by_guix_revision_range 2022-05-23T18:20:37Z Chris <chris@felis> # Partition package_derivations_by_guix_revision_range
+package_range_index 2022-06-17T10:39:31Z Chris <chris@felis> # Add index on package_derivations_by_guix_revision_range.package_name
diff --git a/sqitch/verify/package_range_index.sql b/sqitch/verify/package_range_index.sql
new file mode 100644
index 0000000..d18eaf0
--- /dev/null
+++ b/sqitch/verify/package_range_index.sql
@@ -0,0 +1,7 @@
+-- Verify guix-data-service:package_range_index on pg
+
+BEGIN;
+
+-- XXX Add verifications here.
+
+ROLLBACK;