Merge lp:~stevenk/launchpad/denorm-bspph-model into lp:launchpad

Proposed by Steve Kowalik on 2011-09-13
Status: Superseded
Proposed branch: lp:~stevenk/launchpad/denorm-bspph-model
Merge into: lp:launchpad
Diff against target: 65 lines (+25/-0)
3 files modified
database/schema/patch-2208-87-1.sql (+9/-0)
lib/lp/soyuz/interfaces/publishing.py (+12/-0)
lib/lp/soyuz/model/publishing.py (+4/-0)
To merge this branch: bzr merge lp:~stevenk/launchpad/denorm-bspph-model
Reviewer Review Type Date Requested Status
Launchpad code reviewers 2011-09-13 Pending
Review via email: mp+75093@code.launchpad.net

This proposal has been superseded by a proposal from 2011-09-13.

Description of the change

Sprinkle in the model changes for {B,S}PPH denormalisation. This is able to land right away, due to the db patch having landed.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file 'database/schema/patch-2208-87-1.sql'
--- database/schema/patch-2208-87-1.sql 1970-01-01 00:00:00 +0000
+++ database/schema/patch-2208-87-1.sql 2011-09-13 00:07:39 +0000
@@ -0,0 +1,9 @@
1-- Copyright 2011 Canonical Ltd. This software is licensed under the
2-- GNU Affero General Public License version 3 (see the file LICENSE).
3SET client_min_messages=ERROR;
4
5CREATE INDEX binarypackagepublishinghistory__binarypackagename__idx ON BinaryPackagePublishingHistory(binarypackagename);
6CREATE INDEX sourcepackagepublishinghistory__sourcepackagename__idx ON SourcePackagePublishingHistory(sourcepackagename);
7
8INSERT INTO LaunchpadDatabaseRevision VALUES (2208, 87, 1);
9
010
=== modified file 'lib/lp/soyuz/interfaces/publishing.py'
--- lib/lp/soyuz/interfaces/publishing.py 2011-09-11 11:08:30 +0000
+++ lib/lp/soyuz/interfaces/publishing.py 2011-09-13 00:07:39 +0000
@@ -326,6 +326,12 @@
326 id = Int(326 id = Int(
327 title=_('ID'), required=True, readonly=True,327 title=_('ID'), required=True, readonly=True,
328 )328 )
329 sourcepackagenameID = Attribute(
330 "The DB id for the sourcepackagename.")
331 sourcepackagename = Int(
332 title=_('The source package name being published'),
333 required=False, readonly=False,
334 )
329 sourcepackagereleaseID = Attribute(335 sourcepackagereleaseID = Attribute(
330 "The DB id for the sourcepackagerelease.")336 "The DB id for the sourcepackagerelease.")
331 sourcepackagerelease = Int(337 sourcepackagerelease = Int(
@@ -672,6 +678,12 @@
672 id = Int(678 id = Int(
673 title=_('ID'), required=True, readonly=True,679 title=_('ID'), required=True, readonly=True,
674 )680 )
681 binarypackagenameID = Attribute(
682 "The DB id for the binarypackagename.")
683 binarypackagename = Int(
684 title=_('The binary package name being published'),
685 required=False, readonly=False,
686 )
675 binarypackagerelease = Int(687 binarypackagerelease = Int(
676 title=_('The binary package being published'), required=False,688 title=_('The binary package being published'), required=False,
677 readonly=False,689 readonly=False,
678690
=== modified file 'lib/lp/soyuz/model/publishing.py'
--- lib/lp/soyuz/model/publishing.py 2011-09-11 11:08:30 +0000
+++ lib/lp/soyuz/model/publishing.py 2011-09-13 00:07:39 +0000
@@ -421,6 +421,8 @@
421 """A source package release publishing record."""421 """A source package release publishing record."""
422 implements(ISourcePackagePublishingHistory)422 implements(ISourcePackagePublishingHistory)
423423
424 sourcepackagename = ForeignKey(foreignKey='SourcePackageName',
425 dbName='sourcepackagename')
424 sourcepackagerelease = ForeignKey(foreignKey='SourcePackageRelease',426 sourcepackagerelease = ForeignKey(foreignKey='SourcePackageRelease',
425 dbName='sourcepackagerelease')427 dbName='sourcepackagerelease')
426 distroseries = ForeignKey(foreignKey='DistroSeries',428 distroseries = ForeignKey(foreignKey='DistroSeries',
@@ -904,6 +906,8 @@
904906
905 implements(IBinaryPackagePublishingHistory)907 implements(IBinaryPackagePublishingHistory)
906908
909 binarypackagename = ForeignKey(foreignKey='BinaryPackageName',
910 dbName='binarypackagename')
907 binarypackagerelease = ForeignKey(foreignKey='BinaryPackageRelease',911 binarypackagerelease = ForeignKey(foreignKey='BinaryPackageRelease',
908 dbName='binarypackagerelease')912 dbName='binarypackagerelease')
909 distroarchseries = ForeignKey(foreignKey='DistroArchSeries',913 distroarchseries = ForeignKey(foreignKey='DistroArchSeries',