Merge lp:~cjwatson/launchpad/db-packageset-score into lp:launchpad/db-devel

Proposed by Colin Watson on 2012-05-08
Status: Merged
Approved by: Richard Harding on 2012-05-09
Approved revision: no longer in the source branch.
Merged at revision: 11582
Proposed branch: lp:~cjwatson/launchpad/db-packageset-score
Merge into: lp:launchpad/db-devel
Diff against target: 12 lines (+8/-0)
1 file modified
database/schema/patch-2209-18-0.sql (+8/-0)
To merge this branch: bzr merge lp:~cjwatson/launchpad/db-packageset-score
Reviewer Review Type Date Requested Status
Stuart Bishop db 2012-05-08 Approve on 2012-05-09
Robert Collins db 2012-05-08 Pending
Launchpad code reviewers 2012-05-08 Pending
Review via email: mp+105113@code.launchpad.net

Commit Message

Add Packageset.score column.

Description of the Change

== Summary ==

We'd like more flexible ways to control package build scores in the distribution, so that packages which are on community-flavour CDs can be prioritised above random stuff in universe even though they don't get the component bonus for main. Consensus seems to be that per-packageset scoring would be sensible.

== Proposed fix ==

Add a score column to Packageset so that a later code change can use it.

== LOC Rationale ==

+8; I'll see about offsetting this in the code change.

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

Seems good. There are <150 rows in PackageSet at the moment, so we can afford to set the default value as part of the DB patch.

If you deal in LOC futures, this is actually +1 (if it counts at all) as we will eventually remove the DB patch and it will end up as a single new line in a new snapshot of the production database schema :-)

review: Approve (db)
Stuart Bishop (stub) :
review: Approve
Stuart Bishop (stub) :
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-18-0.sql'
2--- database/schema/patch-2209-18-0.sql 1970-01-01 00:00:00 +0000
3+++ database/schema/patch-2209-18-0.sql 2012-05-08 19:20:25 +0000
4@@ -0,0 +1,8 @@
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 Packageset ADD COLUMN score INTEGER DEFAULT 0 NOT NULL;
11+
12+INSERT INTO LaunchpadDatabaseRevision VALUES (2209, 18, 0);

Subscribers

People subscribed via source and target branches

to status/vote changes: