Merge lp:~stevenk/launchpad/db-link-spph-pu 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: 11596
Proposed branch: lp:~stevenk/launchpad/db-link-spph-pu
Merge into: lp:launchpad/db-devel
Diff against target: 24 lines (+9/-0)
2 files modified
database/schema/comments.sql (+1/-0)
database/schema/patch-2209-15-0.sql (+8/-0)
To merge this branch: bzr merge lp:~stevenk/launchpad/db-link-spph-pu
Reviewer Review Type Date Requested Status
Stuart Bishop (community) db Approve
Robert Collins db Pending
Review via email: mp+105594@code.launchpad.net

Commit message

Add a packageupload column to SourcePackagePublishingHistory.

Description of the change

As part of showing which archive admin was responsible for accepting an upload into the series, we should preserve part of the information by linking the packageupload with the source publication.

To post a comment you must log in.
Revision history for this message
Stuart Bishop (stub) wrote :

The new column is fine.

Looking up PackageUpload records for a given SourcePackagePublishingHistory record will work fine, but if we want to go in the other direction we will need an index on the new column.

Will the data be backfilled at some point?

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-05-04 11:58:09 +0000
3+++ database/schema/comments.sql 2012-05-14 01:20:25 +0000
4@@ -1830,6 +1830,7 @@
5 COMMENT ON COLUMN SourcePackagePublishingHistory.removal_comment IS 'Reason why the publication was removed.';
6 COMMENT ON COLUMN SourcePackagePublishingHistory.archive IS 'The target archive for this publishing record.';
7 COMMENT ON COLUMN SourcePackagePublishingHistory.ancestor IS 'The source package record published immediately before this one.';
8+COMMENT ON COLUMN SourcePackagePublishingHistory.packageupload IS 'The PackageUpload that caused this publication to be created.';
9
10 -- Packaging
11 COMMENT ON TABLE Packaging IS 'DO NOT JOIN THROUGH THIS TABLE. This is a set
12
13=== added file 'database/schema/patch-2209-15-0.sql'
14--- database/schema/patch-2209-15-0.sql 1970-01-01 00:00:00 +0000
15+++ database/schema/patch-2209-15-0.sql 2012-05-14 01:20:25 +0000
16@@ -0,0 +1,8 @@
17+-- Copyright 2012 Canonical Ltd. This software is licensed under the
18+-- GNU Affero General Public License version 3 (see the file LICENSE).
19+
20+SET client_min_messages=ERROR;
21+
22+ALTER TABLE SourcePackagePublishingHistory ADD COLUMN PackageUpload INTEGER REFERENCES PackageUpload;
23+
24+INSERT INTO LaunchpadDatabaseRevision VALUES (2209, 15, 0);

Subscribers

People subscribed via source and target branches

to status/vote changes: