~launchpad-pqm/launchpad/devel

7675.1176.1 by Jeroen Vermeulen
Move PackageCopyJob package name into db column, add copy_policy.
1
-- Copyright 2011 Canonical Ltd.  This software is licensed under the
2
-- GNU Affero General Public License version 3 (see the file LICENSE).
3
4
SET client_min_messages=ERROR;
5
6
-- Thanks to our feature flags, this table should be empty.  If not,
7
-- adding a NOT NULL column would be problematic!
8
ALTER TABLE PackageCopyJob ADD COLUMN package_name text NOT NULL;
9
7675.1176.7 by Jeroen Vermeulen
Okay, allow null so we can change usage mid-cycle.
10
ALTER TABLE PackageCopyJob ADD COLUMN copy_policy integer;
7675.1176.1 by Jeroen Vermeulen
Move PackageCopyJob package name into db column, add copy_policy.
11
12
-- For getPendingJobsForTargetSeries, which happens on web-request time.
13
CREATE UNIQUE INDEX packagecopyjob__job_type__target_ds__id__key
14
    ON PackageCopyJob(job_type, target_distroseries, id);
15
7675.1176.3 by Jeroen Vermeulen
DB review changes; assigned patch no. 2208-73-0.
16
INSERT INTO LaunchpadDatabaseRevision VALUES (2208, 73, 0);