Merge lp:~stevenk/launchpad/db-drop-id-for-bsns into lp:launchpad/db-devel

Proposed by Steve Kowalik on 2012-07-31
Status: Merged
Approved by: Stuart Bishop on 2012-07-31
Approved revision: no longer in the source branch.
Merged at revision: 11801
Proposed branch: lp:~stevenk/launchpad/db-drop-id-for-bsns
Merge into: lp:launchpad/db-devel
Diff against target: 18 lines (+14/-0)
1 file modified
database/schema/patch-2209-26-2.sql (+14/-0)
To merge this branch: bzr merge lp:~stevenk/launchpad/db-drop-id-for-bsns
Reviewer Review Type Date Requested Status
Stuart Bishop db 2012-07-31 Approve on 2012-07-31
Robert Collins db 2012-07-31 Pending
Review via email: mp+117375@code.launchpad.net

Description of the Change

Drop the id primary keys for BugSubscriptionFilter{Status,Importance} for not being very useful.

To post a comment you must log in.
Stuart Bishop (stub) wrote :

This all looks good.

Will be interesting to see if tests break and how.

review: Approve (db)

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-2.sql'
2--- database/schema/patch-2209-26-2.sql 1970-01-01 00:00:00 +0000
3+++ database/schema/patch-2209-26-2.sql 2012-07-31 06:02:24 +0000
4@@ -0,0 +1,14 @@
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+ALTER TABLE bugsubscriptionfilterstatus DROP COLUMN id;
11+DROP INDEX bugsubscriptionfilterstatus__filter__status__idx;
12+ALTER TABLE bugsubscriptionfilterstatus ADD CONSTRAINT bugsubscriptionfilterstatus_pkey PRIMARY KEY (filter, status);
13+
14+ALTER TABLE bugsubscriptionfilterimportance DROP COLUMN id;
15+DROP INDEX bugsubscriptionfilterimportance__filter__importance__idx;
16+ALTER TABLE bugsubscriptionfilterimportance ADD CONSTRAINT bugsubscriptionfilterimportance_pkey PRIMARY KEY (filter, importance);
17+
18+INSERT INTO LaunchpadDatabaseRevision VALUES (2209, 26, 2);

Subscribers

People subscribed via source and target branches

to status/vote changes: