Merge lp:~adeuring/launchpad/bug-596944-schema into lp:launchpad/db-devel

Proposed by Abel Deuring
Status: Merged
Approved by: Abel Deuring
Approved revision: no longer in the source branch.
Merged at revision: 9995
Proposed branch: lp:~adeuring/launchpad/bug-596944-schema
Merge into: lp:launchpad/db-devel
Diff against target: 41 lines (+18/-1)
2 files modified
database/schema/comments.sql (+2/-1)
database/schema/patch-2208-31-0.sql (+16/-0)
To merge this branch: bzr merge lp:~adeuring/launchpad/bug-596944-schema
Reviewer Review Type Date Requested Status
Stuart Bishop (community) db Approve
Robert Collins Pending
Review via email: mp+41481@code.launchpad.net

Commit message

[r=stub][ui=none][bug=596944] Add a column enable_bugfiling_duplicate_search to the tables Product and DistributionSourcePackage.

Description of the change

See bug 596944 and https://dev.launchpad.net/LEP/DisableFilebugDuplicateSearchOption :
For some projects and source package a search for duplicate during bug filing is doing more harm than helping. This branch adds a column "file_bug_duplicate_search" to the tables Product and DistributionSourcePackage.

To post a comment you must log in.
Revision history for this message
Robert Collins (lifeless) wrote :

The column name is a bit opaque. Lets make it clearer - e.g.
'disable_bugfiling_duplicate_search'.

-Rob

Revision history for this message
Abel Deuring (adeuring) wrote :

On 22.11.2010 18:16, Robert Collins wrote:
> The column name is a bit opaque. Lets make it clearer - e.g.
> 'disable_bugfiling_duplicate_search'.

Changed

Revision history for this message
Stuart Bishop (stub) wrote :

If we want to be consistent though, it should be enable_bugfiling_duplicate_search (closest match in the current schema is enable_bugtask_expiry). We have no disable_* or *_disabled columns. I'd prefer the consistent enable_ name.

Setting the default should be fine with our current downtime windows - 35k distributionsourcepackage and 27k product records to rewrite.

Please add the following to the end of the patch to repack these tables:

CLUSTER DistributionSourcePackage USING distributionpackage__sourcepackagename__distribution__key;
CLUSTER Product USING product_name_key;

patch-2208-31-0.sql

review: Approve (db)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'database/schema/comments.sql'
2--- database/schema/comments.sql 2010-10-26 16:22:57 +0000
3+++ database/schema/comments.sql 2010-11-24 09:30:57 +0000
4@@ -527,6 +527,7 @@
5 COMMENT ON COLUMN DistributionSourcePackage.po_message_count IS 'Number of translations matching the package distribution and sourcepackagename. NULL means it has not yet been calculated.';
6 COMMENT ON COLUMN DistributionSourcePackage.is_upstream_link_allowed IS 'Whether an upstream link may be added if it does not already exist.';
7 COMMENT ON COLUMN DistributionSourcePackage.bug_reported_acknowledgement IS 'A message of acknowledgement to display to a bug reporter after they\'ve reported a new bug.';
8+COMMENT ON COLUMN DistributionSourcePackage.enable_bugfiling_duplicate_search IS 'Enable/disable a search for posiible duplicates when a bug is filed.';
9
10 -- DistributionSourcePackageCache
11
12@@ -711,7 +712,7 @@
13 COMMENT ON COLUMN Product.max_bug_heat IS 'The highest heat value across bugs for this product.';
14 COMMENT ON COLUMN Product.date_next_suggest_packaging IS 'The date when Launchpad can resume suggesting Ubuntu packages that the project provides.';
15 COMMENT ON COLUMN Product.bug_reported_acknowledgement IS 'A message of acknowledgement to display to a bug reporter after they\'ve reported a new bug.';
16-
17+COMMENT ON COLUMN Product.enable_bugfiling_duplicate_search IS 'Enable/disable a search for posiible duplicates when a bug is filed.';
18
19 -- ProductLicense
20 COMMENT ON TABLE ProductLicense IS 'The licenses that cover the software for a product.';
21
22=== added file 'database/schema/patch-2208-31-0.sql'
23--- database/schema/patch-2208-31-0.sql 1970-01-01 00:00:00 +0000
24+++ database/schema/patch-2208-31-0.sql 2010-11-24 09:30:57 +0000
25@@ -0,0 +1,16 @@
26+-- Copyright 2010 Canonical Ltd. This software is licensed under the
27+-- GNU Affero General Public License version 3 (see the file LICENSE).
28+SET client_min_messages=ERROR;
29+
30+ALTER TABLE Product
31+ ADD COLUMN enable_bugfiling_duplicate_search
32+ BOOLEAN NOT NULL DEFAULT True;
33+ALTER TABLE DistributionSourcePackage
34+ ADD COLUMN enable_bugfiling_duplicate_search
35+ BOOLEAN NOT NULL DEFAULT True;
36+
37+CLUSTER DistributionSourcePackage USING
38+ distributionpackage__sourcepackagename__distribution__key;
39+CLUSTER Product USING product_name_key;
40+
41+INSERT INTO LaunchpadDatabaseRevision VALUES (2208, 31, 0);

Subscribers

People subscribed via source and target branches

to status/vote changes: