1
/* Add Pocket to views used by publisher */
3
SET client_min_messages=ERROR;
5
DROP VIEW binarypackagefilepublishing;
6
DROP VIEW sourcepackagefilepublishing;
8
CREATE VIEW binarypackagefilepublishing AS
9
SELECT (((libraryfilealias.id)::text || '.'::text) || (packagepublishing.id)::text) AS id, distrorelease.distribution,
10
packagepublishing.id AS packagepublishing,
11
component.name AS componentname,
12
libraryfilealias.filename AS libraryfilealiasfilename,
13
sourcepackagename.name AS sourcepackagename,
14
binarypackagefile.libraryfile AS libraryfilealias,
15
distrorelease.name AS distroreleasename,
16
distroarchrelease.architecturetag,
17
packagepublishing.status AS publishingstatus,
18
packagepublishing.pocket AS pocket
20
packagepublishing JOIN binarypackage
21
ON packagepublishing.binarypackage = binarypackage.id
22
JOIN build ON binarypackage.build = build.id
23
JOIN sourcepackagerelease
24
ON build.sourcepackagerelease = sourcepackagerelease.id
25
JOIN sourcepackagename
26
ON sourcepackagerelease.sourcepackagename = sourcepackagename.id
27
JOIN binarypackagefile
28
ON binarypackagefile.binarypackage = binarypackage.id
30
ON binarypackagefile.libraryfile = libraryfilealias.id
31
JOIN distroarchrelease
32
ON packagepublishing.distroarchrelease = distroarchrelease.id
34
ON distroarchrelease.distrorelease = distrorelease.id
35
JOIN component ON packagepublishing.component = component.id;
37
CREATE INDEX binarypackagefile_libraryfile_idx
38
ON BinaryPackageFile(libraryfile);
39
CREATE INDEX sourcepackagerelease_sourcepackagename_idx
40
ON SourcePackageRelease(sourcepackagename);
41
CREATE INDEX binarypackagefile_binarypackage_idx
42
ON BinaryPackageFile(binarypackage);
44
CREATE VIEW sourcepackagefilepublishing AS
45
SELECT (((libraryfilealias.id)::text || '.'::text) || (sourcepackagepublishing.id)::text) AS id,
46
distrorelease.distribution,
47
sourcepackagepublishing.id AS sourcepackagepublishing,
48
sourcepackagereleasefile.libraryfile AS libraryfilealias,
49
libraryfilealias.filename AS libraryfilealiasfilename,
50
sourcepackagename.name AS sourcepackagename,
51
component.name AS componentname,
52
distrorelease.name AS distroreleasename,
53
sourcepackagepublishing.status AS publishingstatus,
54
sourcepackagepublishing.pocket AS pocket
56
sourcepackagepublishing
57
JOIN sourcepackagerelease ON
58
sourcepackagepublishing.sourcepackagerelease = sourcepackagerelease.id
59
JOIN sourcepackagename
60
ON sourcepackagerelease.sourcepackagename = sourcepackagename.id
61
JOIN sourcepackagereleasefile
62
ON sourcepackagereleasefile.sourcepackagerelease
63
= sourcepackagerelease.id
65
ON libraryfilealias.id = sourcepackagereleasefile.libraryfile
67
ON sourcepackagepublishing.distrorelease = distrorelease.id
68
JOIN component ON sourcepackagepublishing.component = component.id;
70
CREATE INDEX sourcepackagereleasefile_sourcepackagerelease_idx
71
ON SourcePackageReleaseFile (SourcePackageRelease);
72
CREATE INDEX sourcepackagereleasefile_libraryfile_idx
73
ON SourcePackageReleaseFile (libraryfile);
75
INSERT INTO LaunchpadDatabaseRevision VALUES (17, 27, 0);