aboutsummaryrefslogtreecommitdiff
path: root/libbrep/build-extra.sql
blob: 0c0f0100d295870cfb759e3f99302e7913ab2bf0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
-- This file should be parsable by the brep-migrate utility. To decrease the
-- parser complexity, there is a number of restrictions, see package-extra.sql
-- file for details.
--
-- Increment the database 'build' schema version when update this file, see
-- package-extra.sql file for details.
--

DROP FOREIGN TABLE IF EXISTS build_package_config_bot_keys;

DROP FOREIGN TABLE IF EXISTS build_package_config_auxiliaries;

DROP FOREIGN TABLE IF EXISTS build_package_config_constraints;

DROP FOREIGN TABLE IF EXISTS build_package_config_builds;

DROP FOREIGN TABLE IF EXISTS build_package_configs;

DROP FOREIGN TABLE IF EXISTS build_package_bot_keys;

DROP FOREIGN TABLE IF EXISTS build_package_auxiliaries;

DROP FOREIGN TABLE IF EXISTS build_package_constraints;

DROP FOREIGN TABLE IF EXISTS build_package_builds;

DROP FOREIGN TABLE IF EXISTS build_package_tests;

DROP FOREIGN TABLE IF EXISTS build_package_requirement_alternative_requirements;

DROP FOREIGN TABLE IF EXISTS build_package_requirement_alternatives;

DROP FOREIGN TABLE IF EXISTS build_package_requirements;

DROP FOREIGN TABLE IF EXISTS build_package;

DROP FOREIGN TABLE IF EXISTS build_public_key;

DROP FOREIGN TABLE IF EXISTS build_repository;

DROP FOREIGN TABLE IF EXISTS build_tenant;

-- The foreign table for build_tenant object.
--
CREATE FOREIGN TABLE build_tenant (
  id TEXT NOT NULL,
  private BOOLEAN NOT NULL,
  interactive TEXT NULL,
  creation_timestamp BIGINT NOT NULL,
  archived BOOLEAN NOT NULL,
  service_id TEXT NULL,
  service_type TEXT NULL,
  service_data TEXT NULL,
  unloaded_timestamp BIGINT NULL,
  unloaded_notify_interval BIGINT NULL,
  queued_timestamp BIGINT NULL,
  toolchain_name TEXT OPTIONS (column_name 'build_toolchain_name') NULL,
  toolchain_version_epoch INTEGER OPTIONS (column_name 'build_toolchain_version_epoch') NULL,
  toolchain_version_canonical_upstream TEXT OPTIONS (column_name 'build_toolchain_version_canonical_upstream') NULL,
  toolchain_version_canonical_release TEXT OPTIONS (column_name 'build_toolchain_version_canonical_release') NULL,
  toolchain_version_revision INTEGER OPTIONS (column_name 'build_toolchain_version_revision') NULL,
  toolchain_version_upstream TEXT OPTIONS (column_name 'build_toolchain_version_upstream') NULL,
  toolchain_version_release TEXT OPTIONS (column_name 'build_toolchain_version_release') NULL)
SERVER package_server OPTIONS (table_name 'tenant');

-- The foreign table for build_repository object.
--
CREATE FOREIGN TABLE build_repository (
  tenant TEXT NOT NULL,
  canonical_name TEXT NOT NULL,
  location_url TEXT NOT NULL,
  location_type TEXT NOT NULL,
  certificate_fingerprint TEXT NULL)
SERVER package_server OPTIONS (table_name 'repository');

-- The foreign table for build_public_key object.
--
CREATE FOREIGN TABLE build_public_key (
  tenant TEXT NOT NULL,
  fingerprint TEXT NOT NULL,
  "data" TEXT NOT NULL)
SERVER package_server OPTIONS (table_name 'public_key');

-- The foreign table for build_package object.
--
CREATE FOREIGN TABLE build_package (
  tenant TEXT NOT NULL,
  name CITEXT NOT NULL,
  version_epoch INTEGER NOT NULL,
  version_canonical_upstream TEXT NOT NULL,
  version_canonical_release TEXT NOT NULL COLLATE "C",
  version_revision INTEGER NOT NULL,
  version_upstream TEXT NOT NULL,
  version_release TEXT NULL,
  project CITEXT NOT NULL,
  build_email TEXT NULL,
  build_email_comment TEXT NULL,
  build_warning_email TEXT NULL,
  build_warning_email_comment TEXT NULL,
  build_error_email TEXT NULL,
  build_error_email_comment TEXT NULL,
  internal_repository_tenant TEXT NULL,
  internal_repository_canonical_name TEXT NULL,
  buildable BOOLEAN NOT NULL,
  custom_bot BOOLEAN NULL)
SERVER package_server OPTIONS (table_name 'package');

