Merge lp:~wgrant/launchpad/flatten-bfj-0.75-ttb-defaults into lp:launchpad

Proposed by William Grant
Status: Merged
Merged at revision: 16469
Proposed branch: lp:~wgrant/launchpad/flatten-bfj-0.75-ttb-defaults
Merge into: lp:launchpad
Diff against target: 16 lines (+12/-0)
1 file modified
database/schema/patch-2209-41-2.sql (+12/-0)
To merge this branch: bzr merge lp:~wgrant/launchpad/flatten-bfj-0.75-ttb-defaults
Reviewer Review Type Date Requested Status
Stuart Bishop (community) db Approve
Review via email: mp+146343@code.launchpad.net

Commit message

Fix TTB column defaults that were intended to be set by 2209-41-0.

Description of the change

I botched the TranslationTemplatesBuild part of lp:~wgrant/launchpad/flatten-bfj-0-db. When I split the failure_count/date_created default settings out into separate ALTER COLUMNs, I accidentally did it twice for SPRB rather than once for SPRB and once for TTB. This branch fixes that.

To post a comment you must log in.
Revision history for this message
Stuart Bishop (stub) wrote :

Fine

review: Approve (db)
Revision history for this message
Stuart Bishop (stub) wrote :

Applied on staging, qastaging and prod

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'database/schema/patch-2209-41-2.sql'
2--- database/schema/patch-2209-41-2.sql 1970-01-01 00:00:00 +0000
3+++ database/schema/patch-2209-41-2.sql 2013-02-04 06:45:25 +0000
4@@ -0,0 +1,12 @@
5+-- Copyright 2013 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+-- Fix defaults that were intended to be set by 2209-41-0.
11+ALTER TABLE translationtemplatesbuild
12+ ALTER COLUMN date_created
13+ SET DEFAULT (CURRENT_TIMESTAMP AT TIME ZONE 'UTC'),
14+ ALTER COLUMN failure_count SET DEFAULT 0;
15+
16+INSERT INTO LaunchpadDatabaseRevision VALUES (2209, 41, 2);