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

Proposed by Steve Kowalik
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 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
1=== added file 'database/schema/patch-2208-87-1.sql'
2--- database/schema/patch-2208-87-1.sql 1970-01-01 00:00:00 +0000
3+++ database/schema/patch-2208-87-1.sql 2011-09-13 00:07:39 +0000
4@@ -0,0 +1,9 @@
5+-- Copyright 2011 Canonical Ltd. This software is licensed under the
6+-- GNU Affero General Public License version 3 (see the file LICENSE).
7+SET client_min_messages=ERROR;
8+
9+CREATE INDEX binarypackagepublishinghistory__binarypackagename__idx ON BinaryPackagePublishingHistory(binarypackagename);
10+CREATE INDEX sourcepackagepublishinghistory__sourcepackagename__idx ON SourcePackagePublishingHistory(sourcepackagename);
11+
12+INSERT INTO LaunchpadDatabaseRevision VALUES (2208, 87, 1);
13+
14
15=== modified file 'lib/lp/soyuz/interfaces/publishing.py'
16--- lib/lp/soyuz/interfaces/publishing.py 2011-09-11 11:08:30 +0000
17+++ lib/lp/soyuz/interfaces/publishing.py 2011-09-13 00:07:39 +0000
18@@ -326,6 +326,12 @@
19 id = Int(
20 title=_('ID'), required=True, readonly=True,
21 )
22+ sourcepackagenameID = Attribute(
23+ "The DB id for the sourcepackagename.")
24+ sourcepackagename = Int(
25+ title=_('The source package name being published'),
26+ required=False, readonly=False,
27+ )
28 sourcepackagereleaseID = Attribute(
29 "The DB id for the sourcepackagerelease.")
30 sourcepackagerelease = Int(
31@@ -672,6 +678,12 @@
32 id = Int(
33 title=_('ID'), required=True, readonly=True,
34 )
35+ binarypackagenameID = Attribute(
36+ "The DB id for the binarypackagename.")
37+ binarypackagename = Int(
38+ title=_('The binary package name being published'),
39+ required=False, readonly=False,
40+ )
41 binarypackagerelease = Int(
42 title=_('The binary package being published'), required=False,
43 readonly=False,
44
45=== modified file 'lib/lp/soyuz/model/publishing.py'
46--- lib/lp/soyuz/model/publishing.py 2011-09-11 11:08:30 +0000
47+++ lib/lp/soyuz/model/publishing.py 2011-09-13 00:07:39 +0000
48@@ -421,6 +421,8 @@
49 """A source package release publishing record."""
50 implements(ISourcePackagePublishingHistory)
51
52+ sourcepackagename = ForeignKey(foreignKey='SourcePackageName',
53+ dbName='sourcepackagename')
54 sourcepackagerelease = ForeignKey(foreignKey='SourcePackageRelease',
55 dbName='sourcepackagerelease')
56 distroseries = ForeignKey(foreignKey='DistroSeries',
57@@ -904,6 +906,8 @@
58
59 implements(IBinaryPackagePublishingHistory)
60
61+ binarypackagename = ForeignKey(foreignKey='BinaryPackageName',
62+ dbName='binarypackagename')
63 binarypackagerelease = ForeignKey(foreignKey='BinaryPackageRelease',
64 dbName='binarypackagerelease')
65 distroarchseries = ForeignKey(foreignKey='DistroArchSeries',