-- The foreign tables for the build_package object requirements member (that
-- is of a 3-dimensional container type).
--
CREATE FOREIGN TABLE build_package_requirements (
  tenant TEXT NOT NULL,
  name CITEXT NOT NULL,
  version_epoch INTEGER NOT NULL,
  version_canonical_upstream TEXT NOT NULL,
  version_canonical_release TEXT NOT NULL COLLATE "C",
  version_revision INTEGER NOT NULL,
  index BIGINT NOT NULL,
  buildtime BOOLEAN NOT NULL,
  comment TEXT NOT NULL)
SERVER package_server OPTIONS (table_name 'package_requirements');

CREATE FOREIGN TABLE build_package_requirement_alternatives (
  tenant TEXT NOT NULL,
  name CITEXT NOT NULL,
  version_epoch INTEGER NOT NULL,
  version_canonical_upstream TEXT NOT NULL,
  version_canonical_release TEXT NOT NULL COLLATE "C",
  version_revision INTEGER NOT NULL,
  requirement_index BIGINT NOT NULL,
  index BIGINT NOT NULL,
  enable TEXT NULL,
  reflect TEXT NULL)
SERVER package_server OPTIONS (table_name 'package_requirement_alternatives');

CREATE FOREIGN TABLE build_package_requirement_alternative_requirements (
  tenant TEXT NOT NULL,
  name CITEXT NOT NULL,
  version_epoch INTEGER NOT NULL,
  version_canonical_upstream TEXT NOT NULL,
  version_canonical_release TEXT NOT NULL COLLATE "C",
  version_revision INTEGER NOT NULL,
  requirement_index BIGINT NOT NULL,
  alternative_index BIGINT NOT NULL,
  index BIGINT NOT NULL,
  id TEXT NOT NULL)
SERVER package_server OPTIONS (table_name 'package_requirement_alternative_requirements');

-- The foreign table for the build_package object tests member (that is of a
-- container type).
--
CREATE FOREIGN TABLE build_package_tests (
  tenant TEXT NOT NULL,
  name CITEXT NOT NULL,
  version_epoch INTEGER NOT NULL,
  version_canonical_upstream TEXT NOT NULL,
  version_canonical_release TEXT NOT NULL COLLATE "C",
  version_revision INTEGER NOT NULL,
  index BIGINT NOT NULL,
  test_name CITEXT NOT NULL,
  test_min_version_epoch INTEGER NULL,
  test_min_version_canonical_upstream TEXT NULL,
  test_min_version_canonical_release TEXT NULL,
  test_min_version_revision INTEGER NULL,
  test_min_version_upstream TEXT NULL,
  test_min_version_release TEXT NULL,
  test_max_version_epoch INTEGER NULL,
  test_max_version_canonical_upstream TEXT NULL,
  test_max_version_canonical_release TEXT NULL,
  test_max_version_revision INTEGER NULL,
  test_max_version_upstream TEXT NULL,
  test_max_version_release TEXT NULL,
  test_min_open BOOLEAN NULL,
  test_max_open BOOLEAN NULL,
  test_package_tenant TEXT NULL,
  test_package_name CITEXT NULL,
  test_package_version_epoch INTEGER NULL,
  test_package_version_canonical_upstream TEXT NULL,
  test_package_version_canonical_release TEXT NULL COLLATE "C",
  test_package_version_revision INTEGER NULL,
  test_type TEXT NOT NULL,
  test_buildtime BOOLEAN NOT NULL,
  test_enable TEXT NULL,
  test_reflect TEXT NULL)
SERVER package_server OPTIONS (table_name 'package_tests');

-- The foreign table for the build_package object builds member (that is of a
-- container type).
--
CREATE FOREIGN TABLE build_package_builds (
  tenant TEXT NOT NULL,
  name CITEXT NOT NULL,
  version_epoch INTEGER NOT NULL,
  version_canonical_upstream TEXT NOT NULL,
  version_canonical_release TEXT NOT NULL COLLATE "C",
  version_revision INTEGER NOT NULL,
  index BIGINT NOT NULL,
  expression TEXT NOT NULL,
  comment TEXT NOT NULL)
SERVER package_server OPTIONS (table_name 'package_builds');

-- The foreign table for the build_package object constraints member (that is
-- of a container type).
--
CREATE FOREIGN TABLE build_package_constraints (
  tenant TEXT NOT NULL,
  name CITEXT NOT NULL,
  version_epoch INTEGER NOT NULL,
  version_canonical_upstream TEXT NOT NULL,
  version_canonical_release TEXT NOT NULL COLLATE "C",
  version_revision INTEGER NOT NULL,
  index BIGINT NOT NULL,
  exclusion BOOLEAN NOT NULL,
  config TEXT NOT NULL,
  target TEXT NULL,
  comment TEXT NOT NULL)
