← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad:db-bmp-git-indexes into launchpad:master

 

Colin Watson has proposed merging ~cjwatson/launchpad:db-bmp-git-indexes into launchpad:master.

Commit message:
Index BranchMergeProposal(*_git_{repository,path})

These are used by GitCollection.getMergeProposals.

LP: #1847090

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  Bug #1847090 in Launchpad itself: "/maas-project/+activereviews times out"
  https://bugs.launchpad.net/launchpad/+bug/1847090

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/373736

We can apply this DB patch live.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:db-bmp-git-indexes into launchpad:master.
diff --git a/database/schema/patch-2210-01-2.sql b/database/schema/patch-2210-01-2.sql
new file mode 100644
index 0000000..5350730
--- /dev/null
+++ b/database/schema/patch-2210-01-2.sql
@@ -0,0 +1,13 @@
+-- Copyright 2019 Canonical Ltd.  This software is licensed under the
+-- GNU Affero General Public License version 3 (see the file LICENSE).
+
+SET client_min_messages=ERROR;
+
+CREATE INDEX branchmergeproposal__source_git_repository__source_git_path__idx
+    ON BranchMergeProposal (source_git_repository, source_git_path);
+CREATE INDEX branchmergeproposal__target_git_repository__target_git_path__idx
+    ON BranchMergeProposal (target_git_repository, target_git_path);
+CREATE INDEX branchmergeproposal__dependent_git_repository__dependent_git_path__idx
+    ON BranchMergeProposal (dependent_git_repository, dependent_git_path);
+
+INSERT INTO LaunchpadDatabaseRevision VALUES (2210, 01, 2);