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

Proposed by Colin Watson on 2012-06-01
Status: Merged
Approved by: James Westby on 2012-06-04
Approved revision: no longer in the source branch.
Merged at revision: 11649
Proposed branch: lp:~cjwatson/launchpad/db-packageset-score-rename
Merge into: lp:launchpad/db-devel
Diff against target: 12 lines (+8/-0)
1 file modified
database/schema/patch-2209-18-4.sql (+8/-0)
To merge this branch: bzr merge lp:~cjwatson/launchpad/db-packageset-score-rename
Reviewer Review Type Date Requested Status
Stuart Bishop db 2012-06-01 Approve on 2012-06-01
Robert Collins db 2012-06-01 Pending
Review via email: mp+108336@code.launchpad.net

Commit Message

Rename Packageset.score column to Packageset.relative_build_score.

Description of the Change

== Summary ==

Continuing the saga of bug 1000570, which reports a badly-named column on Packageset. This deals with actually throwing the Ring into Mount Doom, but there's still some cleanup to do in the Shire afterwards.

== Proposed fix ==

lp:~cjwatson/launchpad/packageset-score-rename-support (which has landed on stable but has yet to be deployed; I'll make sure not to land this until that's happened) arranges for the appserver code to tolerate the column being called either score or relative_build_score. This patch actually renames the column.

== LOC Rationale ==

+8, but it will drop to zero if and when this is eventually collapsed into a new base version of the schema.

== Tests ==

bin/test -vvct TestBuildPackageJobScore -t TestBuildQueueManual

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

Looks fine.

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-4.sql'
2--- database/schema/patch-2209-18-4.sql 1970-01-01 00:00:00 +0000
3+++ database/schema/patch-2209-18-4.sql 2012-06-01 13:11:22 +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 RENAME COLUMN score TO relative_build_score;
11+
12+INSERT INTO LaunchpadDatabaseRevision VALUES (2209, 18, 4);

Subscribers

People subscribed via source and target branches

to status/vote changes: