← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad:db-narrow-bpr-ci-build-unique-index-cleanup into launchpad:db-devel

 

Colin Watson has proposed merging ~cjwatson/launchpad:db-narrow-bpr-ci-build-unique-index-cleanup into launchpad:db-devel.

Commit message:
Drop BPR (ci_build, binarypackagename) index

Requested reviews:
  William Grant (wgrant): db
  Launchpad code reviewers (launchpad-reviewers): db

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

Replaced by a unique index that also includes `BinaryPackageRelease.binpackageformat`.

https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/425220 must be deployed to production first.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:db-narrow-bpr-ci-build-unique-index-cleanup into launchpad:db-devel.
diff --git a/database/schema/patch-2210-44-5.sql b/database/schema/patch-2210-44-5.sql
new file mode 100644
index 0000000..398b9b6
--- /dev/null
+++ b/database/schema/patch-2210-44-5.sql
@@ -0,0 +1,9 @@
+-- Copyright 2022 Canonical Ltd.  This software is licensed under the
+-- GNU Affero General Public License version 3 (see the file LICENSE).
+
+SET client_min_messages=ERROR;
+
+-- Replaced by binarypackagerelease__ci_build__bpn__format__key.
+DROP INDEX binarypackagerelease__ci_build__bpn__key;
+
+INSERT INTO LaunchpadDatabaseRevision VALUES (2210, 44, 5);