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