SERVER package_server OPTIONS (table_name 'package_build_constraints');

-- The foreign table for the build_package object auxiliaries member (that is
-- of a container type).
--
CREATE FOREIGN TABLE build_package_auxiliaries (
  tenant TEXT NOT NULL,
  name CITEXT NOT NULL,
  version_epoch INTEGER NOT NULL,
  version_canonical_upstream TEXT NOT NULL,
  version_canonical_release TEXT NOT NULL COLLATE "C",
  version_revision INTEGER NOT NULL,
  index BIGINT NOT NULL,
  environment_name TEXT NOT NULL,
  config TEXT NOT NULL,
  comment TEXT NOT NULL)
SERVER package_server OPTIONS (table_name 'package_build_auxiliaries');

-- The foreign table for the build_package object bot_keys member (that is
-- of a container type).
--
CREATE FOREIGN TABLE build_package_bot_keys (
  tenant TEXT NOT NULL,
  name CITEXT NOT NULL,
  version_epoch INTEGER NOT NULL,
  version_canonical_upstream TEXT NOT NULL,
  version_canonical_release TEXT NOT NULL COLLATE "C",
  version_revision INTEGER NOT NULL,
  index BIGINT NOT NULL,
  key_tenant TEXT NOT NULL,
  key_fingerprint TEXT NOT NULL)
SERVER package_server OPTIONS (table_name 'package_build_bot_keys');

-- The foreign tables for the build_package object configs member (that is a
-- container of values containing containers.
--
CREATE FOREIGN TABLE build_package_configs (
  tenant TEXT NOT NULL,
  name CITEXT NOT NULL,
  version_epoch INTEGER NOT NULL,
  version_canonical_upstream TEXT NOT NULL,
  version_canonical_release TEXT NOT NULL COLLATE "C",
  version_revision INTEGER NOT NULL,
  index BIGINT NOT NULL,
  config_name TEXT NOT NULL,
  config_arguments TEXT NULL,
  config_comment TEXT NOT NULL,
  config_email TEXT NULL,
  config_email_comment TEXT NULL,
  config_warning_email TEXT NULL,
  config_warning_email_comment TEXT NULL,
  config_error_email TEXT NULL,
  config_error_email_comment TEXT NULL)
SERVER package_server OPTIONS (table_name 'package_build_configs');

CREATE FOREIGN TABLE build_package_config_builds (
  tenant TEXT NOT NULL,
  name CITEXT NOT NULL,
  version_epoch INTEGER NOT NULL,
  version_canonical_upstream TEXT NOT NULL,
  version_canonical_release TEXT NOT NULL COLLATE "C",
  version_revision INTEGER NOT NULL,
  config_index BIGINT NOT NULL,
  index BIGINT NOT NULL,
  expression TEXT NOT NULL,
  comment TEXT NOT NULL)
SERVER package_server OPTIONS (table_name 'package_build_config_builds');

CREATE FOREIGN TABLE build_package_config_constraints (
  tenant TEXT NOT NULL,
  name CITEXT NOT NULL,
  version_epoch INTEGER NOT NULL,
  version_canonical_upstream TEXT NOT NULL,
  version_canonical_release TEXT NOT NULL COLLATE "C",
  version_revision INTEGER NOT NULL,
  config_index BIGINT NOT NULL,
  index BIGINT NOT NULL,
  exclusion BOOLEAN NOT NULL,
  config TEXT NOT NULL,
  target TEXT NULL,
  comment TEXT NOT NULL)
SERVER package_server OPTIONS (table_name 'package_build_config_constraints');

CREATE FOREIGN TABLE build_package_config_auxiliaries (
  tenant TEXT NOT NULL,
  name CITEXT NOT NULL,
  version_epoch INTEGER NOT NULL,
  version_canonical_upstream TEXT NOT NULL,
  version_canonical_release TEXT NOT NULL COLLATE "C",
  version_revision INTEGER NOT NULL,
  config_index BIGINT NOT NULL,
  index BIGINT NOT NULL,
  environment_name TEXT NOT NULL,
  config TEXT NOT NULL,
  comment TEXT NOT NULL)
SERVER package_server OPTIONS (table_name 'package_build_config_auxiliaries');

CREATE FOREIGN TABLE build_package_config_bot_keys (
  tenant TEXT NOT NULL,
  name CITEXT NOT NULL,
  version_epoch INTEGER NOT NULL,
  version_canonical_upstream TEXT NOT NULL,
  version_canonical_release TEXT NOT NULL COLLATE "C",
  version_revision INTEGER NOT NULL,
  config_index BIGINT NOT NULL,
  index BIGINT NOT NULL,
  key_tenant TEXT NOT NULL,
  key_fingerprint TEXT NOT NULL)
SERVER package_server OPTIONS (table_name 'package_build_config_bot_keys');