Merge lp:~allenap/launchpad/switch-to-json-property-bug-845904 into lp:launchpad/db-devel

Proposed by Gavin Panella
Status: Rejected
Rejected by: Gavin Panella
Proposed branch: lp:~allenap/launchpad/switch-to-json-property-bug-845904
Merge into: lp:launchpad/db-devel
Diff against target: 13 lines (+9/-0)
1 file modified
database/schema/patch-2208-99-1.sql (+9/-0)
To merge this branch: bzr merge lp:~allenap/launchpad/switch-to-json-property-bug-845904
Reviewer Review Type Date Requested Status
Robert Collins (community) Disapprove
Stuart Bishop db Pending
Review via email: mp+74866@code.launchpad.net

Description of the change

This changes the distributionjob.json_data column to BYTEA which is expected by the new storm.properties.JSON column type. This might *require* a simultaneous code change, but I need to think about it some more, and perhaps you have some insight too, or a way around it.

To post a comment you must log in.
Revision history for this message
Robert Collins (lifeless) wrote :

looks like storm is broken to me - json is a text format (which is why
bson exists).

-1 without further examination!

Revision history for this message
Robert Collins (lifeless) :
review: Disapprove

Unmerged revisions

10965. By Gavin Panella

Change DistributionJob.json_data to a BYTEA column. This may *require* a simultaneous code change.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'database/schema/patch-2208-99-1.sql'
2--- database/schema/patch-2208-99-1.sql 1970-01-01 00:00:00 +0000
3+++ database/schema/patch-2208-99-1.sql 2011-09-09 19:38:25 +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+ALTER TABLE distributionjob
10+ ALTER json_data SET DATA TYPE bytea
11+ USING convert_to(json_data, 'utf-8');
12+
13+INSERT INTO LaunchpadDatabaseRevision VALUES (2208, 99, 1);

Subscribers

People subscribed via source and target branches

to status/vote changes: