← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~wgrant/launchpad/bugsummary-v2-db-2 into lp:launchpad

 

William Grant has proposed merging lp:~wgrant/launchpad/bugsummary-v2-db-2 into lp:launchpad with lp:~wgrant/launchpad/bugsummary-v2-db-1 as a prerequisite.

Requested reviews:
  Stuart Bishop (stub)

For more details, see:
https://code.launchpad.net/~wgrant/launchpad/bugsummary-v2-db-2/+merge/113501

Add a replacement UNIQUE index to bugsummary. This unifies the previous four indices, removes fixed_upstream, and adds access_policy.

This should be applied live after 2209-19-0 and 2209-19-1 are deployed and bugsummaryrebuild has been run. Attempting to apply it before a full rebuild will result in uniqueness conflicts due to non-false fixed_upstream.
-- 
https://code.launchpad.net/~wgrant/launchpad/bugsummary-v2-db-2/+merge/113501
Your team Launchpad code reviewers is subscribed to branch lp:launchpad.
=== added file 'database/schema/patch-2209-19-2.sql'
--- database/schema/patch-2209-19-2.sql	1970-01-01 00:00:00 +0000
+++ database/schema/patch-2209-19-2.sql	2012-07-05 07:18:29 +0000
@@ -0,0 +1,15 @@
+-- Copyright 2012 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 a unified unique index with access_policy and without
+-- fixed_upstream.
+CREATE UNIQUE INDEX bugsummary__unique ON bugsummary USING btree
+    ((COALESCE(product, (-1))), (COALESCE(productseries, (-1))),
+     (COALESCE(distribution, (-1))), (COALESCE(distroseries, (-1))),
+     (COALESCE(sourcepackagename, (-1))), status, importance, has_patch,
+     (COALESCE(tag, ''::text)), (COALESCE(milestone, (-1))),
+     (COALESCE(viewed_by, (-1))), (COALESCE(access_policy, (-1))));
+
+INSERT INTO LaunchpadDatabaseRevision VALUES (2209, 19, 2);


Follow ups