← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~stevenk/launchpad/denorm-bspph into lp:launchpad/db-devel

 

Steve Kowalik has proposed merging lp:~stevenk/launchpad/denorm-bspph into lp:launchpad/db-devel.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~stevenk/launchpad/denorm-bspph/+merge/71303

Add a SPN column to SPPH and a BPN column to BPPH. This denormalization allows us to speed up the queries that the DistributionSourcePackage vocab will use.
-- 
https://code.launchpad.net/~stevenk/launchpad/denorm-bspph/+merge/71303
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~stevenk/launchpad/denorm-bspph into lp:launchpad/db-devel.
=== modified file 'database/schema/comments.sql'
--- database/schema/comments.sql	2011-08-08 10:30:38 +0000
+++ database/schema/comments.sql	2011-08-12 05:43:27 +0000
@@ -1213,6 +1213,7 @@
 
 -- BinaryPackagePublishingHistory
 COMMENT ON TABLE BinaryPackagePublishingHistory IS 'PackagePublishingHistory: The history of a BinaryPackagePublishing record. This table represents the lifetime of a publishing record from inception to deletion. Records are never removed from here and in time the publishing table may become a view onto this table. A column being NULL indicates there''s no data for that state transition. E.g. a package which is removed without being superseded won''t have datesuperseded or supersededby filled in.';
+COMMENT ON COLUMN BinaryPackagePublishingHistory.binarypackagename IS 'Reference to a BinaryPackageName.';
 COMMENT ON COLUMN BinaryPackagePublishingHistory.binarypackagerelease IS 'The binarypackage being published.';
 COMMENT ON COLUMN BinaryPackagePublishingHistory.distroarchseries IS 'The distroarchseries into which the binarypackage is being published.';
 COMMENT ON COLUMN BinaryPackagePublishingHistory.status IS 'The current status of the publishing.';
@@ -1841,6 +1842,7 @@
 -- SourcePackagePublishingHistory
 
 COMMENT ON TABLE SourcePackagePublishingHistory IS 'SourcePackagePublishingHistory: The history of a SourcePackagePublishing record. This table represents the lifetime of a publishing record from inception to deletion. Records are never removed from here and in time the publishing table may become a view onto this table. A column being NULL indicates there''s no data for that state transition. E.g. a package which is removed without being superseded won''t have datesuperseded or supersededby filled in.';
+COMMENT ON COLUMN SourcePackagePublishingHistory.sourcepackagename IS 'Reference to a SourcePackageName.';
 COMMENT ON COLUMN SourcePackagePublishingHistory.sourcepackagerelease IS 'The sourcepackagerelease being published.';
 COMMENT ON COLUMN SourcePackagePublishingHistory.distroseries IS 'The distroseries into which the sourcepackagerelease is being published.';
 COMMENT ON COLUMN SourcePackagePublishingHistory.status IS 'The current status of the publishing.';

=== added file 'database/schema/patch-2208-81-1.sql'
--- database/schema/patch-2208-81-1.sql	1970-01-01 00:00:00 +0000
+++ database/schema/patch-2208-81-1.sql	2011-08-12 05:43:27 +0000
@@ -0,0 +1,9 @@
+-- Copyright 2011 Canonical Ltd.  This software is licensed under the
+-- GNU Affero General Public License version 3 (see the file LICENSE).
+SET client_min_messages=ERROR;
+
+ALTER TABLE SourcePackagePublishingHistory ADD COLUMN sourcepackagename INTEGER;
+ALTER TABLE BinaryPackagePublishingHistory ADD COLUMN binarypackagename INTEGER;
+
+INSERT INTO LaunchpadDatabaseRevision VALUES (2208, 81, 1);
+


Follow ups