Merge lp:~wgrant/launchpad/branch-type-policy-db into lp:launchpad/db-devel

Proposed by William Grant
Status: Merged
Approved by: Robert Collins
Approved revision: no longer in the source branch.
Merged at revision: 11767
Proposed branch: lp:~wgrant/launchpad/branch-type-policy-db
Merge into: lp:launchpad/db-devel
Prerequisite: lp:~wgrant/launchpad/edit-stacked-information-type
Diff against target: 15 lines (+11/-0)
1 file modified
database/schema/patch-2209-26-0.sql (+11/-0)
To merge this branch: bzr merge lp:~wgrant/launchpad/branch-type-policy-db
Reviewer Review Type Date Requested Status
Robert Collins (community) Approve
Stuart Bishop db Pending
Review via email: mp+114799@code.launchpad.net

Commit message

Add new columns to replace Product.private_bugs and BranchVisibilityPolicy.

Description of the change

This branch adds two new enum columns to replace Product.private_bugs and BranchVisibilityPolicy: Product.branch_sharing_policy and Product.bug_sharing_policy. lp:~wgrant/launchpad/branch-type-policy-model contains the initial app-side implementation of branch_sharing_policy, and bug_sharing_policy will be similar.

They should default to null for the time being, as that indicates to the app that the old model should be consulted instead.

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

Why are the different? I mean, why isn't it one column?

review: Needs Information
Revision history for this message
William Grant (wgrant) wrote :

Consider pre-2009 Launchpad. Default public bugs, default private branches. It's by no means unique in this respect.

launchpad_dogfood=# SELECT COUNT(*) FROM product WHERE EXISTS (SELECT 1 FROM branchvisibilitypolicy WHERE branchvisibilitypolicy.product = product.id) AND NOT private_bugs;
 count
-------
   156
(1 row)

Revision history for this message
Robert Collins (lifeless) wrote :

kk

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'database/schema/patch-2209-26-0.sql'
2--- database/schema/patch-2209-26-0.sql 1970-01-01 00:00:00 +0000
3+++ database/schema/patch-2209-26-0.sql 2012-07-13 08:37:38 +0000
4@@ -0,0 +1,11 @@
5+-- Copyright 2012 Canonical Ltd. This software is licensed under the
6+-- GNU Affero General Public License version 3 (see the file LICENSE).
7+
8+SET client_min_messages=ERROR;
9+
10+-- Add new enum columns to replace Product.private_bugs and
11+-- BranchVisibilityPolicy.
12+ALTER TABLE product ADD COLUMN branch_sharing_policy integer;
13+ALTER TABLE product ADD COLUMN bug_sharing_policy integer;
14+
15+INSERT INTO LaunchpadDatabaseRevision VALUES (2209, 26, 0);

Subscribers

People subscribed via source and target branches

to status/vote changes: