Merge lp:~stevenk/launchpad/db-add-information_type into lp:launchpad/db-devel

Proposed by Steve Kowalik
Status: Merged
Approved by: Steve Kowalik
Approved revision: no longer in the source branch.
Merged at revision: 11433
Proposed branch: lp:~stevenk/launchpad/db-add-information_type
Merge into: lp:launchpad/db-devel
Diff against target: 33 lines (+11/-0)
2 files modified
database/schema/comments.sql (+2/-0)
database/schema/patch-2209-12-0.sql (+9/-0)
To merge this branch: bzr merge lp:~stevenk/launchpad/db-add-information_type
Reviewer Review Type Date Requested Status
Stuart Bishop (community) db Approve
Robert Collins (community) Needs Fixing
Review via email: mp+96290@code.launchpad.net

Commit message

[r=stub][bug=933759][no-qa] Add an information_type column to Bug and Branch.

Description of the change

Add an information_type column to Bug and Branch.

This is preliminary work to replace both Bug.security_related/Bug.private and Branch.private in one fell swoop. The columns make reference to the AccessPolicyType enum value (branch to rename it to InformationType is currently playing in ec2.)

A new DB patch to add a NOT NULL constraint will be added after we have completely migrated to it.

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

Don't use default, it will take hours to apply. See the HotPatching wiki page/schemachangeprocess wiki page for docs.

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

The comment is not very useful at the moment. Try something like 'Enum describing what type of information is stored, such as type of private or security related data, and used to determine how to apply an access policy.'

Otherwise the patch is fine.

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 2012-03-04 09:53:04 +0000
3+++ database/schema/comments.sql 2012-03-08 08:15:23 +0000
4@@ -107,6 +107,7 @@
5 COMMENT ON COLUMN Branch.merge_queue IS 'A reference to the BranchMergeQueue record that manages merges.';
6 COMMENT ON COLUMN Branch.merge_queue_config IS 'A JSON string of configuration values that can be read by a merge queue script.';
7 COMMENT ON COLUMN Branch.transitively_private IS 'A branch is transitively private if it is explicitly private or is stacked on a transitively private branch.';
8+COMMENT ON COLUMN Branch.information_type IS 'Enum describing what type of information is stored, such as type of private or security related data, and used to determine how to apply an access policy.';
9
10 -- BranchMergeQueue
11 COMMENT ON TABLE BranchMergeQueue IS 'Queue for managing the merge workflow for branches.';
12@@ -216,6 +217,7 @@
13 COMMENT ON COLUMN Bug.heat IS 'The relevance of this bug. This value is computed periodically using bug_affects_person and other bug values.';
14 COMMENT ON COLUMN Bug.heat_last_updated IS 'The time this bug''s heat was last updated, or NULL if the heat has never yet been updated.';
15 COMMENT ON COLUMN Bug.latest_patch_uploaded IS 'The time when the most recent patch has been attached to this bug or NULL if no patches are attached';
16+COMMENT ON COLUMN Bug.information_type IS 'Enum describing what type of information is stored, such as type of private or security related data, and used to determine how to apply an access policy.';
17
18 -- BugBranch
19 COMMENT ON TABLE BugBranch IS 'A branch related to a bug, most likely a branch for fixing the bug.';
20
21=== added file 'database/schema/patch-2209-12-0.sql'
22--- database/schema/patch-2209-12-0.sql 1970-01-01 00:00:00 +0000
23+++ database/schema/patch-2209-12-0.sql 2012-03-08 08:15:23 +0000
24@@ -0,0 +1,9 @@
25+-- Copyright 2012 Canonical Ltd. This software is licensed under the
26+-- GNU Affero General Public License version 3 (see the file LICENSE).
27+
28+SET client_min_messages=ERROR;
29+
30+ALTER TABLE Branch ADD COLUMN information_type INTEGER;
31+ALTER TABLE Bug ADD COLUMN information_type INTEGER;
32+
33+INSERT INTO LaunchpadDatabaseRevision VALUES (2209, 12, 0);

Subscribers

People subscribed via source and target branches

to status/vote changes: