diff options
author | Christopher Baines <mail@cbaines.net> | 2019-12-04 22:03:52 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2019-12-12 20:07:22 +0000 |
commit | 299f9dc4807627f0f6ee3c4040893461de55f997 (patch) | |
tree | a748fcd45058cb5b65517a903c58cc67571ea9b6 | |
parent | 716eb3c3b661ab6bd5cce9235640bccbe4d478b0 (diff) | |
download | data-service-299f9dc4807627f0f6ee3c4040893461de55f997.tar data-service-299f9dc4807627f0f6ee3c4040893461de55f997.tar.gz |
Add an index on the derivation_file_name field in the builds table
As this helps when finding builds relating to specific derivations.
4 files changed, 22 insertions, 0 deletions
diff --git a/sqitch/deploy/add_index_on_builds_derivation_file_name.sql b/sqitch/deploy/add_index_on_builds_derivation_file_name.sql new file mode 100644 index 0000000..be76be8 --- /dev/null +++ b/sqitch/deploy/add_index_on_builds_derivation_file_name.sql @@ -0,0 +1,7 @@ +-- Deploy guix-data-service:add_index_on_builds_derivation_file_name to pg + +BEGIN; + +CREATE INDEX builds_derivation_file_name ON builds(derivation_file_name); + +COMMIT; diff --git a/sqitch/revert/add_index_on_builds_derivation_file_name.sql b/sqitch/revert/add_index_on_builds_derivation_file_name.sql new file mode 100644 index 0000000..6aedcb3 --- /dev/null +++ b/sqitch/revert/add_index_on_builds_derivation_file_name.sql @@ -0,0 +1,7 @@ +-- Revert guix-data-service:add_index_on_builds_derivation_file_name from pg + +BEGIN; + +DROP INDEX builds_derivation_file_name; + +COMMIT; diff --git a/sqitch/sqitch.plan b/sqitch/sqitch.plan index c6de817..e79df69 100644 --- a/sqitch/sqitch.plan +++ b/sqitch/sqitch.plan @@ -30,3 +30,4 @@ channel_news_tables 2019-11-15T07:32:07Z Christopher Baines <mail@cbaines.net> # build_server_token_seeds 2019-11-23T09:26:48Z Christopher Baines <mail@cbaines.net> # Add build_server_token_seeds table rework_builds 2019-11-23T20:41:20Z Christopher Baines <mail@cbaines.net> # Rework the build tables nar_related_tables 2019-11-29T20:28:19Z Christopher Baines <mail@cbaines.net> # Add nar related tables +add_index_on_builds_derivation_file_name 2019-12-03T16:23:55Z <chris@phact> # Add index on builds_derivation_file_name diff --git a/sqitch/verify/add_index_on_builds_derivation_file_name.sql b/sqitch/verify/add_index_on_builds_derivation_file_name.sql new file mode 100644 index 0000000..3f03487 --- /dev/null +++ b/sqitch/verify/add_index_on_builds_derivation_file_name.sql @@ -0,0 +1,7 @@ +-- Verify guix-data-service:add_index_on_builds_derivation_file_name on pg + +BEGIN; + +-- XXX Add verifications here. + +ROLLBACK; |