1
-- Copyright 2011 Canonical Ltd. This software is licensed under the
2
-- GNU Affero General Public License version 3 (see the file LICENSE).
4
SET client_min_messages=ERROR;
6
CREATE TABLE PackageCopyJob (
8
job integer NOT NULL CONSTRAINT packagecopyjob__job__fk REFERENCES job,
9
source_archive integer NOT NULL REFERENCES Archive,
10
target_archive integer NOT NULL REFERENCES Archive,
11
target_distroseries integer REFERENCES DistroSeries,
12
job_type integer NOT NULL,
16
ALTER TABLE PackageCopyJob
17
ADD CONSTRAINT packagecopyjob__job__key UNIQUE (job);
18
CREATE INDEX packagecopyjob__source
19
ON PackageCopyJob (source_archive);
20
CREATE INDEX packagecopyjob__target
21
ON PackageCopyJob (target_archive, target_distroseries);
23
ALTER TABLE PackageUpload
24
ADD COLUMN package_copy_job integer
25
CONSTRAINT packageupload__package_copy_job__fk REFERENCES PackageCopyJob;
26
CREATE INDEX packageupload__package_copy_job__idx
27
ON PackageUpload(package_copy_job)
28
WHERE package_copy_job IS NOT NULL;
30
INSERT INTO LaunchpadDatabaseRevision VALUES (2208, 68, 0);