@open-qa/qa 0.1.0-alpha.4 → 0.1.0-alpha.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/THIRD_PARTY.md +5 -0
  2. package/drizzle/0017_provider_notifications.sql +13 -0
  3. package/drizzle/0018_classification_registry.sql +39 -0
  4. package/drizzle/0019_trial_audit.sql +44 -0
  5. package/drizzle/meta/0017_snapshot.json +2092 -0
  6. package/drizzle/meta/0018_snapshot.json +2102 -0
  7. package/drizzle/meta/0019_snapshot.json +2451 -0
  8. package/drizzle/meta/_journal.json +21 -0
  9. package/package.json +12 -7
  10. package/src/access-binding.d.ts +8 -0
  11. package/src/access-binding.js +26 -0
  12. package/src/adapters/classification-write.d.ts +87 -0
  13. package/src/adapters/classification-write.js +64 -0
  14. package/src/adapters/e2b-executor.js +4 -0
  15. package/src/adapters/file-run-store.d.ts +186 -41
  16. package/src/adapters/file-run-store.js +87 -19
  17. package/src/adapters/file-trial-audit.d.ts +280 -0
  18. package/src/adapters/file-trial-audit.js +105 -0
  19. package/src/adapters/pg-classification-store.d.ts +98 -20
  20. package/src/adapters/pg-classification-store.js +84 -44
  21. package/src/adapters/pg-run-store.d.ts +1 -0
  22. package/src/adapters/pg-run-store.js +70 -9
  23. package/src/adapters/run-metadata.d.ts +2 -0
  24. package/src/adapters/run-metadata.js +10 -0
  25. package/src/adapters/secret-manager-credential-resolver.d.ts +1 -1
  26. package/src/attempt-audit.d.ts +363 -0
  27. package/src/attempt-audit.js +253 -0
  28. package/src/audit-command.d.ts +13 -0
  29. package/src/audit-command.js +77 -0
  30. package/src/classification-command.d.ts +14 -9
  31. package/src/classification-command.js +119 -26
  32. package/src/classification-model.d.ts +10 -3
  33. package/src/classification-model.js +40 -24
  34. package/src/classification-notifier.d.ts +4 -3
  35. package/src/classification-notifier.js +26 -6
  36. package/src/classify-runs.d.ts +2 -1
  37. package/src/classify-runs.js +39 -3
  38. package/src/cli-program.js +53 -7
  39. package/src/commands.d.ts +1 -0
  40. package/src/commands.js +2 -0
  41. package/src/db/database.d.ts +7 -0
  42. package/src/db/database.js +15 -0
  43. package/src/db/event-chunks.d.ts +38 -29
  44. package/src/db/flow-status.d.ts +7 -3
  45. package/src/db/flow-status.js +240 -16
  46. package/src/db/queries.d.ts +24 -1
  47. package/src/db/queries.js +22 -0
  48. package/src/db/schema.d.ts +333 -4
  49. package/src/db/schema.js +83 -11
  50. package/src/db/trial-audit.d.ts +526 -0
  51. package/src/db/trial-audit.js +84 -0
  52. package/src/draft-api.d.ts +25 -421
  53. package/src/draft-api.js +10 -3
  54. package/src/engine.d.ts +47 -4
  55. package/src/engine.js +97 -8
  56. package/src/execution-snapshot.d.ts +1 -1
  57. package/src/execution-snapshot.js +22 -17
  58. package/src/export-command.d.ts +6 -0
  59. package/src/export-command.js +106 -0
  60. package/src/flow-check.js +1 -1
  61. package/src/flow-loader.d.ts +72 -6
  62. package/src/flow-loader.js +76 -12
  63. package/src/http-stage-client.d.ts +98 -1
  64. package/src/independent-model.js +53 -6
  65. package/src/judge-review-store.d.ts +13 -0
  66. package/src/judge-review-store.js +58 -0
  67. package/src/local-host-executor.d.ts +3 -1
  68. package/src/local-host-executor.js +2 -0
  69. package/src/quarantine-command.d.ts +5 -1
  70. package/src/quarantine-command.js +56 -13
  71. package/src/remote-command.js +2 -0
  72. package/src/report/browser.js +37 -37
  73. package/src/report/ctrf.d.ts +983 -0
  74. package/src/report/ctrf.js +306 -0
  75. package/src/report/generate.d.ts +1 -1
  76. package/src/report/generate.js +29 -6
  77. package/src/report/load.d.ts +738 -42
  78. package/src/report/load.js +78 -6
  79. package/src/result-notifier.js +1 -1
  80. package/src/result-trace.d.ts +62 -0
  81. package/src/result-trace.js +81 -0
  82. package/src/run-command.d.ts +2 -0
  83. package/src/run-command.js +285 -62
  84. package/src/run-setup-error.d.ts +1 -1
  85. package/src/run-setup-error.js +2 -2
  86. package/src/server/app.js +5 -4
  87. package/src/server/index.d.ts +2 -0
  88. package/src/server/index.js +11 -2
  89. package/src/server/repository.d.ts +166 -29
  90. package/src/server/repository.js +14 -2
  91. package/src/studio-review.js +1 -1
  92. package/src/system-config.d.ts +2 -2
  93. package/src/system-config.js +5 -4
  94. package/src/trial-audit.d.ts +630 -0
  95. package/src/trial-audit.js +272 -0
  96. package/src/visual-baseline.d.ts +4 -0
  97. package/src/visual-baseline.js +42 -0
  98. package/src/webhook-notification.d.ts +15 -0
  99. package/src/webhook-notification.js +61 -0
  100. package/src/worker/execution.d.ts +2 -1
  101. package/src/worker/execution.js +122 -3
  102. package/src/worker/index.d.ts +4 -0
  103. package/src/worker/index.js +10 -1
  104. package/src/worker/quarantine-notifications.js +2 -2
  105. package/src/worker/queue.d.ts +6 -2
  106. package/src/worker/queue.js +80 -19
  107. package/src/worker/result-notifications.d.ts +10 -2
  108. package/src/worker/result-notifications.js +120 -23
  109. package/src/worker/store.js +6 -3
@@ -0,0 +1,2451 @@
1
+ {
2
+ "id": "5e1cf653-7a3e-4280-a61c-215d2c2ea534",
3
+ "prevId": "2993f602-325c-43e7-ab9f-bf5fc8378336",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "qa.artifacts": {
8
+ "name": "artifacts",
9
+ "schema": "qa",
10
+ "columns": {
11
+ "project_id": {
12
+ "name": "project_id",
13
+ "type": "text",
14
+ "primaryKey": false,
15
+ "notNull": true
16
+ },
17
+ "run_id": {
18
+ "name": "run_id",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true
22
+ },
23
+ "path": {
24
+ "name": "path",
25
+ "type": "text",
26
+ "primaryKey": false,
27
+ "notNull": true
28
+ },
29
+ "kind": {
30
+ "name": "kind",
31
+ "type": "text",
32
+ "primaryKey": false,
33
+ "notNull": true
34
+ },
35
+ "object_key": {
36
+ "name": "object_key",
37
+ "type": "text",
38
+ "primaryKey": false,
39
+ "notNull": true
40
+ },
41
+ "bytes": {
42
+ "name": "bytes",
43
+ "type": "bigint",
44
+ "primaryKey": false,
45
+ "notNull": true
46
+ },
47
+ "sha256": {
48
+ "name": "sha256",
49
+ "type": "text",
50
+ "primaryKey": false,
51
+ "notNull": true
52
+ }
53
+ },
54
+ "indexes": {},
55
+ "foreignKeys": {
56
+ "artifacts_project_id_run_id_runs_project_id_id_fk": {
57
+ "name": "artifacts_project_id_run_id_runs_project_id_id_fk",
58
+ "tableFrom": "artifacts",
59
+ "tableTo": "runs",
60
+ "schemaTo": "qa",
61
+ "columnsFrom": [
62
+ "project_id",
63
+ "run_id"
64
+ ],
65
+ "columnsTo": [
66
+ "project_id",
67
+ "id"
68
+ ],
69
+ "onDelete": "no action",
70
+ "onUpdate": "no action"
71
+ }
72
+ },
73
+ "compositePrimaryKeys": {
74
+ "artifacts_project_id_run_id_path_pk": {
75
+ "name": "artifacts_project_id_run_id_path_pk",
76
+ "columns": [
77
+ "project_id",
78
+ "run_id",
79
+ "path"
80
+ ]
81
+ }
82
+ },
83
+ "uniqueConstraints": {},
84
+ "policies": {},
85
+ "checkConstraints": {},
86
+ "isRLSEnabled": false
87
+ },
88
+ "qa.audit_decisions": {
89
+ "name": "audit_decisions",
90
+ "schema": "qa",
91
+ "columns": {
92
+ "project_id": {
93
+ "name": "project_id",
94
+ "type": "text",
95
+ "primaryKey": false,
96
+ "notNull": true
97
+ },
98
+ "subject": {
99
+ "name": "subject",
100
+ "type": "text",
101
+ "primaryKey": false,
102
+ "notNull": true
103
+ },
104
+ "key": {
105
+ "name": "key",
106
+ "type": "text",
107
+ "primaryKey": false,
108
+ "notNull": true
109
+ },
110
+ "document": {
111
+ "name": "document",
112
+ "type": "jsonb",
113
+ "primaryKey": false,
114
+ "notNull": true
115
+ }
116
+ },
117
+ "indexes": {},
118
+ "foreignKeys": {},
119
+ "compositePrimaryKeys": {
120
+ "audit_decisions_project_id_subject_key_pk": {
121
+ "name": "audit_decisions_project_id_subject_key_pk",
122
+ "columns": [
123
+ "project_id",
124
+ "subject",
125
+ "key"
126
+ ]
127
+ }
128
+ },
129
+ "uniqueConstraints": {},
130
+ "policies": {},
131
+ "checkConstraints": {},
132
+ "isRLSEnabled": false
133
+ },
134
+ "qa.batches": {
135
+ "name": "batches",
136
+ "schema": "qa",
137
+ "columns": {
138
+ "project_id": {
139
+ "name": "project_id",
140
+ "type": "text",
141
+ "primaryKey": false,
142
+ "notNull": true
143
+ },
144
+ "id": {
145
+ "name": "id",
146
+ "type": "text",
147
+ "primaryKey": false,
148
+ "notNull": true
149
+ },
150
+ "trigger": {
151
+ "name": "trigger",
152
+ "type": "text",
153
+ "primaryKey": false,
154
+ "notNull": true
155
+ },
156
+ "target": {
157
+ "name": "target",
158
+ "type": "text",
159
+ "primaryKey": false,
160
+ "notNull": false
161
+ },
162
+ "commit": {
163
+ "name": "commit",
164
+ "type": "text",
165
+ "primaryKey": false,
166
+ "notNull": false
167
+ },
168
+ "created_by": {
169
+ "name": "created_by",
170
+ "type": "text",
171
+ "primaryKey": false,
172
+ "notNull": false
173
+ },
174
+ "created_at": {
175
+ "name": "created_at",
176
+ "type": "timestamp with time zone",
177
+ "primaryKey": false,
178
+ "notNull": true,
179
+ "default": "now()"
180
+ }
181
+ },
182
+ "indexes": {},
183
+ "foreignKeys": {},
184
+ "compositePrimaryKeys": {
185
+ "batches_project_id_id_pk": {
186
+ "name": "batches_project_id_id_pk",
187
+ "columns": [
188
+ "project_id",
189
+ "id"
190
+ ]
191
+ }
192
+ },
193
+ "uniqueConstraints": {},
194
+ "policies": {},
195
+ "checkConstraints": {},
196
+ "isRLSEnabled": false
197
+ },
198
+ "qa.cache_entries": {
199
+ "name": "cache_entries",
200
+ "schema": "qa",
201
+ "columns": {
202
+ "project_id": {
203
+ "name": "project_id",
204
+ "type": "text",
205
+ "primaryKey": false,
206
+ "notNull": true
207
+ },
208
+ "cache_key": {
209
+ "name": "cache_key",
210
+ "type": "text",
211
+ "primaryKey": false,
212
+ "notNull": true
213
+ },
214
+ "version": {
215
+ "name": "version",
216
+ "type": "integer",
217
+ "primaryKey": false,
218
+ "notNull": true
219
+ },
220
+ "entry": {
221
+ "name": "entry",
222
+ "type": "jsonb",
223
+ "primaryKey": false,
224
+ "notNull": true
225
+ },
226
+ "created_at": {
227
+ "name": "created_at",
228
+ "type": "timestamp with time zone",
229
+ "primaryKey": false,
230
+ "notNull": true,
231
+ "default": "now()"
232
+ }
233
+ },
234
+ "indexes": {},
235
+ "foreignKeys": {},
236
+ "compositePrimaryKeys": {
237
+ "cache_entries_project_id_cache_key_version_pk": {
238
+ "name": "cache_entries_project_id_cache_key_version_pk",
239
+ "columns": [
240
+ "project_id",
241
+ "cache_key",
242
+ "version"
243
+ ]
244
+ }
245
+ },
246
+ "uniqueConstraints": {},
247
+ "policies": {},
248
+ "checkConstraints": {
249
+ "cache_version_positive": {
250
+ "name": "cache_version_positive",
251
+ "value": "\"qa\".\"cache_entries\".\"version\" > 0"
252
+ }
253
+ },
254
+ "isRLSEnabled": false
255
+ },
256
+ "qa.classification_labels": {
257
+ "name": "classification_labels",
258
+ "schema": "qa",
259
+ "columns": {
260
+ "project_id": {
261
+ "name": "project_id",
262
+ "type": "text",
263
+ "primaryKey": false,
264
+ "notNull": true
265
+ },
266
+ "run_id": {
267
+ "name": "run_id",
268
+ "type": "text",
269
+ "primaryKey": false,
270
+ "notNull": true
271
+ },
272
+ "ordinal": {
273
+ "name": "ordinal",
274
+ "type": "integer",
275
+ "primaryKey": false,
276
+ "notNull": true
277
+ },
278
+ "category": {
279
+ "name": "category",
280
+ "type": "text",
281
+ "primaryKey": false,
282
+ "notNull": true
283
+ },
284
+ "reason": {
285
+ "name": "reason",
286
+ "type": "text",
287
+ "primaryKey": false,
288
+ "notNull": true
289
+ },
290
+ "modified_by": {
291
+ "name": "modified_by",
292
+ "type": "text",
293
+ "primaryKey": false,
294
+ "notNull": true
295
+ },
296
+ "modified_at": {
297
+ "name": "modified_at",
298
+ "type": "double precision",
299
+ "primaryKey": false,
300
+ "notNull": true
301
+ },
302
+ "predicted": {
303
+ "name": "predicted",
304
+ "type": "jsonb",
305
+ "primaryKey": false,
306
+ "notNull": false
307
+ },
308
+ "details": {
309
+ "name": "details",
310
+ "type": "jsonb",
311
+ "primaryKey": false,
312
+ "notNull": false
313
+ }
314
+ },
315
+ "indexes": {},
316
+ "foreignKeys": {
317
+ "classification_labels_project_id_run_id_runs_project_id_id_fk": {
318
+ "name": "classification_labels_project_id_run_id_runs_project_id_id_fk",
319
+ "tableFrom": "classification_labels",
320
+ "tableTo": "runs",
321
+ "schemaTo": "qa",
322
+ "columnsFrom": [
323
+ "project_id",
324
+ "run_id"
325
+ ],
326
+ "columnsTo": [
327
+ "project_id",
328
+ "id"
329
+ ],
330
+ "onDelete": "no action",
331
+ "onUpdate": "no action"
332
+ }
333
+ },
334
+ "compositePrimaryKeys": {
335
+ "classification_labels_project_id_run_id_ordinal_pk": {
336
+ "name": "classification_labels_project_id_run_id_ordinal_pk",
337
+ "columns": [
338
+ "project_id",
339
+ "run_id",
340
+ "ordinal"
341
+ ]
342
+ }
343
+ },
344
+ "uniqueConstraints": {},
345
+ "policies": {},
346
+ "checkConstraints": {
347
+ "classification_label_category": {
348
+ "name": "classification_label_category",
349
+ "value": "length(\"qa\".\"classification_labels\".\"category\") BETWEEN 1 AND 70"
350
+ },
351
+ "classification_prediction_category": {
352
+ "name": "classification_prediction_category",
353
+ "value": "jsonb_typeof(\"qa\".\"classification_labels\".\"predicted\") = 'null' OR (jsonb_typeof(\"qa\".\"classification_labels\".\"predicted\") = 'object'\n AND (NOT (\"qa\".\"classification_labels\".\"predicted\" ? 'category') OR jsonb_typeof(\"qa\".\"classification_labels\".\"predicted\"->'category') IN ('null', 'string'))\n AND (NOT (\"qa\".\"classification_labels\".\"predicted\" ? 'taxonomy') OR (\n jsonb_typeof(\"qa\".\"classification_labels\".\"predicted\"->'taxonomy') = 'object'\n AND jsonb_typeof(\"qa\".\"classification_labels\".\"predicted\"->'taxonomy'->'project') = 'string'\n AND \"qa\".\"classification_labels\".\"predicted\"->'taxonomy'->>'project' = \"qa\".\"classification_labels\".\"project_id\"\n AND jsonb_typeof(\"qa\".\"classification_labels\".\"predicted\"->'taxonomy'->'version') = 'string'\n AND length(\"qa\".\"classification_labels\".\"predicted\"->'taxonomy'->>'version') BETWEEN 1 AND 70\n ) IS TRUE))"
354
+ },
355
+ "classification_label_details": {
356
+ "name": "classification_label_details",
357
+ "value": "jsonb_typeof(\"qa\".\"classification_labels\".\"details\") = 'object'\n AND (NOT (\"qa\".\"classification_labels\".\"details\" ? 'taxonomy') OR (\n jsonb_typeof(\"qa\".\"classification_labels\".\"details\"->'taxonomy') = 'object'\n AND jsonb_typeof(\"qa\".\"classification_labels\".\"details\"->'taxonomy'->'project') = 'string'\n AND \"qa\".\"classification_labels\".\"details\"->'taxonomy'->>'project' = \"qa\".\"classification_labels\".\"project_id\"\n AND jsonb_typeof(\"qa\".\"classification_labels\".\"details\"->'taxonomy'->'version') = 'string'\n AND length(\"qa\".\"classification_labels\".\"details\"->'taxonomy'->>'version') BETWEEN 1 AND 70\n ) IS TRUE)"
358
+ }
359
+ },
360
+ "isRLSEnabled": false
361
+ },
362
+ "qa.credentials": {
363
+ "name": "credentials",
364
+ "schema": "qa",
365
+ "columns": {
366
+ "project_id": {
367
+ "name": "project_id",
368
+ "type": "text",
369
+ "primaryKey": false,
370
+ "notNull": true
371
+ },
372
+ "user_id": {
373
+ "name": "user_id",
374
+ "type": "text",
375
+ "primaryKey": false,
376
+ "notNull": true
377
+ },
378
+ "provider": {
379
+ "name": "provider",
380
+ "type": "text",
381
+ "primaryKey": false,
382
+ "notNull": true
383
+ },
384
+ "secret_ref": {
385
+ "name": "secret_ref",
386
+ "type": "text",
387
+ "primaryKey": false,
388
+ "notNull": true
389
+ },
390
+ "expires_at": {
391
+ "name": "expires_at",
392
+ "type": "timestamp with time zone",
393
+ "primaryKey": false,
394
+ "notNull": false
395
+ }
396
+ },
397
+ "indexes": {},
398
+ "foreignKeys": {},
399
+ "compositePrimaryKeys": {
400
+ "credentials_project_id_user_id_provider_pk": {
401
+ "name": "credentials_project_id_user_id_provider_pk",
402
+ "columns": [
403
+ "project_id",
404
+ "user_id",
405
+ "provider"
406
+ ]
407
+ }
408
+ },
409
+ "uniqueConstraints": {},
410
+ "policies": {},
411
+ "checkConstraints": {},
412
+ "isRLSEnabled": false
413
+ },
414
+ "qa.event_chunks": {
415
+ "name": "event_chunks",
416
+ "schema": "qa",
417
+ "columns": {
418
+ "project_id": {
419
+ "name": "project_id",
420
+ "type": "text",
421
+ "primaryKey": false,
422
+ "notNull": true
423
+ },
424
+ "run_id": {
425
+ "name": "run_id",
426
+ "type": "text",
427
+ "primaryKey": false,
428
+ "notNull": true
429
+ },
430
+ "id": {
431
+ "name": "id",
432
+ "type": "text",
433
+ "primaryKey": false,
434
+ "notNull": true
435
+ },
436
+ "object_key": {
437
+ "name": "object_key",
438
+ "type": "text",
439
+ "primaryKey": false,
440
+ "notNull": true
441
+ },
442
+ "sha256": {
443
+ "name": "sha256",
444
+ "type": "text",
445
+ "primaryKey": false,
446
+ "notNull": true
447
+ },
448
+ "count": {
449
+ "name": "count",
450
+ "type": "integer",
451
+ "primaryKey": false,
452
+ "notNull": true
453
+ },
454
+ "bytes": {
455
+ "name": "bytes",
456
+ "type": "integer",
457
+ "primaryKey": false,
458
+ "notNull": true
459
+ },
460
+ "first_seq": {
461
+ "name": "first_seq",
462
+ "type": "bigint",
463
+ "primaryKey": false,
464
+ "notNull": true
465
+ },
466
+ "last_seq": {
467
+ "name": "last_seq",
468
+ "type": "bigint",
469
+ "primaryKey": false,
470
+ "notNull": true
471
+ },
472
+ "first_t": {
473
+ "name": "first_t",
474
+ "type": "double precision",
475
+ "primaryKey": false,
476
+ "notNull": true
477
+ },
478
+ "last_t": {
479
+ "name": "last_t",
480
+ "type": "double precision",
481
+ "primaryKey": false,
482
+ "notNull": true
483
+ },
484
+ "state": {
485
+ "name": "state",
486
+ "type": "text",
487
+ "primaryKey": false,
488
+ "notNull": true,
489
+ "default": "'uploading'"
490
+ },
491
+ "cleaned_at": {
492
+ "name": "cleaned_at",
493
+ "type": "timestamp with time zone",
494
+ "primaryKey": false,
495
+ "notNull": false
496
+ },
497
+ "created_at": {
498
+ "name": "created_at",
499
+ "type": "timestamp with time zone",
500
+ "primaryKey": false,
501
+ "notNull": true,
502
+ "default": "now()"
503
+ }
504
+ },
505
+ "indexes": {
506
+ "event_object_key": {
507
+ "name": "event_object_key",
508
+ "columns": [
509
+ {
510
+ "expression": "object_key",
511
+ "isExpression": false,
512
+ "asc": true,
513
+ "nulls": "last"
514
+ }
515
+ ],
516
+ "isUnique": true,
517
+ "concurrently": false,
518
+ "method": "btree",
519
+ "with": {}
520
+ }
521
+ },
522
+ "foreignKeys": {
523
+ "event_chunks_project_id_run_id_runs_project_id_id_fk": {
524
+ "name": "event_chunks_project_id_run_id_runs_project_id_id_fk",
525
+ "tableFrom": "event_chunks",
526
+ "tableTo": "runs",
527
+ "schemaTo": "qa",
528
+ "columnsFrom": [
529
+ "project_id",
530
+ "run_id"
531
+ ],
532
+ "columnsTo": [
533
+ "project_id",
534
+ "id"
535
+ ],
536
+ "onDelete": "no action",
537
+ "onUpdate": "no action"
538
+ }
539
+ },
540
+ "compositePrimaryKeys": {
541
+ "event_chunks_project_id_run_id_id_pk": {
542
+ "name": "event_chunks_project_id_run_id_id_pk",
543
+ "columns": [
544
+ "project_id",
545
+ "run_id",
546
+ "id"
547
+ ]
548
+ }
549
+ },
550
+ "uniqueConstraints": {},
551
+ "policies": {},
552
+ "checkConstraints": {
553
+ "chunk_state": {
554
+ "name": "chunk_state",
555
+ "value": "\"qa\".\"event_chunks\".\"state\" IN ('uploading','committed','abandoned','cleaned')"
556
+ },
557
+ "chunk_range": {
558
+ "name": "chunk_range",
559
+ "value": "\"qa\".\"event_chunks\".\"count\" > 0 AND \"qa\".\"event_chunks\".\"bytes\" > 0 AND \"qa\".\"event_chunks\".\"first_seq\" > 0 AND \"qa\".\"event_chunks\".\"last_seq\" >= \"qa\".\"event_chunks\".\"first_seq\" AND \"qa\".\"event_chunks\".\"last_t\" >= \"qa\".\"event_chunks\".\"first_t\""
560
+ }
561
+ },
562
+ "isRLSEnabled": false
563
+ },
564
+ "qa.events": {
565
+ "name": "events",
566
+ "schema": "qa",
567
+ "columns": {
568
+ "project_id": {
569
+ "name": "project_id",
570
+ "type": "text",
571
+ "primaryKey": false,
572
+ "notNull": true
573
+ },
574
+ "run_id": {
575
+ "name": "run_id",
576
+ "type": "text",
577
+ "primaryKey": false,
578
+ "notNull": true
579
+ },
580
+ "seq": {
581
+ "name": "seq",
582
+ "type": "bigint",
583
+ "primaryKey": false,
584
+ "notNull": true
585
+ },
586
+ "t": {
587
+ "name": "t",
588
+ "type": "double precision",
589
+ "primaryKey": false,
590
+ "notNull": true
591
+ },
592
+ "kind": {
593
+ "name": "kind",
594
+ "type": "text",
595
+ "primaryKey": false,
596
+ "notNull": true
597
+ },
598
+ "actor": {
599
+ "name": "actor",
600
+ "type": "text",
601
+ "primaryKey": false,
602
+ "notNull": false
603
+ },
604
+ "step": {
605
+ "name": "step",
606
+ "type": "text",
607
+ "primaryKey": false,
608
+ "notNull": false
609
+ },
610
+ "chunk_id": {
611
+ "name": "chunk_id",
612
+ "type": "text",
613
+ "primaryKey": false,
614
+ "notNull": true
615
+ },
616
+ "offset": {
617
+ "name": "offset",
618
+ "type": "integer",
619
+ "primaryKey": false,
620
+ "notNull": true
621
+ }
622
+ },
623
+ "indexes": {},
624
+ "foreignKeys": {
625
+ "events_project_id_run_id_chunk_id_event_chunks_project_id_run_id_id_fk": {
626
+ "name": "events_project_id_run_id_chunk_id_event_chunks_project_id_run_id_id_fk",
627
+ "tableFrom": "events",
628
+ "tableTo": "event_chunks",
629
+ "schemaTo": "qa",
630
+ "columnsFrom": [
631
+ "project_id",
632
+ "run_id",
633
+ "chunk_id"
634
+ ],
635
+ "columnsTo": [
636
+ "project_id",
637
+ "run_id",
638
+ "id"
639
+ ],
640
+ "onDelete": "no action",
641
+ "onUpdate": "no action"
642
+ }
643
+ },
644
+ "compositePrimaryKeys": {
645
+ "events_project_id_run_id_seq_pk": {
646
+ "name": "events_project_id_run_id_seq_pk",
647
+ "columns": [
648
+ "project_id",
649
+ "run_id",
650
+ "seq"
651
+ ]
652
+ }
653
+ },
654
+ "uniqueConstraints": {},
655
+ "policies": {},
656
+ "checkConstraints": {},
657
+ "isRLSEnabled": false
658
+ },
659
+ "qa.findings": {
660
+ "name": "findings",
661
+ "schema": "qa",
662
+ "columns": {
663
+ "project_id": {
664
+ "name": "project_id",
665
+ "type": "text",
666
+ "primaryKey": false,
667
+ "notNull": true
668
+ },
669
+ "run_id": {
670
+ "name": "run_id",
671
+ "type": "text",
672
+ "primaryKey": false,
673
+ "notNull": true
674
+ },
675
+ "ordinal": {
676
+ "name": "ordinal",
677
+ "type": "integer",
678
+ "primaryKey": false,
679
+ "notNull": true
680
+ },
681
+ "actor": {
682
+ "name": "actor",
683
+ "type": "text",
684
+ "primaryKey": false,
685
+ "notNull": true
686
+ },
687
+ "step": {
688
+ "name": "step",
689
+ "type": "text",
690
+ "primaryKey": false,
691
+ "notNull": true
692
+ },
693
+ "category": {
694
+ "name": "category",
695
+ "type": "text",
696
+ "primaryKey": false,
697
+ "notNull": true
698
+ },
699
+ "severity": {
700
+ "name": "severity",
701
+ "type": "text",
702
+ "primaryKey": false,
703
+ "notNull": true
704
+ },
705
+ "description": {
706
+ "name": "description",
707
+ "type": "text",
708
+ "primaryKey": false,
709
+ "notNull": true
710
+ },
711
+ "event_seqs": {
712
+ "name": "event_seqs",
713
+ "type": "jsonb",
714
+ "primaryKey": false,
715
+ "notNull": true
716
+ },
717
+ "shots": {
718
+ "name": "shots",
719
+ "type": "jsonb",
720
+ "primaryKey": false,
721
+ "notNull": true
722
+ },
723
+ "created_at": {
724
+ "name": "created_at",
725
+ "type": "timestamp with time zone",
726
+ "primaryKey": false,
727
+ "notNull": true,
728
+ "default": "now()"
729
+ }
730
+ },
731
+ "indexes": {},
732
+ "foreignKeys": {
733
+ "findings_project_id_run_id_runs_project_id_id_fk": {
734
+ "name": "findings_project_id_run_id_runs_project_id_id_fk",
735
+ "tableFrom": "findings",
736
+ "tableTo": "runs",
737
+ "schemaTo": "qa",
738
+ "columnsFrom": [
739
+ "project_id",
740
+ "run_id"
741
+ ],
742
+ "columnsTo": [
743
+ "project_id",
744
+ "id"
745
+ ],
746
+ "onDelete": "no action",
747
+ "onUpdate": "no action"
748
+ }
749
+ },
750
+ "compositePrimaryKeys": {
751
+ "findings_project_id_run_id_ordinal_pk": {
752
+ "name": "findings_project_id_run_id_ordinal_pk",
753
+ "columns": [
754
+ "project_id",
755
+ "run_id",
756
+ "ordinal"
757
+ ]
758
+ }
759
+ },
760
+ "uniqueConstraints": {},
761
+ "policies": {},
762
+ "checkConstraints": {
763
+ "finding_ordinal_positive": {
764
+ "name": "finding_ordinal_positive",
765
+ "value": "\"qa\".\"findings\".\"ordinal\" > 0"
766
+ },
767
+ "finding_severity": {
768
+ "name": "finding_severity",
769
+ "value": "\"qa\".\"findings\".\"severity\" IN ('low','medium','high')"
770
+ },
771
+ "finding_category": {
772
+ "name": "finding_category",
773
+ "value": "\"qa\".\"findings\".\"category\" IN ('scope','other')"
774
+ }
775
+ },
776
+ "isRLSEnabled": false
777
+ },
778
+ "qa.flow_results": {
779
+ "name": "flow_results",
780
+ "schema": "qa",
781
+ "columns": {
782
+ "project_id": {
783
+ "name": "project_id",
784
+ "type": "text",
785
+ "primaryKey": false,
786
+ "notNull": true
787
+ },
788
+ "execution_id": {
789
+ "name": "execution_id",
790
+ "type": "text",
791
+ "primaryKey": false,
792
+ "notNull": true
793
+ },
794
+ "flow": {
795
+ "name": "flow",
796
+ "type": "text",
797
+ "primaryKey": false,
798
+ "notNull": true
799
+ },
800
+ "quarantined": {
801
+ "name": "quarantined",
802
+ "type": "integer",
803
+ "primaryKey": false,
804
+ "notNull": true
805
+ }
806
+ },
807
+ "indexes": {},
808
+ "foreignKeys": {},
809
+ "compositePrimaryKeys": {
810
+ "flow_results_project_id_execution_id_pk": {
811
+ "name": "flow_results_project_id_execution_id_pk",
812
+ "columns": [
813
+ "project_id",
814
+ "execution_id"
815
+ ]
816
+ }
817
+ },
818
+ "uniqueConstraints": {},
819
+ "policies": {},
820
+ "checkConstraints": {
821
+ "flow_result_quarantined": {
822
+ "name": "flow_result_quarantined",
823
+ "value": "\"qa\".\"flow_results\".\"quarantined\" IN (0,1)"
824
+ }
825
+ },
826
+ "isRLSEnabled": false
827
+ },
828
+ "qa.flow_statuses": {
829
+ "name": "flow_statuses",
830
+ "schema": "qa",
831
+ "columns": {
832
+ "project_id": {
833
+ "name": "project_id",
834
+ "type": "text",
835
+ "primaryKey": false,
836
+ "notNull": true
837
+ },
838
+ "flow": {
839
+ "name": "flow",
840
+ "type": "text",
841
+ "primaryKey": false,
842
+ "notNull": true
843
+ },
844
+ "status": {
845
+ "name": "status",
846
+ "type": "text",
847
+ "primaryKey": false,
848
+ "notNull": true,
849
+ "default": "'draft'"
850
+ },
851
+ "flaky_streak": {
852
+ "name": "flaky_streak",
853
+ "type": "integer",
854
+ "primaryKey": false,
855
+ "notNull": true,
856
+ "default": 0
857
+ },
858
+ "generation": {
859
+ "name": "generation",
860
+ "type": "integer",
861
+ "primaryKey": false,
862
+ "notNull": true,
863
+ "default": 0
864
+ },
865
+ "owner": {
866
+ "name": "owner",
867
+ "type": "text",
868
+ "primaryKey": false,
869
+ "notNull": false
870
+ },
871
+ "latest_repeat": {
872
+ "name": "latest_repeat",
873
+ "type": "jsonb",
874
+ "primaryKey": false,
875
+ "notNull": false
876
+ },
877
+ "first_run_id": {
878
+ "name": "first_run_id",
879
+ "type": "text",
880
+ "primaryKey": false,
881
+ "notNull": false
882
+ },
883
+ "first_run_revision": {
884
+ "name": "first_run_revision",
885
+ "type": "text",
886
+ "primaryKey": false,
887
+ "notNull": false
888
+ },
889
+ "first_run_at": {
890
+ "name": "first_run_at",
891
+ "type": "timestamp with time zone",
892
+ "primaryKey": false,
893
+ "notNull": false
894
+ },
895
+ "accepted_at": {
896
+ "name": "accepted_at",
897
+ "type": "timestamp with time zone",
898
+ "primaryKey": false,
899
+ "notNull": false
900
+ },
901
+ "accepted_by": {
902
+ "name": "accepted_by",
903
+ "type": "text",
904
+ "primaryKey": false,
905
+ "notNull": false
906
+ },
907
+ "retired_at": {
908
+ "name": "retired_at",
909
+ "type": "timestamp with time zone",
910
+ "primaryKey": false,
911
+ "notNull": false
912
+ }
913
+ },
914
+ "indexes": {},
915
+ "foreignKeys": {},
916
+ "compositePrimaryKeys": {
917
+ "flow_statuses_project_id_flow_pk": {
918
+ "name": "flow_statuses_project_id_flow_pk",
919
+ "columns": [
920
+ "project_id",
921
+ "flow"
922
+ ]
923
+ }
924
+ },
925
+ "uniqueConstraints": {},
926
+ "policies": {},
927
+ "checkConstraints": {
928
+ "flow_status": {
929
+ "name": "flow_status",
930
+ "value": "\"qa\".\"flow_statuses\".\"status\" IN ('draft','review','active','quarantined','retired')"
931
+ },
932
+ "flow_streak": {
933
+ "name": "flow_streak",
934
+ "value": "\"qa\".\"flow_statuses\".\"flaky_streak\" >= 0 AND \"qa\".\"flow_statuses\".\"generation\" >= 0"
935
+ }
936
+ },
937
+ "isRLSEnabled": false
938
+ },
939
+ "qa.jobs": {
940
+ "name": "jobs",
941
+ "schema": "qa",
942
+ "columns": {
943
+ "project_id": {
944
+ "name": "project_id",
945
+ "type": "text",
946
+ "primaryKey": false,
947
+ "notNull": true
948
+ },
949
+ "id": {
950
+ "name": "id",
951
+ "type": "text",
952
+ "primaryKey": false,
953
+ "notNull": true
954
+ },
955
+ "run_id": {
956
+ "name": "run_id",
957
+ "type": "text",
958
+ "primaryKey": false,
959
+ "notNull": true
960
+ },
961
+ "state": {
962
+ "name": "state",
963
+ "type": "text",
964
+ "primaryKey": false,
965
+ "notNull": true,
966
+ "default": "'queued'"
967
+ },
968
+ "available_at": {
969
+ "name": "available_at",
970
+ "type": "timestamp with time zone",
971
+ "primaryKey": false,
972
+ "notNull": true,
973
+ "default": "now()"
974
+ },
975
+ "attempts": {
976
+ "name": "attempts",
977
+ "type": "integer",
978
+ "primaryKey": false,
979
+ "notNull": true,
980
+ "default": 0
981
+ },
982
+ "owner": {
983
+ "name": "owner",
984
+ "type": "text",
985
+ "primaryKey": false,
986
+ "notNull": false
987
+ },
988
+ "epoch": {
989
+ "name": "epoch",
990
+ "type": "bigserial",
991
+ "primaryKey": false,
992
+ "notNull": true
993
+ },
994
+ "lease_until": {
995
+ "name": "lease_until",
996
+ "type": "timestamp with time zone",
997
+ "primaryKey": false,
998
+ "notNull": false
999
+ },
1000
+ "retry_of": {
1001
+ "name": "retry_of",
1002
+ "type": "text",
1003
+ "primaryKey": false,
1004
+ "notNull": false
1005
+ },
1006
+ "cleaned_at": {
1007
+ "name": "cleaned_at",
1008
+ "type": "timestamp with time zone",
1009
+ "primaryKey": false,
1010
+ "notNull": false
1011
+ },
1012
+ "verified_revision": {
1013
+ "name": "verified_revision",
1014
+ "type": "text",
1015
+ "primaryKey": false,
1016
+ "notNull": false
1017
+ },
1018
+ "infrastructure_failure": {
1019
+ "name": "infrastructure_failure",
1020
+ "type": "integer",
1021
+ "primaryKey": false,
1022
+ "notNull": true,
1023
+ "default": 0
1024
+ }
1025
+ },
1026
+ "indexes": {
1027
+ "jobs_available": {
1028
+ "name": "jobs_available",
1029
+ "columns": [
1030
+ {
1031
+ "expression": "project_id",
1032
+ "isExpression": false,
1033
+ "asc": true,
1034
+ "nulls": "last"
1035
+ },
1036
+ {
1037
+ "expression": "state",
1038
+ "isExpression": false,
1039
+ "asc": true,
1040
+ "nulls": "last"
1041
+ },
1042
+ {
1043
+ "expression": "available_at",
1044
+ "isExpression": false,
1045
+ "asc": true,
1046
+ "nulls": "last"
1047
+ }
1048
+ ],
1049
+ "isUnique": false,
1050
+ "concurrently": false,
1051
+ "method": "btree",
1052
+ "with": {}
1053
+ },
1054
+ "job_run": {
1055
+ "name": "job_run",
1056
+ "columns": [
1057
+ {
1058
+ "expression": "project_id",
1059
+ "isExpression": false,
1060
+ "asc": true,
1061
+ "nulls": "last"
1062
+ },
1063
+ {
1064
+ "expression": "run_id",
1065
+ "isExpression": false,
1066
+ "asc": true,
1067
+ "nulls": "last"
1068
+ }
1069
+ ],
1070
+ "isUnique": true,
1071
+ "concurrently": false,
1072
+ "method": "btree",
1073
+ "with": {}
1074
+ },
1075
+ "job_retry": {
1076
+ "name": "job_retry",
1077
+ "columns": [
1078
+ {
1079
+ "expression": "project_id",
1080
+ "isExpression": false,
1081
+ "asc": true,
1082
+ "nulls": "last"
1083
+ },
1084
+ {
1085
+ "expression": "retry_of",
1086
+ "isExpression": false,
1087
+ "asc": true,
1088
+ "nulls": "last"
1089
+ }
1090
+ ],
1091
+ "isUnique": true,
1092
+ "concurrently": false,
1093
+ "method": "btree",
1094
+ "with": {}
1095
+ }
1096
+ },
1097
+ "foreignKeys": {
1098
+ "jobs_project_id_run_id_runs_project_id_id_fk": {
1099
+ "name": "jobs_project_id_run_id_runs_project_id_id_fk",
1100
+ "tableFrom": "jobs",
1101
+ "tableTo": "runs",
1102
+ "schemaTo": "qa",
1103
+ "columnsFrom": [
1104
+ "project_id",
1105
+ "run_id"
1106
+ ],
1107
+ "columnsTo": [
1108
+ "project_id",
1109
+ "id"
1110
+ ],
1111
+ "onDelete": "no action",
1112
+ "onUpdate": "no action"
1113
+ }
1114
+ },
1115
+ "compositePrimaryKeys": {
1116
+ "jobs_project_id_id_pk": {
1117
+ "name": "jobs_project_id_id_pk",
1118
+ "columns": [
1119
+ "project_id",
1120
+ "id"
1121
+ ]
1122
+ }
1123
+ },
1124
+ "uniqueConstraints": {},
1125
+ "policies": {},
1126
+ "checkConstraints": {
1127
+ "job_attempt": {
1128
+ "name": "job_attempt",
1129
+ "value": "\"qa\".\"jobs\".\"attempts\" IN (0,1)"
1130
+ }
1131
+ },
1132
+ "isRLSEnabled": false
1133
+ },
1134
+ "qa.lanes": {
1135
+ "name": "lanes",
1136
+ "schema": "qa",
1137
+ "columns": {
1138
+ "project_id": {
1139
+ "name": "project_id",
1140
+ "type": "text",
1141
+ "primaryKey": false,
1142
+ "notNull": true
1143
+ },
1144
+ "run_id": {
1145
+ "name": "run_id",
1146
+ "type": "text",
1147
+ "primaryKey": false,
1148
+ "notNull": true
1149
+ },
1150
+ "actor": {
1151
+ "name": "actor",
1152
+ "type": "text",
1153
+ "primaryKey": false,
1154
+ "notNull": true
1155
+ },
1156
+ "status": {
1157
+ "name": "status",
1158
+ "type": "text",
1159
+ "primaryKey": false,
1160
+ "notNull": true
1161
+ },
1162
+ "started_at": {
1163
+ "name": "started_at",
1164
+ "type": "double precision",
1165
+ "primaryKey": false,
1166
+ "notNull": true
1167
+ },
1168
+ "finished_at": {
1169
+ "name": "finished_at",
1170
+ "type": "double precision",
1171
+ "primaryKey": false,
1172
+ "notNull": false
1173
+ }
1174
+ },
1175
+ "indexes": {},
1176
+ "foreignKeys": {
1177
+ "lanes_project_id_run_id_runs_project_id_id_fk": {
1178
+ "name": "lanes_project_id_run_id_runs_project_id_id_fk",
1179
+ "tableFrom": "lanes",
1180
+ "tableTo": "runs",
1181
+ "schemaTo": "qa",
1182
+ "columnsFrom": [
1183
+ "project_id",
1184
+ "run_id"
1185
+ ],
1186
+ "columnsTo": [
1187
+ "project_id",
1188
+ "id"
1189
+ ],
1190
+ "onDelete": "no action",
1191
+ "onUpdate": "no action"
1192
+ }
1193
+ },
1194
+ "compositePrimaryKeys": {
1195
+ "lanes_project_id_run_id_actor_pk": {
1196
+ "name": "lanes_project_id_run_id_actor_pk",
1197
+ "columns": [
1198
+ "project_id",
1199
+ "run_id",
1200
+ "actor"
1201
+ ]
1202
+ }
1203
+ },
1204
+ "uniqueConstraints": {},
1205
+ "policies": {},
1206
+ "checkConstraints": {},
1207
+ "isRLSEnabled": false
1208
+ },
1209
+ "qa.lease_claims": {
1210
+ "name": "lease_claims",
1211
+ "schema": "qa",
1212
+ "columns": {
1213
+ "project_id": {
1214
+ "name": "project_id",
1215
+ "type": "text",
1216
+ "primaryKey": false,
1217
+ "notNull": true
1218
+ },
1219
+ "identity": {
1220
+ "name": "identity",
1221
+ "type": "text",
1222
+ "primaryKey": false,
1223
+ "notNull": true
1224
+ },
1225
+ "lease_id": {
1226
+ "name": "lease_id",
1227
+ "type": "text",
1228
+ "primaryKey": false,
1229
+ "notNull": true
1230
+ }
1231
+ },
1232
+ "indexes": {},
1233
+ "foreignKeys": {
1234
+ "lease_claims_project_id_lease_id_leases_project_id_id_fk": {
1235
+ "name": "lease_claims_project_id_lease_id_leases_project_id_id_fk",
1236
+ "tableFrom": "lease_claims",
1237
+ "tableTo": "leases",
1238
+ "schemaTo": "qa",
1239
+ "columnsFrom": [
1240
+ "project_id",
1241
+ "lease_id"
1242
+ ],
1243
+ "columnsTo": [
1244
+ "project_id",
1245
+ "id"
1246
+ ],
1247
+ "onDelete": "no action",
1248
+ "onUpdate": "no action"
1249
+ }
1250
+ },
1251
+ "compositePrimaryKeys": {
1252
+ "lease_claims_project_id_identity_pk": {
1253
+ "name": "lease_claims_project_id_identity_pk",
1254
+ "columns": [
1255
+ "project_id",
1256
+ "identity"
1257
+ ]
1258
+ }
1259
+ },
1260
+ "uniqueConstraints": {},
1261
+ "policies": {},
1262
+ "checkConstraints": {},
1263
+ "isRLSEnabled": false
1264
+ },
1265
+ "qa.lease_resources": {
1266
+ "name": "lease_resources",
1267
+ "schema": "qa",
1268
+ "columns": {
1269
+ "project_id": {
1270
+ "name": "project_id",
1271
+ "type": "text",
1272
+ "primaryKey": false,
1273
+ "notNull": true
1274
+ },
1275
+ "id": {
1276
+ "name": "id",
1277
+ "type": "text",
1278
+ "primaryKey": false,
1279
+ "notNull": true
1280
+ },
1281
+ "kind": {
1282
+ "name": "kind",
1283
+ "type": "text",
1284
+ "primaryKey": false,
1285
+ "notNull": true
1286
+ },
1287
+ "canonical_id": {
1288
+ "name": "canonical_id",
1289
+ "type": "text",
1290
+ "primaryKey": false,
1291
+ "notNull": true
1292
+ },
1293
+ "secret_ref": {
1294
+ "name": "secret_ref",
1295
+ "type": "text",
1296
+ "primaryKey": false,
1297
+ "notNull": true
1298
+ }
1299
+ },
1300
+ "indexes": {
1301
+ "resource_kinds": {
1302
+ "name": "resource_kinds",
1303
+ "columns": [
1304
+ {
1305
+ "expression": "project_id",
1306
+ "isExpression": false,
1307
+ "asc": true,
1308
+ "nulls": "last"
1309
+ },
1310
+ {
1311
+ "expression": "kind",
1312
+ "isExpression": false,
1313
+ "asc": true,
1314
+ "nulls": "last"
1315
+ }
1316
+ ],
1317
+ "isUnique": false,
1318
+ "concurrently": false,
1319
+ "method": "btree",
1320
+ "with": {}
1321
+ }
1322
+ },
1323
+ "foreignKeys": {},
1324
+ "compositePrimaryKeys": {
1325
+ "lease_resources_project_id_id_pk": {
1326
+ "name": "lease_resources_project_id_id_pk",
1327
+ "columns": [
1328
+ "project_id",
1329
+ "id"
1330
+ ]
1331
+ }
1332
+ },
1333
+ "uniqueConstraints": {},
1334
+ "policies": {},
1335
+ "checkConstraints": {},
1336
+ "isRLSEnabled": false
1337
+ },
1338
+ "qa.leases": {
1339
+ "name": "leases",
1340
+ "schema": "qa",
1341
+ "columns": {
1342
+ "project_id": {
1343
+ "name": "project_id",
1344
+ "type": "text",
1345
+ "primaryKey": false,
1346
+ "notNull": true
1347
+ },
1348
+ "id": {
1349
+ "name": "id",
1350
+ "type": "text",
1351
+ "primaryKey": false,
1352
+ "notNull": true
1353
+ },
1354
+ "run_id": {
1355
+ "name": "run_id",
1356
+ "type": "text",
1357
+ "primaryKey": false,
1358
+ "notNull": true
1359
+ },
1360
+ "actor": {
1361
+ "name": "actor",
1362
+ "type": "text",
1363
+ "primaryKey": false,
1364
+ "notNull": true
1365
+ },
1366
+ "owner": {
1367
+ "name": "owner",
1368
+ "type": "text",
1369
+ "primaryKey": false,
1370
+ "notNull": true
1371
+ },
1372
+ "epoch": {
1373
+ "name": "epoch",
1374
+ "type": "bigserial",
1375
+ "primaryKey": false,
1376
+ "notNull": true
1377
+ },
1378
+ "state": {
1379
+ "name": "state",
1380
+ "type": "text",
1381
+ "primaryKey": false,
1382
+ "notNull": true,
1383
+ "default": "'active'"
1384
+ },
1385
+ "expires_at": {
1386
+ "name": "expires_at",
1387
+ "type": "timestamp with time zone",
1388
+ "primaryKey": false,
1389
+ "notNull": true
1390
+ },
1391
+ "allocations": {
1392
+ "name": "allocations",
1393
+ "type": "jsonb",
1394
+ "primaryKey": false,
1395
+ "notNull": true
1396
+ }
1397
+ },
1398
+ "indexes": {},
1399
+ "foreignKeys": {},
1400
+ "compositePrimaryKeys": {
1401
+ "leases_project_id_id_pk": {
1402
+ "name": "leases_project_id_id_pk",
1403
+ "columns": [
1404
+ "project_id",
1405
+ "id"
1406
+ ]
1407
+ }
1408
+ },
1409
+ "uniqueConstraints": {},
1410
+ "policies": {},
1411
+ "checkConstraints": {
1412
+ "lease_state": {
1413
+ "name": "lease_state",
1414
+ "value": "\"qa\".\"leases\".\"state\" IN ('active','quarantined','released')"
1415
+ }
1416
+ },
1417
+ "isRLSEnabled": false
1418
+ },
1419
+ "qa.quarantine_notifications": {
1420
+ "name": "quarantine_notifications",
1421
+ "schema": "qa",
1422
+ "columns": {
1423
+ "project_id": {
1424
+ "name": "project_id",
1425
+ "type": "text",
1426
+ "primaryKey": false,
1427
+ "notNull": true
1428
+ },
1429
+ "flow": {
1430
+ "name": "flow",
1431
+ "type": "text",
1432
+ "primaryKey": false,
1433
+ "notNull": true
1434
+ },
1435
+ "generation": {
1436
+ "name": "generation",
1437
+ "type": "integer",
1438
+ "primaryKey": false,
1439
+ "notNull": true
1440
+ },
1441
+ "run_id": {
1442
+ "name": "run_id",
1443
+ "type": "text",
1444
+ "primaryKey": false,
1445
+ "notNull": true
1446
+ },
1447
+ "owner": {
1448
+ "name": "owner",
1449
+ "type": "text",
1450
+ "primaryKey": false,
1451
+ "notNull": false
1452
+ },
1453
+ "completed_at": {
1454
+ "name": "completed_at",
1455
+ "type": "timestamp with time zone",
1456
+ "primaryKey": false,
1457
+ "notNull": false
1458
+ },
1459
+ "abandoned_at": {
1460
+ "name": "abandoned_at",
1461
+ "type": "timestamp with time zone",
1462
+ "primaryKey": false,
1463
+ "notNull": false
1464
+ },
1465
+ "attempts": {
1466
+ "name": "attempts",
1467
+ "type": "integer",
1468
+ "primaryKey": false,
1469
+ "notNull": true,
1470
+ "default": 0
1471
+ },
1472
+ "available_at": {
1473
+ "name": "available_at",
1474
+ "type": "timestamp with time zone",
1475
+ "primaryKey": false,
1476
+ "notNull": true,
1477
+ "default": "now()"
1478
+ }
1479
+ },
1480
+ "indexes": {},
1481
+ "foreignKeys": {},
1482
+ "compositePrimaryKeys": {
1483
+ "quarantine_notifications_project_id_flow_generation_pk": {
1484
+ "name": "quarantine_notifications_project_id_flow_generation_pk",
1485
+ "columns": [
1486
+ "project_id",
1487
+ "flow",
1488
+ "generation"
1489
+ ]
1490
+ }
1491
+ },
1492
+ "uniqueConstraints": {},
1493
+ "policies": {},
1494
+ "checkConstraints": {
1495
+ "quarantine_notification_attempts": {
1496
+ "name": "quarantine_notification_attempts",
1497
+ "value": "\"qa\".\"quarantine_notifications\".\"attempts\" BETWEEN 0 AND 5"
1498
+ }
1499
+ },
1500
+ "isRLSEnabled": false
1501
+ },
1502
+ "qa.read_publications": {
1503
+ "name": "read_publications",
1504
+ "schema": "qa",
1505
+ "columns": {
1506
+ "project_id": {
1507
+ "name": "project_id",
1508
+ "type": "text",
1509
+ "primaryKey": false,
1510
+ "notNull": true
1511
+ },
1512
+ "kind": {
1513
+ "name": "kind",
1514
+ "type": "text",
1515
+ "primaryKey": false,
1516
+ "notNull": true
1517
+ },
1518
+ "document": {
1519
+ "name": "document",
1520
+ "type": "jsonb",
1521
+ "primaryKey": false,
1522
+ "notNull": true
1523
+ }
1524
+ },
1525
+ "indexes": {},
1526
+ "foreignKeys": {},
1527
+ "compositePrimaryKeys": {
1528
+ "read_publications_project_id_kind_pk": {
1529
+ "name": "read_publications_project_id_kind_pk",
1530
+ "columns": [
1531
+ "project_id",
1532
+ "kind"
1533
+ ]
1534
+ }
1535
+ },
1536
+ "uniqueConstraints": {},
1537
+ "policies": {},
1538
+ "checkConstraints": {},
1539
+ "isRLSEnabled": false
1540
+ },
1541
+ "qa.result_notification_flows": {
1542
+ "name": "result_notification_flows",
1543
+ "schema": "qa",
1544
+ "columns": {
1545
+ "project_id": {
1546
+ "name": "project_id",
1547
+ "type": "text",
1548
+ "primaryKey": false,
1549
+ "notNull": true
1550
+ },
1551
+ "batch_id": {
1552
+ "name": "batch_id",
1553
+ "type": "text",
1554
+ "primaryKey": false,
1555
+ "notNull": true
1556
+ },
1557
+ "channel": {
1558
+ "name": "channel",
1559
+ "type": "text",
1560
+ "primaryKey": false,
1561
+ "notNull": true,
1562
+ "default": "'pr'"
1563
+ },
1564
+ "flow": {
1565
+ "name": "flow",
1566
+ "type": "text",
1567
+ "primaryKey": false,
1568
+ "notNull": true
1569
+ },
1570
+ "outcome": {
1571
+ "name": "outcome",
1572
+ "type": "text",
1573
+ "primaryKey": false,
1574
+ "notNull": false
1575
+ },
1576
+ "completed_at": {
1577
+ "name": "completed_at",
1578
+ "type": "timestamp with time zone",
1579
+ "primaryKey": false,
1580
+ "notNull": false
1581
+ },
1582
+ "abandoned_at": {
1583
+ "name": "abandoned_at",
1584
+ "type": "timestamp with time zone",
1585
+ "primaryKey": false,
1586
+ "notNull": false
1587
+ },
1588
+ "attempts": {
1589
+ "name": "attempts",
1590
+ "type": "integer",
1591
+ "primaryKey": false,
1592
+ "notNull": true,
1593
+ "default": 0
1594
+ },
1595
+ "available_at": {
1596
+ "name": "available_at",
1597
+ "type": "timestamp with time zone",
1598
+ "primaryKey": false,
1599
+ "notNull": true,
1600
+ "default": "now()"
1601
+ }
1602
+ },
1603
+ "indexes": {
1604
+ "result_notification_flow_delivered": {
1605
+ "name": "result_notification_flow_delivered",
1606
+ "columns": [
1607
+ {
1608
+ "expression": "project_id",
1609
+ "isExpression": false,
1610
+ "asc": true,
1611
+ "nulls": "last"
1612
+ },
1613
+ {
1614
+ "expression": "flow",
1615
+ "isExpression": false,
1616
+ "asc": true,
1617
+ "nulls": "last"
1618
+ }
1619
+ ],
1620
+ "isUnique": false,
1621
+ "where": "\"qa\".\"result_notification_flows\".\"outcome\" = 'delivered'",
1622
+ "concurrently": false,
1623
+ "method": "btree",
1624
+ "with": {}
1625
+ }
1626
+ },
1627
+ "foreignKeys": {
1628
+ "result_notification_flows_project_id_batch_id_channel_result_notifications_project_id_batch_id_channel_fk": {
1629
+ "name": "result_notification_flows_project_id_batch_id_channel_result_notifications_project_id_batch_id_channel_fk",
1630
+ "tableFrom": "result_notification_flows",
1631
+ "tableTo": "result_notifications",
1632
+ "schemaTo": "qa",
1633
+ "columnsFrom": [
1634
+ "project_id",
1635
+ "batch_id",
1636
+ "channel"
1637
+ ],
1638
+ "columnsTo": [
1639
+ "project_id",
1640
+ "batch_id",
1641
+ "channel"
1642
+ ],
1643
+ "onDelete": "no action",
1644
+ "onUpdate": "no action"
1645
+ }
1646
+ },
1647
+ "compositePrimaryKeys": {
1648
+ "result_notification_flows_project_id_batch_id_flow_pk": {
1649
+ "name": "result_notification_flows_project_id_batch_id_flow_pk",
1650
+ "columns": [
1651
+ "project_id",
1652
+ "batch_id",
1653
+ "flow"
1654
+ ]
1655
+ }
1656
+ },
1657
+ "uniqueConstraints": {},
1658
+ "policies": {},
1659
+ "checkConstraints": {
1660
+ "result_notification_flow_channel": {
1661
+ "name": "result_notification_flow_channel",
1662
+ "value": "\"qa\".\"result_notification_flows\".\"channel\" = 'pr'"
1663
+ },
1664
+ "result_notification_flow_attempts": {
1665
+ "name": "result_notification_flow_attempts",
1666
+ "value": "\"qa\".\"result_notification_flows\".\"attempts\" BETWEEN 0 AND 5"
1667
+ },
1668
+ "result_notification_flow_outcome": {
1669
+ "name": "result_notification_flow_outcome",
1670
+ "value": "\"qa\".\"result_notification_flows\".\"outcome\" IN ('delivered','superseded')"
1671
+ },
1672
+ "result_notification_flow_completion": {
1673
+ "name": "result_notification_flow_completion",
1674
+ "value": "(\"qa\".\"result_notification_flows\".\"outcome\" IS NULL) = (\"qa\".\"result_notification_flows\".\"completed_at\" IS NULL)"
1675
+ }
1676
+ },
1677
+ "isRLSEnabled": false
1678
+ },
1679
+ "qa.result_notifications": {
1680
+ "name": "result_notifications",
1681
+ "schema": "qa",
1682
+ "columns": {
1683
+ "project_id": {
1684
+ "name": "project_id",
1685
+ "type": "text",
1686
+ "primaryKey": false,
1687
+ "notNull": true
1688
+ },
1689
+ "batch_id": {
1690
+ "name": "batch_id",
1691
+ "type": "text",
1692
+ "primaryKey": false,
1693
+ "notNull": true
1694
+ },
1695
+ "channel": {
1696
+ "name": "channel",
1697
+ "type": "text",
1698
+ "primaryKey": false,
1699
+ "notNull": true
1700
+ },
1701
+ "kind": {
1702
+ "name": "kind",
1703
+ "type": "text",
1704
+ "primaryKey": false,
1705
+ "notNull": false
1706
+ },
1707
+ "provider": {
1708
+ "name": "provider",
1709
+ "type": "text",
1710
+ "primaryKey": false,
1711
+ "notNull": false
1712
+ },
1713
+ "context": {
1714
+ "name": "context",
1715
+ "type": "jsonb",
1716
+ "primaryKey": false,
1717
+ "notNull": true
1718
+ },
1719
+ "completed_at": {
1720
+ "name": "completed_at",
1721
+ "type": "timestamp with time zone",
1722
+ "primaryKey": false,
1723
+ "notNull": false
1724
+ },
1725
+ "abandoned_at": {
1726
+ "name": "abandoned_at",
1727
+ "type": "timestamp with time zone",
1728
+ "primaryKey": false,
1729
+ "notNull": false
1730
+ },
1731
+ "attempts": {
1732
+ "name": "attempts",
1733
+ "type": "integer",
1734
+ "primaryKey": false,
1735
+ "notNull": true,
1736
+ "default": 0
1737
+ },
1738
+ "available_at": {
1739
+ "name": "available_at",
1740
+ "type": "timestamp with time zone",
1741
+ "primaryKey": false,
1742
+ "notNull": true,
1743
+ "default": "now()"
1744
+ }
1745
+ },
1746
+ "indexes": {
1747
+ "result_notifications_pending": {
1748
+ "name": "result_notifications_pending",
1749
+ "columns": [
1750
+ {
1751
+ "expression": "available_at",
1752
+ "isExpression": false,
1753
+ "asc": true,
1754
+ "nulls": "last"
1755
+ }
1756
+ ],
1757
+ "isUnique": false,
1758
+ "where": "\"qa\".\"result_notifications\".\"completed_at\" IS NULL AND \"qa\".\"result_notifications\".\"abandoned_at\" IS NULL",
1759
+ "concurrently": false,
1760
+ "method": "btree",
1761
+ "with": {}
1762
+ }
1763
+ },
1764
+ "foreignKeys": {
1765
+ "result_notifications_project_id_batch_id_batches_project_id_id_fk": {
1766
+ "name": "result_notifications_project_id_batch_id_batches_project_id_id_fk",
1767
+ "tableFrom": "result_notifications",
1768
+ "tableTo": "batches",
1769
+ "schemaTo": "qa",
1770
+ "columnsFrom": [
1771
+ "project_id",
1772
+ "batch_id"
1773
+ ],
1774
+ "columnsTo": [
1775
+ "project_id",
1776
+ "id"
1777
+ ],
1778
+ "onDelete": "no action",
1779
+ "onUpdate": "no action"
1780
+ }
1781
+ },
1782
+ "compositePrimaryKeys": {
1783
+ "result_notifications_project_id_batch_id_channel_pk": {
1784
+ "name": "result_notifications_project_id_batch_id_channel_pk",
1785
+ "columns": [
1786
+ "project_id",
1787
+ "batch_id",
1788
+ "channel"
1789
+ ]
1790
+ }
1791
+ },
1792
+ "uniqueConstraints": {},
1793
+ "policies": {},
1794
+ "checkConstraints": {
1795
+ "result_notification_channel": {
1796
+ "name": "result_notification_channel",
1797
+ "value": "\"qa\".\"result_notifications\".\"channel\" ~ '^[a-z][a-z0-9-]{0,69}$'"
1798
+ },
1799
+ "result_notification_route": {
1800
+ "name": "result_notification_route",
1801
+ "value": "(\"qa\".\"result_notifications\".\"kind\" IS NULL AND \"qa\".\"result_notifications\".\"provider\" IS NULL) OR (\n \"qa\".\"result_notifications\".\"kind\" IS NOT NULL AND \"qa\".\"result_notifications\".\"provider\" IS NOT NULL\n AND \"qa\".\"result_notifications\".\"kind\" ~ '^[a-z][a-z0-9.-]{0,63}$'\n AND \"qa\".\"result_notifications\".\"provider\" ~ '^[a-z][a-z0-9-]{0,63}$'\n )"
1802
+ },
1803
+ "result_notification_attempts": {
1804
+ "name": "result_notification_attempts",
1805
+ "value": "\"qa\".\"result_notifications\".\"attempts\" BETWEEN 0 AND 5"
1806
+ }
1807
+ },
1808
+ "isRLSEnabled": false
1809
+ },
1810
+ "qa.runs": {
1811
+ "name": "runs",
1812
+ "schema": "qa",
1813
+ "columns": {
1814
+ "project_id": {
1815
+ "name": "project_id",
1816
+ "type": "text",
1817
+ "primaryKey": false,
1818
+ "notNull": true
1819
+ },
1820
+ "id": {
1821
+ "name": "id",
1822
+ "type": "text",
1823
+ "primaryKey": false,
1824
+ "notNull": true
1825
+ },
1826
+ "batch_id": {
1827
+ "name": "batch_id",
1828
+ "type": "text",
1829
+ "primaryKey": false,
1830
+ "notNull": false
1831
+ },
1832
+ "flow": {
1833
+ "name": "flow",
1834
+ "type": "text",
1835
+ "primaryKey": false,
1836
+ "notNull": true
1837
+ },
1838
+ "started_at": {
1839
+ "name": "started_at",
1840
+ "type": "double precision",
1841
+ "primaryKey": false,
1842
+ "notNull": true
1843
+ },
1844
+ "metadata": {
1845
+ "name": "metadata",
1846
+ "type": "jsonb",
1847
+ "primaryKey": false,
1848
+ "notNull": false
1849
+ },
1850
+ "phase": {
1851
+ "name": "phase",
1852
+ "type": "text",
1853
+ "primaryKey": false,
1854
+ "notNull": true,
1855
+ "default": "'queued'"
1856
+ },
1857
+ "verdict": {
1858
+ "name": "verdict",
1859
+ "type": "text",
1860
+ "primaryKey": false,
1861
+ "notNull": false
1862
+ },
1863
+ "finished_at": {
1864
+ "name": "finished_at",
1865
+ "type": "double precision",
1866
+ "primaryKey": false,
1867
+ "notNull": false
1868
+ },
1869
+ "reason": {
1870
+ "name": "reason",
1871
+ "type": "text",
1872
+ "primaryKey": false,
1873
+ "notNull": false
1874
+ },
1875
+ "event_count": {
1876
+ "name": "event_count",
1877
+ "type": "integer",
1878
+ "primaryKey": false,
1879
+ "notNull": true,
1880
+ "default": 0
1881
+ },
1882
+ "last_seq": {
1883
+ "name": "last_seq",
1884
+ "type": "bigint",
1885
+ "primaryKey": false,
1886
+ "notNull": true,
1887
+ "default": 0
1888
+ },
1889
+ "last_t": {
1890
+ "name": "last_t",
1891
+ "type": "double precision",
1892
+ "primaryKey": false,
1893
+ "notNull": true,
1894
+ "default": 0
1895
+ },
1896
+ "event_bytes": {
1897
+ "name": "event_bytes",
1898
+ "type": "bigint",
1899
+ "primaryKey": false,
1900
+ "notNull": true,
1901
+ "default": 0
1902
+ },
1903
+ "writer_lease_id": {
1904
+ "name": "writer_lease_id",
1905
+ "type": "text",
1906
+ "primaryKey": false,
1907
+ "notNull": false
1908
+ },
1909
+ "heartbeat_at": {
1910
+ "name": "heartbeat_at",
1911
+ "type": "timestamp with time zone",
1912
+ "primaryKey": false,
1913
+ "notNull": false
1914
+ },
1915
+ "usage": {
1916
+ "name": "usage",
1917
+ "type": "jsonb",
1918
+ "primaryKey": false,
1919
+ "notNull": false
1920
+ },
1921
+ "error_reason": {
1922
+ "name": "error_reason",
1923
+ "type": "text",
1924
+ "primaryKey": false,
1925
+ "notNull": false
1926
+ },
1927
+ "cost_usd": {
1928
+ "name": "cost_usd",
1929
+ "type": "double precision",
1930
+ "primaryKey": false,
1931
+ "notNull": true,
1932
+ "default": 0
1933
+ },
1934
+ "classification": {
1935
+ "name": "classification",
1936
+ "type": "text",
1937
+ "primaryKey": false,
1938
+ "notNull": false
1939
+ }
1940
+ },
1941
+ "indexes": {
1942
+ "runs_recent": {
1943
+ "name": "runs_recent",
1944
+ "columns": [
1945
+ {
1946
+ "expression": "project_id",
1947
+ "isExpression": false,
1948
+ "asc": true,
1949
+ "nulls": "last"
1950
+ },
1951
+ {
1952
+ "expression": "started_at",
1953
+ "isExpression": false,
1954
+ "asc": false,
1955
+ "nulls": "last"
1956
+ },
1957
+ {
1958
+ "expression": "\"id\" COLLATE \"C\"",
1959
+ "asc": true,
1960
+ "isExpression": true,
1961
+ "nulls": "last"
1962
+ }
1963
+ ],
1964
+ "isUnique": false,
1965
+ "concurrently": false,
1966
+ "method": "btree",
1967
+ "with": {}
1968
+ }
1969
+ },
1970
+ "foreignKeys": {
1971
+ "runs_project_id_batch_id_batches_project_id_id_fk": {
1972
+ "name": "runs_project_id_batch_id_batches_project_id_id_fk",
1973
+ "tableFrom": "runs",
1974
+ "tableTo": "batches",
1975
+ "schemaTo": "qa",
1976
+ "columnsFrom": [
1977
+ "project_id",
1978
+ "batch_id"
1979
+ ],
1980
+ "columnsTo": [
1981
+ "project_id",
1982
+ "id"
1983
+ ],
1984
+ "onDelete": "no action",
1985
+ "onUpdate": "no action"
1986
+ }
1987
+ },
1988
+ "compositePrimaryKeys": {
1989
+ "runs_project_id_id_pk": {
1990
+ "name": "runs_project_id_id_pk",
1991
+ "columns": [
1992
+ "project_id",
1993
+ "id"
1994
+ ]
1995
+ }
1996
+ },
1997
+ "uniqueConstraints": {},
1998
+ "policies": {},
1999
+ "checkConstraints": {
2000
+ "run_classification": {
2001
+ "name": "run_classification",
2002
+ "value": "length(\"qa\".\"runs\".\"classification\") BETWEEN 1 AND 70"
2003
+ },
2004
+ "run_classification_metadata": {
2005
+ "name": "run_classification_metadata",
2006
+ "value": "NOT (\"qa\".\"runs\".\"metadata\" ? 'failureClassification')\n OR jsonb_typeof(\"qa\".\"runs\".\"metadata\"->'failureClassification') = 'null'\n OR (jsonb_typeof(\"qa\".\"runs\".\"metadata\"->'failureClassification') = 'object'\n AND (NOT ((\"qa\".\"runs\".\"metadata\"->'failureClassification') ? 'category') OR jsonb_typeof((\"qa\".\"runs\".\"metadata\"->'failureClassification')->'category') IN ('null', 'string'))\n AND (NOT (\"qa\".\"runs\".\"metadata\"->'failureClassification' ? 'taxonomy') OR (\n (NOT ((\"qa\".\"runs\".\"metadata\"->'failureClassification') ? 'taxonomy') OR (\n jsonb_typeof((\"qa\".\"runs\".\"metadata\"->'failureClassification')->'taxonomy') = 'object'\n AND jsonb_typeof((\"qa\".\"runs\".\"metadata\"->'failureClassification')->'taxonomy'->'project') = 'string'\n AND (\"qa\".\"runs\".\"metadata\"->'failureClassification')->'taxonomy'->>'project' = \"qa\".\"runs\".\"project_id\"\n AND jsonb_typeof((\"qa\".\"runs\".\"metadata\"->'failureClassification')->'taxonomy'->'version') = 'string'\n AND length((\"qa\".\"runs\".\"metadata\"->'failureClassification')->'taxonomy'->>'version') BETWEEN 1 AND 70\n ) IS TRUE)\n AND (\"qa\".\"runs\".\"metadata\"->'failureClassification' ? 'category')\n AND \"qa\".\"runs\".\"metadata\"->'failureClassification'->>'category' IS NOT DISTINCT FROM \"qa\".\"runs\".\"classification\"\n )))"
2007
+ },
2008
+ "run_cursor_nonnegative": {
2009
+ "name": "run_cursor_nonnegative",
2010
+ "value": "\"qa\".\"runs\".\"last_seq\" >= 0 AND \"qa\".\"runs\".\"last_t\" >= 0 AND \"qa\".\"runs\".\"event_count\" >= 0 AND \"qa\".\"runs\".\"event_bytes\" >= 0"
2011
+ }
2012
+ },
2013
+ "isRLSEnabled": false
2014
+ },
2015
+ "qa.server_submissions": {
2016
+ "name": "server_submissions",
2017
+ "schema": "qa",
2018
+ "columns": {
2019
+ "project_id": {
2020
+ "name": "project_id",
2021
+ "type": "text",
2022
+ "primaryKey": false,
2023
+ "notNull": true
2024
+ },
2025
+ "principal_id": {
2026
+ "name": "principal_id",
2027
+ "type": "text",
2028
+ "primaryKey": false,
2029
+ "notNull": true
2030
+ },
2031
+ "idempotency_key": {
2032
+ "name": "idempotency_key",
2033
+ "type": "text",
2034
+ "primaryKey": false,
2035
+ "notNull": true
2036
+ },
2037
+ "fingerprint": {
2038
+ "name": "fingerprint",
2039
+ "type": "text",
2040
+ "primaryKey": false,
2041
+ "notNull": true
2042
+ },
2043
+ "batch_id": {
2044
+ "name": "batch_id",
2045
+ "type": "text",
2046
+ "primaryKey": false,
2047
+ "notNull": true
2048
+ },
2049
+ "response": {
2050
+ "name": "response",
2051
+ "type": "jsonb",
2052
+ "primaryKey": false,
2053
+ "notNull": true
2054
+ },
2055
+ "created_at": {
2056
+ "name": "created_at",
2057
+ "type": "timestamp with time zone",
2058
+ "primaryKey": false,
2059
+ "notNull": true,
2060
+ "default": "now()"
2061
+ }
2062
+ },
2063
+ "indexes": {
2064
+ "submission_batch": {
2065
+ "name": "submission_batch",
2066
+ "columns": [
2067
+ {
2068
+ "expression": "project_id",
2069
+ "isExpression": false,
2070
+ "asc": true,
2071
+ "nulls": "last"
2072
+ },
2073
+ {
2074
+ "expression": "batch_id",
2075
+ "isExpression": false,
2076
+ "asc": true,
2077
+ "nulls": "last"
2078
+ }
2079
+ ],
2080
+ "isUnique": true,
2081
+ "concurrently": false,
2082
+ "method": "btree",
2083
+ "with": {}
2084
+ },
2085
+ "submission_created": {
2086
+ "name": "submission_created",
2087
+ "columns": [
2088
+ {
2089
+ "expression": "project_id",
2090
+ "isExpression": false,
2091
+ "asc": true,
2092
+ "nulls": "last"
2093
+ },
2094
+ {
2095
+ "expression": "created_at",
2096
+ "isExpression": false,
2097
+ "asc": false,
2098
+ "nulls": "last"
2099
+ },
2100
+ {
2101
+ "expression": "batch_id",
2102
+ "isExpression": false,
2103
+ "asc": true,
2104
+ "nulls": "last"
2105
+ }
2106
+ ],
2107
+ "isUnique": false,
2108
+ "concurrently": false,
2109
+ "method": "btree",
2110
+ "with": {}
2111
+ }
2112
+ },
2113
+ "foreignKeys": {
2114
+ "server_submissions_project_id_batch_id_batches_project_id_id_fk": {
2115
+ "name": "server_submissions_project_id_batch_id_batches_project_id_id_fk",
2116
+ "tableFrom": "server_submissions",
2117
+ "tableTo": "batches",
2118
+ "schemaTo": "qa",
2119
+ "columnsFrom": [
2120
+ "project_id",
2121
+ "batch_id"
2122
+ ],
2123
+ "columnsTo": [
2124
+ "project_id",
2125
+ "id"
2126
+ ],
2127
+ "onDelete": "no action",
2128
+ "onUpdate": "no action"
2129
+ }
2130
+ },
2131
+ "compositePrimaryKeys": {
2132
+ "server_submissions_project_id_principal_id_idempotency_key_pk": {
2133
+ "name": "server_submissions_project_id_principal_id_idempotency_key_pk",
2134
+ "columns": [
2135
+ "project_id",
2136
+ "principal_id",
2137
+ "idempotency_key"
2138
+ ]
2139
+ }
2140
+ },
2141
+ "uniqueConstraints": {},
2142
+ "policies": {},
2143
+ "checkConstraints": {},
2144
+ "isRLSEnabled": false
2145
+ },
2146
+ "qa.step_runs": {
2147
+ "name": "step_runs",
2148
+ "schema": "qa",
2149
+ "columns": {
2150
+ "project_id": {
2151
+ "name": "project_id",
2152
+ "type": "text",
2153
+ "primaryKey": false,
2154
+ "notNull": true
2155
+ },
2156
+ "run_id": {
2157
+ "name": "run_id",
2158
+ "type": "text",
2159
+ "primaryKey": false,
2160
+ "notNull": true
2161
+ },
2162
+ "actor": {
2163
+ "name": "actor",
2164
+ "type": "text",
2165
+ "primaryKey": false,
2166
+ "notNull": true
2167
+ },
2168
+ "step": {
2169
+ "name": "step",
2170
+ "type": "text",
2171
+ "primaryKey": false,
2172
+ "notNull": true
2173
+ },
2174
+ "seq": {
2175
+ "name": "seq",
2176
+ "type": "bigint",
2177
+ "primaryKey": false,
2178
+ "notNull": true
2179
+ },
2180
+ "status": {
2181
+ "name": "status",
2182
+ "type": "text",
2183
+ "primaryKey": false,
2184
+ "notNull": true
2185
+ },
2186
+ "started_at": {
2187
+ "name": "started_at",
2188
+ "type": "double precision",
2189
+ "primaryKey": false,
2190
+ "notNull": true
2191
+ },
2192
+ "finished_at": {
2193
+ "name": "finished_at",
2194
+ "type": "double precision",
2195
+ "primaryKey": false,
2196
+ "notNull": false
2197
+ }
2198
+ },
2199
+ "indexes": {},
2200
+ "foreignKeys": {
2201
+ "step_runs_project_id_run_id_runs_project_id_id_fk": {
2202
+ "name": "step_runs_project_id_run_id_runs_project_id_id_fk",
2203
+ "tableFrom": "step_runs",
2204
+ "tableTo": "runs",
2205
+ "schemaTo": "qa",
2206
+ "columnsFrom": [
2207
+ "project_id",
2208
+ "run_id"
2209
+ ],
2210
+ "columnsTo": [
2211
+ "project_id",
2212
+ "id"
2213
+ ],
2214
+ "onDelete": "no action",
2215
+ "onUpdate": "no action"
2216
+ }
2217
+ },
2218
+ "compositePrimaryKeys": {
2219
+ "step_runs_project_id_run_id_seq_pk": {
2220
+ "name": "step_runs_project_id_run_id_seq_pk",
2221
+ "columns": [
2222
+ "project_id",
2223
+ "run_id",
2224
+ "seq"
2225
+ ]
2226
+ }
2227
+ },
2228
+ "uniqueConstraints": {},
2229
+ "policies": {},
2230
+ "checkConstraints": {},
2231
+ "isRLSEnabled": false
2232
+ },
2233
+ "qa.trial_group_receipts": {
2234
+ "name": "trial_group_receipts",
2235
+ "schema": "qa",
2236
+ "columns": {
2237
+ "project_id": {
2238
+ "name": "project_id",
2239
+ "type": "text",
2240
+ "primaryKey": false,
2241
+ "notNull": true
2242
+ },
2243
+ "group_id": {
2244
+ "name": "group_id",
2245
+ "type": "text",
2246
+ "primaryKey": false,
2247
+ "notNull": true
2248
+ },
2249
+ "key": {
2250
+ "name": "key",
2251
+ "type": "text",
2252
+ "primaryKey": false,
2253
+ "notNull": true
2254
+ },
2255
+ "document": {
2256
+ "name": "document",
2257
+ "type": "jsonb",
2258
+ "primaryKey": false,
2259
+ "notNull": true
2260
+ }
2261
+ },
2262
+ "indexes": {},
2263
+ "foreignKeys": {
2264
+ "trial_group_receipts_group": {
2265
+ "name": "trial_group_receipts_group",
2266
+ "tableFrom": "trial_group_receipts",
2267
+ "tableTo": "trial_groups",
2268
+ "schemaTo": "qa",
2269
+ "columnsFrom": [
2270
+ "project_id",
2271
+ "group_id"
2272
+ ],
2273
+ "columnsTo": [
2274
+ "project_id",
2275
+ "group_id"
2276
+ ],
2277
+ "onDelete": "no action",
2278
+ "onUpdate": "no action"
2279
+ }
2280
+ },
2281
+ "compositePrimaryKeys": {
2282
+ "trial_group_receipts_project_id_group_id_key_pk": {
2283
+ "name": "trial_group_receipts_project_id_group_id_key_pk",
2284
+ "columns": [
2285
+ "project_id",
2286
+ "group_id",
2287
+ "key"
2288
+ ]
2289
+ }
2290
+ },
2291
+ "uniqueConstraints": {},
2292
+ "policies": {},
2293
+ "checkConstraints": {},
2294
+ "isRLSEnabled": false
2295
+ },
2296
+ "qa.trial_groups": {
2297
+ "name": "trial_groups",
2298
+ "schema": "qa",
2299
+ "columns": {
2300
+ "project_id": {
2301
+ "name": "project_id",
2302
+ "type": "text",
2303
+ "primaryKey": false,
2304
+ "notNull": true
2305
+ },
2306
+ "group_id": {
2307
+ "name": "group_id",
2308
+ "type": "text",
2309
+ "primaryKey": false,
2310
+ "notNull": true
2311
+ },
2312
+ "flow": {
2313
+ "name": "flow",
2314
+ "type": "text",
2315
+ "primaryKey": false,
2316
+ "notNull": true
2317
+ },
2318
+ "started_at": {
2319
+ "name": "started_at",
2320
+ "type": "double precision",
2321
+ "primaryKey": false,
2322
+ "notNull": true
2323
+ },
2324
+ "document": {
2325
+ "name": "document",
2326
+ "type": "jsonb",
2327
+ "primaryKey": false,
2328
+ "notNull": true
2329
+ }
2330
+ },
2331
+ "indexes": {
2332
+ "trial_groups_flow": {
2333
+ "name": "trial_groups_flow",
2334
+ "columns": [
2335
+ {
2336
+ "expression": "project_id",
2337
+ "isExpression": false,
2338
+ "asc": true,
2339
+ "nulls": "last"
2340
+ },
2341
+ {
2342
+ "expression": "flow",
2343
+ "isExpression": false,
2344
+ "asc": true,
2345
+ "nulls": "last"
2346
+ },
2347
+ {
2348
+ "expression": "started_at",
2349
+ "isExpression": false,
2350
+ "asc": true,
2351
+ "nulls": "last"
2352
+ }
2353
+ ],
2354
+ "isUnique": false,
2355
+ "concurrently": false,
2356
+ "method": "btree",
2357
+ "with": {}
2358
+ }
2359
+ },
2360
+ "foreignKeys": {},
2361
+ "compositePrimaryKeys": {
2362
+ "trial_groups_project_id_group_id_pk": {
2363
+ "name": "trial_groups_project_id_group_id_pk",
2364
+ "columns": [
2365
+ "project_id",
2366
+ "group_id"
2367
+ ]
2368
+ }
2369
+ },
2370
+ "uniqueConstraints": {},
2371
+ "policies": {},
2372
+ "checkConstraints": {},
2373
+ "isRLSEnabled": false
2374
+ },
2375
+ "qa.worker_slots": {
2376
+ "name": "worker_slots",
2377
+ "schema": "qa",
2378
+ "columns": {
2379
+ "id": {
2380
+ "name": "id",
2381
+ "type": "integer",
2382
+ "primaryKey": true,
2383
+ "notNull": true
2384
+ },
2385
+ "project_id": {
2386
+ "name": "project_id",
2387
+ "type": "text",
2388
+ "primaryKey": false,
2389
+ "notNull": false
2390
+ },
2391
+ "job_id": {
2392
+ "name": "job_id",
2393
+ "type": "text",
2394
+ "primaryKey": false,
2395
+ "notNull": false
2396
+ }
2397
+ },
2398
+ "indexes": {
2399
+ "worker_slot_job": {
2400
+ "name": "worker_slot_job",
2401
+ "columns": [
2402
+ {
2403
+ "expression": "project_id",
2404
+ "isExpression": false,
2405
+ "asc": true,
2406
+ "nulls": "last"
2407
+ },
2408
+ {
2409
+ "expression": "job_id",
2410
+ "isExpression": false,
2411
+ "asc": true,
2412
+ "nulls": "last"
2413
+ }
2414
+ ],
2415
+ "isUnique": true,
2416
+ "concurrently": false,
2417
+ "method": "btree",
2418
+ "with": {}
2419
+ }
2420
+ },
2421
+ "foreignKeys": {},
2422
+ "compositePrimaryKeys": {},
2423
+ "uniqueConstraints": {},
2424
+ "policies": {},
2425
+ "checkConstraints": {
2426
+ "worker_slot_range": {
2427
+ "name": "worker_slot_range",
2428
+ "value": "\"qa\".\"worker_slots\".\"id\" BETWEEN 1 AND 8"
2429
+ },
2430
+ "worker_slot_pair": {
2431
+ "name": "worker_slot_pair",
2432
+ "value": "(\"qa\".\"worker_slots\".\"project_id\" IS NULL) = (\"qa\".\"worker_slots\".\"job_id\" IS NULL)"
2433
+ }
2434
+ },
2435
+ "isRLSEnabled": false
2436
+ }
2437
+ },
2438
+ "enums": {},
2439
+ "schemas": {
2440
+ "qa": "qa"
2441
+ },
2442
+ "sequences": {},
2443
+ "roles": {},
2444
+ "policies": {},
2445
+ "views": {},
2446
+ "_meta": {
2447
+ "columns": {},
2448
+ "schemas": {},
2449
+ "tables": {}
2450
+ }
2451
+ }