]> git.donarmstrong.com Git - wannabuild.git/blob - schema/old-migrations/add_builder_to_pkg_history.sql
old-migrations/add_builder_to_pkg_history.sql: really add builder column to _public...
[wannabuild.git] / schema / old-migrations / add_builder_to_pkg_history.sql
1 BEGIN;
2 SET search_path = "alpha", public;
3
4 DROP VIEW pkg_history;
5
6 CREATE OR REPLACE VIEW pkg_history AS
7  SELECT pkg_history.package, pkg_history.distribution, pkg_history.version, pkg_history."timestamp", pkg_history.result, pkg_history.build_time, pkg_history.disk_space, pkg_history.builder
8    FROM pkg_history
9   WHERE pkg_history.architecture::text = 'alpha'::text;
10
11 CREATE RULE pkg_history_delete AS ON DELETE TO pkg_history DO INSTEAD DELETE FROM public.pkg_history p WHERE ((((((p.architecture)::text = 'alpha'::text) AND ((p.package)::text = (old.package)::text)) AND ((p.distribution)::text = (old.distribution)::text)) AND (p.version OPERATOR(public.=) old.version)) AND (p."timestamp" = old."timestamp"));
12
13 CREATE RULE pkg_history_insert AS ON INSERT TO pkg_history DO INSTEAD INSERT INTO public.pkg_history (architecture, package, distribution, version, "timestamp", result, build_time, disk_space, builder) VALUES ('alpha'::character varying, new.package, new.distribution, new.version, new."timestamp", new.result, new.build_time, new.disk_space, new.builder);
14
15 CREATE RULE pkg_history_update AS ON UPDATE TO pkg_history DO INSTEAD UPDATE public.pkg_history p SET result = new.result, build_time = new.build_time, disk_space = new.disk_space, builder = new.builder WHERE ((((((p.architecture)::text = 'alpha'::text) AND ((p.package)::text = (old.package)::text)) AND ((p.distribution)::text = (old.distribution)::text)) AND (p.version OPERATOR(public.=) old.version)) AND (p."timestamp" = old."timestamp"));
16
17 GRANT ALL ON TABLE pkg_history TO wbadm;
18 GRANT SELECT ON TABLE pkg_history TO wb_security;
19 GRANT SELECT,INSERT,UPDATE ON TABLE pkg_history TO wb_all;
20
21 SET search_path = "amd64", public;
22
23 DROP VIEW pkg_history;
24
25 CREATE OR REPLACE VIEW pkg_history AS
26  SELECT pkg_history.package, pkg_history.distribution, pkg_history.version, pkg_history."timestamp", pkg_history.result, pkg_history.build_time, pkg_history.disk_space, pkg_history.builder
27    FROM pkg_history
28   WHERE pkg_history.architecture::text = 'amd64'::text;
29
30 CREATE RULE pkg_history_delete AS ON DELETE TO pkg_history DO INSTEAD DELETE FROM public.pkg_history p WHERE ((((((p.architecture)::text = 'amd64'::text) AND ((p.package)::text = (old.package)::text)) AND ((p.distribution)::text = (old.distribution)::text)) AND (p.version OPERATOR(public.=) old.version)) AND (p."timestamp" = old."timestamp"));
31
32 CREATE RULE pkg_history_insert AS ON INSERT TO pkg_history DO INSTEAD INSERT INTO public.pkg_history (architecture, package, distribution, version, "timestamp", result, build_time, disk_space, builder) VALUES ('amd64'::character varying, new.package, new.distribution, new.version, new."timestamp", new.result, new.build_time, new.disk_space, new.builder);
33
34 CREATE RULE pkg_history_update AS ON UPDATE TO pkg_history DO INSTEAD UPDATE public.pkg_history p SET result = new.result, build_time = new.build_time, disk_space = new.disk_space, builder = new.builder WHERE ((((((p.architecture)::text = 'amd64'::text) AND ((p.package)::text = (old.package)::text)) AND ((p.distribution)::text = (old.distribution)::text)) AND (p.version OPERATOR(public.=) old.version)) AND (p."timestamp" = old."timestamp"));
35
36 GRANT ALL ON TABLE pkg_history TO wbadm;
37 GRANT SELECT ON TABLE pkg_history TO wb_security;
38 GRANT SELECT,INSERT,UPDATE ON TABLE pkg_history TO wb_all;
39
40 SET search_path = "arm", public;
41
42 DROP VIEW pkg_history;
43
44 CREATE OR REPLACE VIEW pkg_history AS
45  SELECT pkg_history.package, pkg_history.distribution, pkg_history.version, pkg_history."timestamp", pkg_history.result, pkg_history.build_time, pkg_history.disk_space, pkg_history.builder
46    FROM pkg_history
47   WHERE pkg_history.architecture::text = 'arm'::text;
48
49 CREATE RULE pkg_history_delete AS ON DELETE TO pkg_history DO INSTEAD DELETE FROM public.pkg_history p WHERE ((((((p.architecture)::text = 'arm'::text) AND ((p.package)::text = (old.package)::text)) AND ((p.distribution)::text = (old.distribution)::text)) AND (p.version OPERATOR(public.=) old.version)) AND (p."timestamp" = old."timestamp"));
50
51 CREATE RULE pkg_history_insert AS ON INSERT TO pkg_history DO INSTEAD INSERT INTO public.pkg_history (architecture, package, distribution, version, "timestamp", result, build_time, disk_space, builder) VALUES ('arm'::character varying, new.package, new.distribution, new.version, new."timestamp", new.result, new.build_time, new.disk_space, new.builder);
52
53 CREATE RULE pkg_history_update AS ON UPDATE TO pkg_history DO INSTEAD UPDATE public.pkg_history p SET result = new.result, build_time = new.build_time, disk_space = new.disk_space, builder = new.builder WHERE ((((((p.architecture)::text = 'arm'::text) AND ((p.package)::text = (old.package)::text)) AND ((p.distribution)::text = (old.distribution)::text)) AND (p.version OPERATOR(public.=) old.version)) AND (p."timestamp" = old."timestamp"));
54
55 GRANT ALL ON TABLE pkg_history TO wbadm;
56 GRANT SELECT ON TABLE pkg_history TO wb_security;
57 GRANT SELECT,INSERT,UPDATE ON TABLE pkg_history TO wb_all;
58
59 SET search_path = "armel", public;
60
61 DROP VIEW pkg_history;
62
63 CREATE OR REPLACE VIEW pkg_history AS
64  SELECT pkg_history.package, pkg_history.distribution, pkg_history.version, pkg_history."timestamp", pkg_history.result, pkg_history.build_time, pkg_history.disk_space, pkg_history.builder
65    FROM pkg_history
66   WHERE pkg_history.architecture::text = 'armel'::text;
67
68 CREATE RULE pkg_history_delete AS ON DELETE TO pkg_history DO INSTEAD DELETE FROM public.pkg_history p WHERE ((((((p.architecture)::text = 'armel'::text) AND ((p.package)::text = (old.package)::text)) AND ((p.distribution)::text = (old.distribution)::text)) AND (p.version OPERATOR(public.=) old.version)) AND (p."timestamp" = old."timestamp"));
69
70 CREATE RULE pkg_history_insert AS ON INSERT TO pkg_history DO INSTEAD INSERT INTO public.pkg_history (architecture, package, distribution, version, "timestamp", result, build_time, disk_space, builder) VALUES ('armel'::character varying, new.package, new.distribution, new.version, new."timestamp", new.result, new.build_time, new.disk_space, new.builder);
71
72 CREATE RULE pkg_history_update AS ON UPDATE TO pkg_history DO INSTEAD UPDATE public.pkg_history p SET result = new.result, build_time = new.build_time, disk_space = new.disk_space, builder = new.builder WHERE ((((((p.architecture)::text = 'armel'::text) AND ((p.package)::text = (old.package)::text)) AND ((p.distribution)::text = (old.distribution)::text)) AND (p.version OPERATOR(public.=) old.version)) AND (p."timestamp" = old."timestamp"));
73
74 GRANT ALL ON TABLE pkg_history TO wbadm;
75 GRANT SELECT ON TABLE pkg_history TO wb_security;
76 GRANT SELECT,INSERT,UPDATE ON TABLE pkg_history TO wb_all;
77
78 SET search_path = "hppa", public;
79
80 DROP VIEW pkg_history;
81
82 CREATE OR REPLACE VIEW pkg_history AS
83  SELECT pkg_history.package, pkg_history.distribution, pkg_history.version, pkg_history."timestamp", pkg_history.result, pkg_history.build_time, pkg_history.disk_space, pkg_history.builder
84    FROM pkg_history
85   WHERE pkg_history.architecture::text = 'hppa'::text;
86
87 CREATE RULE pkg_history_delete AS ON DELETE TO pkg_history DO INSTEAD DELETE FROM public.pkg_history p WHERE ((((((p.architecture)::text = 'hppa'::text) AND ((p.package)::text = (old.package)::text)) AND ((p.distribution)::text = (old.distribution)::text)) AND (p.version OPERATOR(public.=) old.version)) AND (p."timestamp" = old."timestamp"));
88
89 CREATE RULE pkg_history_insert AS ON INSERT TO pkg_history DO INSTEAD INSERT INTO public.pkg_history (architecture, package, distribution, version, "timestamp", result, build_time, disk_space, builder) VALUES ('hppa'::character varying, new.package, new.distribution, new.version, new."timestamp", new.result, new.build_time, new.disk_space, new.builder);
90
91 CREATE RULE pkg_history_update AS ON UPDATE TO pkg_history DO INSTEAD UPDATE public.pkg_history p SET result = new.result, build_time = new.build_time, disk_space = new.disk_space, builder = new.builder WHERE ((((((p.architecture)::text = 'hppa'::text) AND ((p.package)::text = (old.package)::text)) AND ((p.distribution)::text = (old.distribution)::text)) AND (p.version OPERATOR(public.=) old.version)) AND (p."timestamp" = old."timestamp"));
92
93 GRANT ALL ON TABLE pkg_history TO wbadm;
94 GRANT SELECT ON TABLE pkg_history TO wb_security;
95 GRANT SELECT,INSERT,UPDATE ON TABLE pkg_history TO wb_all;
96
97 SET search_path = "hurd-i386", public;
98
99 DROP VIEW pkg_history;
100
101 CREATE OR REPLACE VIEW pkg_history AS
102  SELECT pkg_history.package, pkg_history.distribution, pkg_history.version, pkg_history."timestamp", pkg_history.result, pkg_history.build_time, pkg_history.disk_space, pkg_history.builder
103    FROM pkg_history
104   WHERE pkg_history.architecture::text = 'hurd-i386'::text;
105
106 CREATE RULE pkg_history_delete AS ON DELETE TO pkg_history DO INSTEAD DELETE FROM public.pkg_history p WHERE ((((((p.architecture)::text = 'hurd-i386'::text) AND ((p.package)::text = (old.package)::text)) AND ((p.distribution)::text = (old.distribution)::text)) AND (p.version OPERATOR(public.=) old.version)) AND (p."timestamp" = old."timestamp"));
107
108 CREATE RULE pkg_history_insert AS ON INSERT TO pkg_history DO INSTEAD INSERT INTO public.pkg_history (architecture, package, distribution, version, "timestamp", result, build_time, disk_space, builder) VALUES ('hurd-i386'::character varying, new.package, new.distribution, new.version, new."timestamp", new.result, new.build_time, new.disk_space, new.builder);
109
110 CREATE RULE pkg_history_update AS ON UPDATE TO pkg_history DO INSTEAD UPDATE public.pkg_history p SET result = new.result, build_time = new.build_time, disk_space = new.disk_space, builder = new.builder WHERE ((((((p.architecture)::text = 'hurd-i386'::text) AND ((p.package)::text = (old.package)::text)) AND ((p.distribution)::text = (old.distribution)::text)) AND (p.version OPERATOR(public.=) old.version)) AND (p."timestamp" = old."timestamp"));
111
112 GRANT ALL ON TABLE pkg_history TO wbadm;
113 GRANT SELECT ON TABLE pkg_history TO wb_security;
114 GRANT SELECT,INSERT,UPDATE ON TABLE pkg_history TO wb_all;
115
116 SET search_path = "i386", public;
117
118 DROP VIEW pkg_history;
119
120 CREATE OR REPLACE VIEW pkg_history AS
121  SELECT pkg_history.package, pkg_history.distribution, pkg_history.version, pkg_history."timestamp", pkg_history.result, pkg_history.build_time, pkg_history.disk_space, pkg_history.builder
122    FROM pkg_history
123   WHERE pkg_history.architecture::text = 'i386'::text;
124
125 CREATE RULE pkg_history_delete AS ON DELETE TO pkg_history DO INSTEAD DELETE FROM public.pkg_history p WHERE ((((((p.architecture)::text = 'i386'::text) AND ((p.package)::text = (old.package)::text)) AND ((p.distribution)::text = (old.distribution)::text)) AND (p.version OPERATOR(public.=) old.version)) AND (p."timestamp" = old."timestamp"));
126
127 CREATE RULE pkg_history_insert AS ON INSERT TO pkg_history DO INSTEAD INSERT INTO public.pkg_history (architecture, package, distribution, version, "timestamp", result, build_time, disk_space, builder) VALUES ('i386'::character varying, new.package, new.distribution, new.version, new."timestamp", new.result, new.build_time, new.disk_space, new.builder);
128
129 CREATE RULE pkg_history_update AS ON UPDATE TO pkg_history DO INSTEAD UPDATE public.pkg_history p SET result = new.result, build_time = new.build_time, disk_space = new.disk_space, builder = new.builder WHERE ((((((p.architecture)::text = 'i386'::text) AND ((p.package)::text = (old.package)::text)) AND ((p.distribution)::text = (old.distribution)::text)) AND (p.version OPERATOR(public.=) old.version)) AND (p."timestamp" = old."timestamp"));
130
131 GRANT ALL ON TABLE pkg_history TO wbadm;
132 GRANT SELECT ON TABLE pkg_history TO wb_security;
133 GRANT SELECT,INSERT,UPDATE ON TABLE pkg_history TO wb_all;
134
135 SET search_path = "ia64", public;
136
137 DROP VIEW pkg_history;
138
139 CREATE OR REPLACE VIEW pkg_history AS
140  SELECT pkg_history.package, pkg_history.distribution, pkg_history.version, pkg_history."timestamp", pkg_history.result, pkg_history.build_time, pkg_history.disk_space, pkg_history.builder
141    FROM pkg_history
142   WHERE pkg_history.architecture::text = 'ia64'::text;
143
144 CREATE RULE pkg_history_delete AS ON DELETE TO pkg_history DO INSTEAD DELETE FROM public.pkg_history p WHERE ((((((p.architecture)::text = 'ia64'::text) AND ((p.package)::text = (old.package)::text)) AND ((p.distribution)::text = (old.distribution)::text)) AND (p.version OPERATOR(public.=) old.version)) AND (p."timestamp" = old."timestamp"));
145
146 CREATE RULE pkg_history_insert AS ON INSERT TO pkg_history DO INSTEAD INSERT INTO public.pkg_history (architecture, package, distribution, version, "timestamp", result, build_time, disk_space, builder) VALUES ('ia64'::character varying, new.package, new.distribution, new.version, new."timestamp", new.result, new.build_time, new.disk_space, new.builder);
147
148 CREATE RULE pkg_history_update AS ON UPDATE TO pkg_history DO INSTEAD UPDATE public.pkg_history p SET result = new.result, build_time = new.build_time, disk_space = new.disk_space, builder = new.builder WHERE ((((((p.architecture)::text = 'ia64'::text) AND ((p.package)::text = (old.package)::text)) AND ((p.distribution)::text = (old.distribution)::text)) AND (p.version OPERATOR(public.=) old.version)) AND (p."timestamp" = old."timestamp"));
149
150 GRANT ALL ON TABLE pkg_history TO wbadm;
151 GRANT SELECT ON TABLE pkg_history TO wb_security;
152 GRANT SELECT,INSERT,UPDATE ON TABLE pkg_history TO wb_all;
153
154 SET search_path = "kfreebsd-amd64", public;
155
156 DROP VIEW pkg_history;
157
158 CREATE OR REPLACE VIEW pkg_history AS
159  SELECT pkg_history.package, pkg_history.distribution, pkg_history.version, pkg_history."timestamp", pkg_history.result, pkg_history.build_time, pkg_history.disk_space, pkg_history.builder
160    FROM pkg_history
161   WHERE pkg_history.architecture::text = 'kfreebsd-amd64'::text;
162
163 CREATE RULE pkg_history_delete AS ON DELETE TO pkg_history DO INSTEAD DELETE FROM public.pkg_history p WHERE ((((((p.architecture)::text = 'kfreebsd-amd64'::text) AND ((p.package)::text = (old.package)::text)) AND ((p.distribution)::text = (old.distribution)::text)) AND (p.version OPERATOR(public.=) old.version)) AND (p."timestamp" = old."timestamp"));
164
165 CREATE RULE pkg_history_insert AS ON INSERT TO pkg_history DO INSTEAD INSERT INTO public.pkg_history (architecture, package, distribution, version, "timestamp", result, build_time, disk_space, builder) VALUES ('kfreebsd-amd64'::character varying, new.package, new.distribution, new.version, new."timestamp", new.result, new.build_time, new.disk_space, new.builder);
166
167 CREATE RULE pkg_history_update AS ON UPDATE TO pkg_history DO INSTEAD UPDATE public.pkg_history p SET result = new.result, build_time = new.build_time, disk_space = new.disk_space, builder = new.builder WHERE ((((((p.architecture)::text = 'kfreebsd-amd64'::text) AND ((p.package)::text = (old.package)::text)) AND ((p.distribution)::text = (old.distribution)::text)) AND (p.version OPERATOR(public.=) old.version)) AND (p."timestamp" = old."timestamp"));
168
169 GRANT ALL ON TABLE pkg_history TO wbadm;
170 GRANT SELECT ON TABLE pkg_history TO wb_security;
171 GRANT SELECT,INSERT,UPDATE ON TABLE pkg_history TO wb_all;
172
173 SET search_path = "kfreebsd-i386", public;
174
175 DROP VIEW pkg_history;
176
177 CREATE OR REPLACE VIEW pkg_history AS
178  SELECT pkg_history.package, pkg_history.distribution, pkg_history.version, pkg_history."timestamp", pkg_history.result, pkg_history.build_time, pkg_history.disk_space, pkg_history.builder
179    FROM pkg_history
180   WHERE pkg_history.architecture::text = 'kfreebsd-i386'::text;
181
182 CREATE RULE pkg_history_delete AS ON DELETE TO pkg_history DO INSTEAD DELETE FROM public.pkg_history p WHERE ((((((p.architecture)::text = 'kfreebsd-i386'::text) AND ((p.package)::text = (old.package)::text)) AND ((p.distribution)::text = (old.distribution)::text)) AND (p.version OPERATOR(public.=) old.version)) AND (p."timestamp" = old."timestamp"));
183
184 CREATE RULE pkg_history_insert AS ON INSERT TO pkg_history DO INSTEAD INSERT INTO public.pkg_history (architecture, package, distribution, version, "timestamp", result, build_time, disk_space, builder) VALUES ('kfreebsd-i386'::character varying, new.package, new.distribution, new.version, new."timestamp", new.result, new.build_time, new.disk_space, new.builder);
185
186 CREATE RULE pkg_history_update AS ON UPDATE TO pkg_history DO INSTEAD UPDATE public.pkg_history p SET result = new.result, build_time = new.build_time, disk_space = new.disk_space, builder = new.builder WHERE ((((((p.architecture)::text = 'kfreebsd-i386'::text) AND ((p.package)::text = (old.package)::text)) AND ((p.distribution)::text = (old.distribution)::text)) AND (p.version OPERATOR(public.=) old.version)) AND (p."timestamp" = old."timestamp"));
187
188 GRANT ALL ON TABLE pkg_history TO wbadm;
189 GRANT SELECT ON TABLE pkg_history TO wb_security;
190 GRANT SELECT,INSERT,UPDATE ON TABLE pkg_history TO wb_all;
191
192 SET search_path = "mips", public;
193
194 DROP VIEW pkg_history;
195
196 CREATE OR REPLACE VIEW pkg_history AS
197  SELECT pkg_history.package, pkg_history.distribution, pkg_history.version, pkg_history."timestamp", pkg_history.result, pkg_history.build_time, pkg_history.disk_space, pkg_history.builder
198    FROM pkg_history
199   WHERE pkg_history.architecture::text = 'mips'::text;
200
201 CREATE RULE pkg_history_delete AS ON DELETE TO pkg_history DO INSTEAD DELETE FROM public.pkg_history p WHERE ((((((p.architecture)::text = 'mips'::text) AND ((p.package)::text = (old.package)::text)) AND ((p.distribution)::text = (old.distribution)::text)) AND (p.version OPERATOR(public.=) old.version)) AND (p."timestamp" = old."timestamp"));
202
203 CREATE RULE pkg_history_insert AS ON INSERT TO pkg_history DO INSTEAD INSERT INTO public.pkg_history (architecture, package, distribution, version, "timestamp", result, build_time, disk_space, builder) VALUES ('mips'::character varying, new.package, new.distribution, new.version, new."timestamp", new.result, new.build_time, new.disk_space, new.builder);
204
205 CREATE RULE pkg_history_update AS ON UPDATE TO pkg_history DO INSTEAD UPDATE public.pkg_history p SET result = new.result, build_time = new.build_time, disk_space = new.disk_space, builder = new.builder WHERE ((((((p.architecture)::text = 'mips'::text) AND ((p.package)::text = (old.package)::text)) AND ((p.distribution)::text = (old.distribution)::text)) AND (p.version OPERATOR(public.=) old.version)) AND (p."timestamp" = old."timestamp"));
206
207 GRANT ALL ON TABLE pkg_history TO wbadm;
208 GRANT SELECT ON TABLE pkg_history TO wb_security;
209 GRANT SELECT,INSERT,UPDATE ON TABLE pkg_history TO wb_all;
210
211 SET search_path = "mipsel", public;
212
213 DROP VIEW pkg_history;
214
215 CREATE OR REPLACE VIEW pkg_history AS
216  SELECT pkg_history.package, pkg_history.distribution, pkg_history.version, pkg_history."timestamp", pkg_history.result, pkg_history.build_time, pkg_history.disk_space, pkg_history.builder
217    FROM pkg_history
218   WHERE pkg_history.architecture::text = 'mipsel'::text;
219
220 CREATE RULE pkg_history_delete AS ON DELETE TO pkg_history DO INSTEAD DELETE FROM public.pkg_history p WHERE ((((((p.architecture)::text = 'mipsel'::text) AND ((p.package)::text = (old.package)::text)) AND ((p.distribution)::text = (old.distribution)::text)) AND (p.version OPERATOR(public.=) old.version)) AND (p."timestamp" = old."timestamp"));
221
222 CREATE RULE pkg_history_insert AS ON INSERT TO pkg_history DO INSTEAD INSERT INTO public.pkg_history (architecture, package, distribution, version, "timestamp", result, build_time, disk_space, builder) VALUES ('mipsel'::character varying, new.package, new.distribution, new.version, new."timestamp", new.result, new.build_time, new.disk_space, new.builder);
223
224 CREATE RULE pkg_history_update AS ON UPDATE TO pkg_history DO INSTEAD UPDATE public.pkg_history p SET result = new.result, build_time = new.build_time, disk_space = new.disk_space, builder = new.builder WHERE ((((((p.architecture)::text = 'mipsel'::text) AND ((p.package)::text = (old.package)::text)) AND ((p.distribution)::text = (old.distribution)::text)) AND (p.version OPERATOR(public.=) old.version)) AND (p."timestamp" = old."timestamp"));
225
226 GRANT ALL ON TABLE pkg_history TO wbadm;
227 GRANT SELECT ON TABLE pkg_history TO wb_security;
228 GRANT SELECT,INSERT,UPDATE ON TABLE pkg_history TO wb_all;
229
230 SET search_path = "powerpc", public;
231
232 DROP VIEW pkg_history;
233
234 CREATE OR REPLACE VIEW pkg_history AS
235  SELECT pkg_history.package, pkg_history.distribution, pkg_history.version, pkg_history."timestamp", pkg_history.result, pkg_history.build_time, pkg_history.disk_space, pkg_history.builder
236    FROM pkg_history
237   WHERE pkg_history.architecture::text = 'powerpc'::text;
238
239 CREATE RULE pkg_history_delete AS ON DELETE TO pkg_history DO INSTEAD DELETE FROM public.pkg_history p WHERE ((((((p.architecture)::text = 'powerpc'::text) AND ((p.package)::text = (old.package)::text)) AND ((p.distribution)::text = (old.distribution)::text)) AND (p.version OPERATOR(public.=) old.version)) AND (p."timestamp" = old."timestamp"));
240
241 CREATE RULE pkg_history_insert AS ON INSERT TO pkg_history DO INSTEAD INSERT INTO public.pkg_history (architecture, package, distribution, version, "timestamp", result, build_time, disk_space, builder) VALUES ('powerpc'::character varying, new.package, new.distribution, new.version, new."timestamp", new.result, new.build_time, new.disk_space, new.builder);
242
243 CREATE RULE pkg_history_update AS ON UPDATE TO pkg_history DO INSTEAD UPDATE public.pkg_history p SET result = new.result, build_time = new.build_time, disk_space = new.disk_space, builder = new.builder WHERE ((((((p.architecture)::text = 'powerpc'::text) AND ((p.package)::text = (old.package)::text)) AND ((p.distribution)::text = (old.distribution)::text)) AND (p.version OPERATOR(public.=) old.version)) AND (p."timestamp" = old."timestamp"));
244
245 GRANT ALL ON TABLE pkg_history TO wbadm;
246 GRANT SELECT ON TABLE pkg_history TO wb_security;
247 GRANT SELECT,INSERT,UPDATE ON TABLE pkg_history TO wb_all;
248
249 SET search_path = "s390", public;
250
251 DROP VIEW pkg_history;
252
253 CREATE OR REPLACE VIEW pkg_history AS
254  SELECT pkg_history.package, pkg_history.distribution, pkg_history.version, pkg_history."timestamp", pkg_history.result, pkg_history.build_time, pkg_history.disk_space, pkg_history.builder
255    FROM pkg_history
256   WHERE pkg_history.architecture::text = 's390'::text;
257
258 CREATE RULE pkg_history_delete AS ON DELETE TO pkg_history DO INSTEAD DELETE FROM public.pkg_history p WHERE ((((((p.architecture)::text = 's390'::text) AND ((p.package)::text = (old.package)::text)) AND ((p.distribution)::text = (old.distribution)::text)) AND (p.version OPERATOR(public.=) old.version)) AND (p."timestamp" = old."timestamp"));
259
260 CREATE RULE pkg_history_insert AS ON INSERT TO pkg_history DO INSTEAD INSERT INTO public.pkg_history (architecture, package, distribution, version, "timestamp", result, build_time, disk_space, builder) VALUES ('s390'::character varying, new.package, new.distribution, new.version, new."timestamp", new.result, new.build_time, new.disk_space, new.builder);
261
262 CREATE RULE pkg_history_update AS ON UPDATE TO pkg_history DO INSTEAD UPDATE public.pkg_history p SET result = new.result, build_time = new.build_time, disk_space = new.disk_space, builder = new.builder WHERE ((((((p.architecture)::text = 's390'::text) AND ((p.package)::text = (old.package)::text)) AND ((p.distribution)::text = (old.distribution)::text)) AND (p.version OPERATOR(public.=) old.version)) AND (p."timestamp" = old."timestamp"));
263
264 GRANT ALL ON TABLE pkg_history TO wbadm;
265 GRANT SELECT ON TABLE pkg_history TO wb_security;
266 GRANT SELECT,INSERT,UPDATE ON TABLE pkg_history TO wb_all;
267
268 SET search_path = "sparc", public;
269
270 DROP VIEW pkg_history;
271
272 CREATE OR REPLACE VIEW pkg_history AS
273  SELECT pkg_history.package, pkg_history.distribution, pkg_history.version, pkg_history."timestamp", pkg_history.result, pkg_history.build_time, pkg_history.disk_space, pkg_history.builder
274    FROM pkg_history
275   WHERE pkg_history.architecture::text = 'sparc'::text;
276
277 CREATE RULE pkg_history_delete AS ON DELETE TO pkg_history DO INSTEAD DELETE FROM public.pkg_history p WHERE ((((((p.architecture)::text = 'sparc'::text) AND ((p.package)::text = (old.package)::text)) AND ((p.distribution)::text = (old.distribution)::text)) AND (p.version OPERATOR(public.=) old.version)) AND (p."timestamp" = old."timestamp"));
278
279 CREATE RULE pkg_history_insert AS ON INSERT TO pkg_history DO INSTEAD INSERT INTO public.pkg_history (architecture, package, distribution, version, "timestamp", result, build_time, disk_space, builder) VALUES ('sparc'::character varying, new.package, new.distribution, new.version, new."timestamp", new.result, new.build_time, new.disk_space, new.builder);
280
281 CREATE RULE pkg_history_update AS ON UPDATE TO pkg_history DO INSTEAD UPDATE public.pkg_history p SET result = new.result, build_time = new.build_time, disk_space = new.disk_space, builder = new.builder WHERE ((((((p.architecture)::text = 'sparc'::text) AND ((p.package)::text = (old.package)::text)) AND ((p.distribution)::text = (old.distribution)::text)) AND (p.version OPERATOR(public.=) old.version)) AND (p."timestamp" = old."timestamp"));
282
283 GRANT ALL ON TABLE pkg_history TO wbadm;
284 GRANT SELECT ON TABLE pkg_history TO wb_security;
285 GRANT SELECT,INSERT,UPDATE ON TABLE pkg_history TO wb_all;
286
287 SET search_path = "alpha_public", public;
288
289 DROP VIEW pkg_history;
290
291 CREATE OR REPLACE VIEW pkg_history AS
292  SELECT pkg_history.package, pkg_history.distribution, pkg_history.version, pkg_history."timestamp", pkg_history.result, pkg_history.build_time, pkg_history.disk_space, pkg_history.builder
293    FROM pkg_history
294 NATURAL JOIN distributions
295   WHERE distributions.public = true AND pkg_history.architecture::text = 'alpha'::text;
296
297 GRANT ALL ON TABLE pkg_history TO wbadm;
298 GRANT SELECT ON TABLE pkg_history TO PUBLIC;
299
300 SET search_path = "amd64_public", public;
301
302 DROP VIEW pkg_history;
303
304 CREATE OR REPLACE VIEW pkg_history AS
305  SELECT pkg_history.package, pkg_history.distribution, pkg_history.version, pkg_history."timestamp", pkg_history.result, pkg_history.build_time, pkg_history.disk_space, pkg_history.builder
306    FROM pkg_history
307 NATURAL JOIN distributions
308   WHERE distributions.public = true AND pkg_history.architecture::text = 'amd64'::text;
309
310 GRANT ALL ON TABLE pkg_history TO wbadm;
311 GRANT SELECT ON TABLE pkg_history TO PUBLIC;
312
313 SET search_path = "arm_public", public;
314
315 DROP VIEW pkg_history;
316
317 CREATE OR REPLACE VIEW pkg_history AS
318  SELECT pkg_history.package, pkg_history.distribution, pkg_history.version, pkg_history."timestamp", pkg_history.result, pkg_history.build_time, pkg_history.disk_space, pkg_history.builder
319    FROM pkg_history
320 NATURAL JOIN distributions
321   WHERE distributions.public = true AND pkg_history.architecture::text = 'arm'::text;
322
323 GRANT ALL ON TABLE pkg_history TO wbadm;
324 GRANT SELECT ON TABLE pkg_history TO PUBLIC;
325
326 SET search_path = "armel_public", public;
327
328 DROP VIEW pkg_history;
329
330 CREATE OR REPLACE VIEW pkg_history AS
331  SELECT pkg_history.package, pkg_history.distribution, pkg_history.version, pkg_history."timestamp", pkg_history.result, pkg_history.build_time, pkg_history.disk_space, pkg_history.builder
332    FROM pkg_history
333 NATURAL JOIN distributions
334   WHERE distributions.public = true AND pkg_history.architecture::text = 'armel'::text;
335
336 GRANT ALL ON TABLE pkg_history TO wbadm;
337 GRANT SELECT ON TABLE pkg_history TO PUBLIC;
338
339 SET search_path = "hppa_public", public;
340
341 DROP VIEW pkg_history;
342
343 CREATE OR REPLACE VIEW pkg_history AS
344  SELECT pkg_history.package, pkg_history.distribution, pkg_history.version, pkg_history."timestamp", pkg_history.result, pkg_history.build_time, pkg_history.disk_space, pkg_history.builder
345    FROM pkg_history
346 NATURAL JOIN distributions
347   WHERE distributions.public = true AND pkg_history.architecture::text = 'hppa'::text;
348
349 GRANT ALL ON TABLE pkg_history TO wbadm;
350 GRANT SELECT ON TABLE pkg_history TO PUBLIC;
351
352 SET search_path = "hurd-i386_public", public;
353
354 DROP VIEW pkg_history;
355
356 CREATE OR REPLACE VIEW pkg_history AS
357  SELECT pkg_history.package, pkg_history.distribution, pkg_history.version, pkg_history."timestamp", pkg_history.result, pkg_history.build_time, pkg_history.disk_space, pkg_history.builder
358    FROM pkg_history
359 NATURAL JOIN distributions
360   WHERE distributions.public = true AND pkg_history.architecture::text = 'hurd-i386'::text;
361
362 GRANT ALL ON TABLE pkg_history TO wbadm;
363 GRANT SELECT ON TABLE pkg_history TO PUBLIC;
364
365 SET search_path = "i386_public", public;
366
367 DROP VIEW pkg_history;
368
369 CREATE OR REPLACE VIEW pkg_history AS
370  SELECT pkg_history.package, pkg_history.distribution, pkg_history.version, pkg_history."timestamp", pkg_history.result, pkg_history.build_time, pkg_history.disk_space, pkg_history.builder
371    FROM pkg_history
372 NATURAL JOIN distributions
373   WHERE distributions.public = true AND pkg_history.architecture::text = 'i386'::text;
374
375 GRANT ALL ON TABLE pkg_history TO wbadm;
376 GRANT SELECT ON TABLE pkg_history TO PUBLIC;
377
378 SET search_path = "ia64_public", public;
379
380 DROP VIEW pkg_history;
381
382 CREATE OR REPLACE VIEW pkg_history AS
383  SELECT pkg_history.package, pkg_history.distribution, pkg_history.version, pkg_history."timestamp", pkg_history.result, pkg_history.build_time, pkg_history.disk_space, pkg_history.builder
384    FROM pkg_history
385 NATURAL JOIN distributions
386   WHERE distributions.public = true AND pkg_history.architecture::text = 'ia64'::text;
387
388 GRANT ALL ON TABLE pkg_history TO wbadm;
389 GRANT SELECT ON TABLE pkg_history TO PUBLIC;
390
391 SET search_path = "kfreebsd-amd64_public", public;
392
393 DROP VIEW pkg_history;
394
395 CREATE OR REPLACE VIEW pkg_history AS
396  SELECT pkg_history.package, pkg_history.distribution, pkg_history.version, pkg_history."timestamp", pkg_history.result, pkg_history.build_time, pkg_history.disk_space, pkg_history.builder
397    FROM pkg_history
398 NATURAL JOIN distributions
399   WHERE distributions.public = true AND pkg_history.architecture::text = 'kfreebsd-amd64'::text;
400
401 GRANT ALL ON TABLE pkg_history TO wbadm;
402 GRANT SELECT ON TABLE pkg_history TO PUBLIC;
403
404 SET search_path = "kfreebsd-i386_public", public;
405
406 DROP VIEW pkg_history;
407
408 CREATE OR REPLACE VIEW pkg_history AS
409  SELECT pkg_history.package, pkg_history.distribution, pkg_history.version, pkg_history."timestamp", pkg_history.result, pkg_history.build_time, pkg_history.disk_space, pkg_history.builder
410    FROM pkg_history
411 NATURAL JOIN distributions
412   WHERE distributions.public = true AND pkg_history.architecture::text = 'kfreebsd-i386'::text;
413
414 GRANT ALL ON TABLE pkg_history TO wbadm;
415 GRANT SELECT ON TABLE pkg_history TO PUBLIC;
416
417 SET search_path = "mips_public", public;
418
419 DROP VIEW pkg_history;
420
421 CREATE OR REPLACE VIEW pkg_history AS
422  SELECT pkg_history.package, pkg_history.distribution, pkg_history.version, pkg_history."timestamp", pkg_history.result, pkg_history.build_time, pkg_history.disk_space, pkg_history.builder
423    FROM pkg_history
424 NATURAL JOIN distributions
425   WHERE distributions.public = true AND pkg_history.architecture::text = 'mips'::text;
426
427 GRANT ALL ON TABLE pkg_history TO wbadm;
428 GRANT SELECT ON TABLE pkg_history TO PUBLIC;
429
430 SET search_path = "mipsel_public", public;
431
432 DROP VIEW pkg_history;
433
434 CREATE OR REPLACE VIEW pkg_history AS
435  SELECT pkg_history.package, pkg_history.distribution, pkg_history.version, pkg_history."timestamp", pkg_history.result, pkg_history.build_time, pkg_history.disk_space, pkg_history.builder
436    FROM pkg_history
437 NATURAL JOIN distributions
438   WHERE distributions.public = true AND pkg_history.architecture::text = 'mipsel'::text;
439
440 GRANT ALL ON TABLE pkg_history TO wbadm;
441 GRANT SELECT ON TABLE pkg_history TO PUBLIC;
442
443 SET search_path = "powerpc_public", public;
444
445 DROP VIEW pkg_history;
446
447 CREATE OR REPLACE VIEW pkg_history AS
448  SELECT pkg_history.package, pkg_history.distribution, pkg_history.version, pkg_history."timestamp", pkg_history.result, pkg_history.build_time, pkg_history.disk_space, pkg_history.builder
449    FROM pkg_history
450 NATURAL JOIN distributions
451   WHERE distributions.public = true AND pkg_history.architecture::text = 'powerpc'::text;
452
453 GRANT ALL ON TABLE pkg_history TO wbadm;
454 GRANT SELECT ON TABLE pkg_history TO PUBLIC;
455
456 SET search_path = "s390_public", public;
457
458 DROP VIEW pkg_history;
459
460 CREATE OR REPLACE VIEW pkg_history AS
461  SELECT pkg_history.package, pkg_history.distribution, pkg_history.version, pkg_history."timestamp", pkg_history.result, pkg_history.build_time, pkg_history.disk_space, pkg_history.builder
462    FROM pkg_history
463 NATURAL JOIN distributions
464   WHERE distributions.public = true AND pkg_history.architecture::text = 's390'::text;
465
466 GRANT ALL ON TABLE pkg_history TO wbadm;
467 GRANT SELECT ON TABLE pkg_history TO PUBLIC;
468
469 SET search_path = "sparc_public", public;
470
471 DROP VIEW pkg_history;
472
473 CREATE OR REPLACE VIEW pkg_history AS
474  SELECT pkg_history.package, pkg_history.distribution, pkg_history.version, pkg_history."timestamp", pkg_history.result, pkg_history.build_time, pkg_history.disk_space, pkg_history.builder
475    FROM pkg_history
476 NATURAL JOIN distributions
477   WHERE distributions.public = true AND pkg_history.architecture::text = 'sparc'::text;
478
479 GRANT ALL ON TABLE pkg_history TO wbadm;
480 GRANT SELECT ON TABLE pkg_history TO PUBLIC;
481