Merge lp:~stevenk/launchpad/db-job-json_data into lp:launchpad/db-devel

Proposed by Steve Kowalik
Status: Merged
Approved by: Steve Kowalik
Approved revision: no longer in the source branch.
Merged at revision: 12467
Proposed branch: lp:~stevenk/launchpad/db-job-json_data
Merge into: lp:launchpad/db-devel
Diff against target: 13 lines (+9/-0)
1 file modified
database/schema/patch-2209-47-0.sql (+9/-0)
To merge this branch: bzr merge lp:~stevenk/launchpad/db-job-json_data
Reviewer Review Type Date Requested Status
Stuart Bishop (community) db Approve
William Grant db Pending
Review via email: mp+172943@code.launchpad.net

Commit message

Add two new columns to Job, Job.json_data and Job.job_type, to allow a new class of job that doesn't require separate DB tables.

Description of the change

Add two new columns to Job, Job.json_data and Job.job_type, to allow a new class of job that doesn't require separate DB tables.

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

Ok.

This is going to make the json blobs on a lot of related tables redundant.

Seriously consider using the json datatype available in 9.1 rather than text - it will turn the blobs into actual query-able data, and may even make all the link tables redundant entirely.

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-47-0.sql'
2--- database/schema/patch-2209-47-0.sql 1970-01-01 00:00:00 +0000
3+++ database/schema/patch-2209-47-0.sql 2013-07-04 02:40:34 +0000
4@@ -0,0 +1,9 @@
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+ALTER TABLE job ADD COLUMN json_data TEXT;
11+ALTER TABLE job ADD COLUMN job_type INTEGER;
12+
13+INSERT INTO LaunchpadDatabaseRevision VALUES (2209, 47, 0);

Subscribers

People subscribed via source and target branches

to status/vote changes: