~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to database/schema/archive/patch-2208-79-1.sql

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-08-03 11:23:34 UTC
  • mfrom: (13457.6.16 upgrade-stderr)
  • Revision ID: launchpad@pqm.canonical.com-20110803112334-acnupsa7jmzmdeet
[r=stevenk][bug=819751] Fix the implementation of several methods in
 LoggingUIFactory.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
SET client_min_messages=ERROR;
2
 
 
3
 
ALTER TABLE PackagingJob
4
 
  ADD COLUMN
5
 
    potemplate INTEGER DEFAULT NULL
6
 
      CONSTRAINT potemplate_fk REFERENCES POTemplate;
7
 
 
8
 
ALTER TABLE PackagingJob
9
 
  ALTER COLUMN productseries DROP NOT NULL,
10
 
  ALTER COLUMN distroseries DROP NOT NULL,
11
 
  ALTER COLUMN sourcepackagename DROP NOT NULL,
12
 
  ADD CONSTRAINT translationtemplatejob_valid_link CHECK (
13
 
    -- If there is a template, it is the template being moved.
14
 
    (potemplate IS NOT NULL AND productseries IS NULL AND
15
 
     distroseries IS NULL AND sourcepackagename IS NULL) OR
16
 
    -- If there is no template, we need all of productseries, distroseries
17
 
    -- and sourcepackagename because we are moving translations between
18
 
    -- a productseries and a source package.
19
 
    (potemplate IS NULL AND productseries IS NOT NULL AND
20
 
     distroseries IS NOT NULL AND sourcepackagename IS NOT NULL));
21
 
 
22
 
CREATE INDEX packagingjob__potemplate__idx ON PackagingJob (potemplate);
23
 
 
24
 
INSERT INTO LaunchpadDatabaseRevision VALUES (2208, 79, 1);