@sentry/junior 0.200.0 → 0.202.0

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 (65) hide show
  1. package/dist/{agent-hooks-6LGY2MBH.js → agent-hooks-UXITLYOK.js} +11 -11
  2. package/dist/api.js +25 -25
  3. package/dist/app.js +228 -122
  4. package/dist/{catalog-runtime-CIO3ERVQ.js → catalog-runtime-BG3JLLK2.js} +4 -4
  5. package/dist/{chunk-PMSENMWY.js → chunk-2MK3QBGA.js} +1 -1
  6. package/dist/{chunk-EOOWKTQC.js → chunk-3PGQSKJV.js} +9 -9
  7. package/dist/{chunk-ZPLAAHVP.js → chunk-3UI3WFTX.js} +5 -5
  8. package/dist/{chunk-SY2RQ77O.js → chunk-5NOPO64K.js} +1 -1
  9. package/dist/{chunk-JLUCKXGI.js → chunk-5PKWYPFT.js} +6 -6
  10. package/dist/{chunk-GFXDMDHR.js → chunk-63NKKFJL.js} +2 -2
  11. package/dist/{chunk-M7BHRB3G.js → chunk-6AYH6252.js} +4 -4
  12. package/dist/{chunk-RDWWCDA4.js → chunk-7DHZP5KJ.js} +2 -2
  13. package/dist/{chunk-RG74Q34N.js → chunk-A76OIMYN.js} +1 -1
  14. package/dist/{chunk-YVP6QNBZ.js → chunk-AWMS3SPP.js} +3 -3
  15. package/dist/{chunk-ODSGDVHT.js → chunk-B3LY5RCL.js} +5 -5
  16. package/dist/{chunk-4Q5IR5GA.js → chunk-BD2KT3OB.js} +1 -1
  17. package/dist/{chunk-5Q6KP6LH.js → chunk-BXCX5QKA.js} +1 -1
  18. package/dist/{chunk-TF5TXGRD.js → chunk-C6VVF43U.js} +1 -1
  19. package/dist/{chunk-5JDNDQHL.js → chunk-DBVY6HLX.js} +1 -1
  20. package/dist/{chunk-PIHLVU7T.js → chunk-DL2KLKVH.js} +6 -6
  21. package/dist/{chunk-3WUBDFFL.js → chunk-ELWOYVOY.js} +1 -1
  22. package/dist/{chunk-PSQ4SWI3.js → chunk-EWT7H65X.js} +4 -4
  23. package/dist/{chunk-OTTKTTVI.js → chunk-HMREVIO2.js} +2 -2
  24. package/dist/{chunk-LUITHZZL.js → chunk-IIWUT4FO.js} +8 -8
  25. package/dist/{chunk-V2VL335Y.js → chunk-JSJQEWBJ.js} +21 -21
  26. package/dist/{chunk-T6263C3N.js → chunk-KHKKHDLD.js} +2 -2
  27. package/dist/{chunk-OIILBD56.js → chunk-LA6R4A7Q.js} +3 -3
  28. package/dist/{chunk-X2Q4H6JQ.js → chunk-LOOU2DUR.js} +315 -166
  29. package/dist/{chunk-ADNSL3MX.js → chunk-M6FHWXE3.js} +9 -9
  30. package/dist/{chunk-JMRHEW6B.js → chunk-M76HMB7M.js} +3 -3
  31. package/dist/{chunk-7DO36XLF.js → chunk-MAGNK5J4.js} +1 -1
  32. package/dist/{chunk-OVHO76WN.js → chunk-NSXKRGRT.js} +3 -3
  33. package/dist/{chunk-UR43NMUR.js → chunk-OWMPFXJA.js} +4 -4
  34. package/dist/{chunk-K2QYWZ7F.js → chunk-PW4P4JYF.js} +14 -3
  35. package/dist/{chunk-VLBLCJXK.js → chunk-QB54UQUS.js} +5 -5
  36. package/dist/{chunk-752M26LC.js → chunk-QP3OGJXF.js} +1 -1
  37. package/dist/{chunk-LICM66W2.js → chunk-REOIRYPR.js} +2 -2
  38. package/dist/{chunk-AV552V2K.js → chunk-SCOZRLZ4.js} +3 -3
  39. package/dist/{chunk-IAZBUDVU.js → chunk-TXJSXBV5.js} +36 -30
  40. package/dist/{chunk-N5VHBUXF.js → chunk-U2GPUYAL.js} +19 -6
  41. package/dist/{chunk-22Y5SBDM.js → chunk-WQSHDTTI.js} +8 -8
  42. package/dist/{chunk-5VRPXF4T.js → chunk-YDUR3ZYW.js} +1 -1
  43. package/dist/cli/chat.js +33 -33
  44. package/dist/cli/check.js +5 -5
  45. package/dist/cli/plugins.js +12 -12
  46. package/dist/cli/snapshot-create.js +9 -9
  47. package/dist/cli/upgrade.js +6 -6
  48. package/dist/{db-SCTYCGQ5.js → db-3L2MCVRI.js} +6 -6
  49. package/dist/instrumentation.js +3 -3
  50. package/dist/nitro.js +6 -6
  51. package/dist/{oauth-callback-server-QXKBXP5M.js → oauth-callback-server-YVV6C6T2.js} +29 -29
  52. package/dist/{runner-Z3EQSZ23.js → runner-LQ7RETDP.js} +21 -21
  53. package/dist/{skills-CGEPG74A.js → skills-XRWYEDCD.js} +5 -5
  54. package/dist/spawn-RC6SJUAI.js +42 -0
  55. package/dist/task-runner-7DY7ARYH.js +36 -0
  56. package/dist/{validation-YLALMVMB.js → validation-7MNQGCJA.js} +5 -5
  57. package/dist/version.js +1 -1
  58. package/dist/{work-N6PUG4MY.js → work-COALHUCG.js} +21 -21
  59. package/dist/{worker-M7464FAO.js → worker-6MURZIPD.js} +10 -10
  60. package/migrations/0039_attachment_provider.sql +7 -0
  61. package/migrations/meta/0039_snapshot.json +3368 -0
  62. package/migrations/meta/_journal.json +7 -0
  63. package/package.json +6 -6
  64. package/dist/spawn-WBEM46BW.js +0 -42
  65. package/dist/task-runner-2X5MUSHN.js +0 -36
@@ -0,0 +1,3368 @@
1
+ {
2
+ "id": "591c4ce6-a11f-4420-9389-04358d8bfce3",
3
+ "prevId": "16d23deb-2218-4f8d-8ca6-8f27e9aad3a5",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.junior_agent_bindings": {
8
+ "name": "junior_agent_bindings",
9
+ "schema": "",
10
+ "columns": {
11
+ "parent_conversation_id": {
12
+ "name": "parent_conversation_id",
13
+ "type": "text",
14
+ "primaryKey": false,
15
+ "notNull": true
16
+ },
17
+ "name": {
18
+ "name": "name",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true
22
+ },
23
+ "child_conversation_id": {
24
+ "name": "child_conversation_id",
25
+ "type": "text",
26
+ "primaryKey": false,
27
+ "notNull": true
28
+ }
29
+ },
30
+ "indexes": {
31
+ "junior_agent_bindings_child_idx": {
32
+ "name": "junior_agent_bindings_child_idx",
33
+ "columns": [
34
+ {
35
+ "expression": "child_conversation_id",
36
+ "isExpression": false,
37
+ "asc": true,
38
+ "nulls": "last"
39
+ }
40
+ ],
41
+ "isUnique": true,
42
+ "concurrently": false,
43
+ "method": "btree",
44
+ "with": {}
45
+ }
46
+ },
47
+ "foreignKeys": {
48
+ "junior_agent_bindings_parent_conversation_id_junior_conversations_conversation_id_fk": {
49
+ "name": "junior_agent_bindings_parent_conversation_id_junior_conversations_conversation_id_fk",
50
+ "tableFrom": "junior_agent_bindings",
51
+ "tableTo": "junior_conversations",
52
+ "columnsFrom": [
53
+ "parent_conversation_id"
54
+ ],
55
+ "columnsTo": [
56
+ "conversation_id"
57
+ ],
58
+ "onDelete": "no action",
59
+ "onUpdate": "no action"
60
+ },
61
+ "junior_agent_bindings_child_conversation_id_junior_conversations_conversation_id_fk": {
62
+ "name": "junior_agent_bindings_child_conversation_id_junior_conversations_conversation_id_fk",
63
+ "tableFrom": "junior_agent_bindings",
64
+ "tableTo": "junior_conversations",
65
+ "columnsFrom": [
66
+ "child_conversation_id"
67
+ ],
68
+ "columnsTo": [
69
+ "conversation_id"
70
+ ],
71
+ "onDelete": "no action",
72
+ "onUpdate": "no action"
73
+ }
74
+ },
75
+ "compositePrimaryKeys": {
76
+ "junior_agent_bindings_parent_conversation_id_name_pk": {
77
+ "name": "junior_agent_bindings_parent_conversation_id_name_pk",
78
+ "columns": [
79
+ "parent_conversation_id",
80
+ "name"
81
+ ]
82
+ }
83
+ },
84
+ "uniqueConstraints": {},
85
+ "policies": {},
86
+ "checkConstraints": {},
87
+ "isRLSEnabled": false
88
+ },
89
+ "public.junior_agent_invocations": {
90
+ "name": "junior_agent_invocations",
91
+ "schema": "",
92
+ "columns": {
93
+ "invocation_id": {
94
+ "name": "invocation_id",
95
+ "type": "text",
96
+ "primaryKey": true,
97
+ "notNull": true
98
+ },
99
+ "parent_conversation_id": {
100
+ "name": "parent_conversation_id",
101
+ "type": "text",
102
+ "primaryKey": false,
103
+ "notNull": true
104
+ },
105
+ "child_conversation_id": {
106
+ "name": "child_conversation_id",
107
+ "type": "text",
108
+ "primaryKey": false,
109
+ "notNull": true
110
+ },
111
+ "agent_name": {
112
+ "name": "agent_name",
113
+ "type": "text",
114
+ "primaryKey": false,
115
+ "notNull": false
116
+ },
117
+ "input": {
118
+ "name": "input",
119
+ "type": "text",
120
+ "primaryKey": false,
121
+ "notNull": true
122
+ },
123
+ "actor_json": {
124
+ "name": "actor_json",
125
+ "type": "jsonb",
126
+ "primaryKey": false,
127
+ "notNull": true
128
+ },
129
+ "credential_context_json": {
130
+ "name": "credential_context_json",
131
+ "type": "jsonb",
132
+ "primaryKey": false,
133
+ "notNull": false
134
+ },
135
+ "source_json": {
136
+ "name": "source_json",
137
+ "type": "jsonb",
138
+ "primaryKey": false,
139
+ "notNull": true
140
+ },
141
+ "destination_json": {
142
+ "name": "destination_json",
143
+ "type": "jsonb",
144
+ "primaryKey": false,
145
+ "notNull": true
146
+ },
147
+ "destination_visibility": {
148
+ "name": "destination_visibility",
149
+ "type": "text",
150
+ "primaryKey": false,
151
+ "notNull": false
152
+ },
153
+ "reasoning_level": {
154
+ "name": "reasoning_level",
155
+ "type": "text",
156
+ "primaryKey": false,
157
+ "notNull": false
158
+ },
159
+ "status": {
160
+ "name": "status",
161
+ "type": "text",
162
+ "primaryKey": false,
163
+ "notNull": true
164
+ },
165
+ "mailbox_status": {
166
+ "name": "mailbox_status",
167
+ "type": "text",
168
+ "primaryKey": false,
169
+ "notNull": true
170
+ },
171
+ "result": {
172
+ "name": "result",
173
+ "type": "text",
174
+ "primaryKey": false,
175
+ "notNull": false
176
+ },
177
+ "error_message": {
178
+ "name": "error_message",
179
+ "type": "text",
180
+ "primaryKey": false,
181
+ "notNull": false
182
+ },
183
+ "created_at": {
184
+ "name": "created_at",
185
+ "type": "timestamp with time zone",
186
+ "primaryKey": false,
187
+ "notNull": true
188
+ },
189
+ "updated_at": {
190
+ "name": "updated_at",
191
+ "type": "timestamp with time zone",
192
+ "primaryKey": false,
193
+ "notNull": true
194
+ },
195
+ "terminal_at": {
196
+ "name": "terminal_at",
197
+ "type": "timestamp with time zone",
198
+ "primaryKey": false,
199
+ "notNull": false
200
+ }
201
+ },
202
+ "indexes": {
203
+ "junior_agent_invocations_child_idx": {
204
+ "name": "junior_agent_invocations_child_idx",
205
+ "columns": [
206
+ {
207
+ "expression": "child_conversation_id",
208
+ "isExpression": false,
209
+ "asc": true,
210
+ "nulls": "last"
211
+ }
212
+ ],
213
+ "isUnique": false,
214
+ "concurrently": false,
215
+ "method": "btree",
216
+ "with": {}
217
+ },
218
+ "junior_agent_invocations_mailbox_idx": {
219
+ "name": "junior_agent_invocations_mailbox_idx",
220
+ "columns": [
221
+ {
222
+ "expression": "mailbox_status",
223
+ "isExpression": false,
224
+ "asc": true,
225
+ "nulls": "last"
226
+ },
227
+ {
228
+ "expression": "created_at",
229
+ "isExpression": false,
230
+ "asc": true,
231
+ "nulls": "last"
232
+ }
233
+ ],
234
+ "isUnique": false,
235
+ "concurrently": false,
236
+ "method": "btree",
237
+ "with": {}
238
+ }
239
+ },
240
+ "foreignKeys": {
241
+ "junior_agent_invocations_parent_conversation_id_junior_conversations_conversation_id_fk": {
242
+ "name": "junior_agent_invocations_parent_conversation_id_junior_conversations_conversation_id_fk",
243
+ "tableFrom": "junior_agent_invocations",
244
+ "tableTo": "junior_conversations",
245
+ "columnsFrom": [
246
+ "parent_conversation_id"
247
+ ],
248
+ "columnsTo": [
249
+ "conversation_id"
250
+ ],
251
+ "onDelete": "no action",
252
+ "onUpdate": "no action"
253
+ },
254
+ "junior_agent_invocations_child_conversation_id_junior_conversations_conversation_id_fk": {
255
+ "name": "junior_agent_invocations_child_conversation_id_junior_conversations_conversation_id_fk",
256
+ "tableFrom": "junior_agent_invocations",
257
+ "tableTo": "junior_conversations",
258
+ "columnsFrom": [
259
+ "child_conversation_id"
260
+ ],
261
+ "columnsTo": [
262
+ "conversation_id"
263
+ ],
264
+ "onDelete": "no action",
265
+ "onUpdate": "no action"
266
+ }
267
+ },
268
+ "compositePrimaryKeys": {},
269
+ "uniqueConstraints": {},
270
+ "policies": {},
271
+ "checkConstraints": {},
272
+ "isRLSEnabled": false
273
+ },
274
+ "public.junior_api_tokens": {
275
+ "name": "junior_api_tokens",
276
+ "schema": "",
277
+ "columns": {
278
+ "id": {
279
+ "name": "id",
280
+ "type": "text",
281
+ "primaryKey": true,
282
+ "notNull": true
283
+ },
284
+ "owner_email_normalized": {
285
+ "name": "owner_email_normalized",
286
+ "type": "text",
287
+ "primaryKey": false,
288
+ "notNull": true
289
+ },
290
+ "name": {
291
+ "name": "name",
292
+ "type": "text",
293
+ "primaryKey": false,
294
+ "notNull": true
295
+ },
296
+ "token_hash": {
297
+ "name": "token_hash",
298
+ "type": "text",
299
+ "primaryKey": false,
300
+ "notNull": true
301
+ },
302
+ "token_suffix": {
303
+ "name": "token_suffix",
304
+ "type": "text",
305
+ "primaryKey": false,
306
+ "notNull": true
307
+ },
308
+ "created_at": {
309
+ "name": "created_at",
310
+ "type": "timestamp with time zone",
311
+ "primaryKey": false,
312
+ "notNull": true
313
+ },
314
+ "expires_at": {
315
+ "name": "expires_at",
316
+ "type": "timestamp with time zone",
317
+ "primaryKey": false,
318
+ "notNull": true
319
+ },
320
+ "last_used_at": {
321
+ "name": "last_used_at",
322
+ "type": "timestamp with time zone",
323
+ "primaryKey": false,
324
+ "notNull": false
325
+ },
326
+ "revoked_at": {
327
+ "name": "revoked_at",
328
+ "type": "timestamp with time zone",
329
+ "primaryKey": false,
330
+ "notNull": false
331
+ }
332
+ },
333
+ "indexes": {
334
+ "junior_api_tokens_token_hash_uidx": {
335
+ "name": "junior_api_tokens_token_hash_uidx",
336
+ "columns": [
337
+ {
338
+ "expression": "token_hash",
339
+ "isExpression": false,
340
+ "asc": true,
341
+ "nulls": "last"
342
+ }
343
+ ],
344
+ "isUnique": true,
345
+ "concurrently": false,
346
+ "method": "btree",
347
+ "with": {}
348
+ },
349
+ "junior_api_tokens_owner_email_idx": {
350
+ "name": "junior_api_tokens_owner_email_idx",
351
+ "columns": [
352
+ {
353
+ "expression": "owner_email_normalized",
354
+ "isExpression": false,
355
+ "asc": true,
356
+ "nulls": "last"
357
+ }
358
+ ],
359
+ "isUnique": false,
360
+ "concurrently": false,
361
+ "method": "btree",
362
+ "with": {}
363
+ }
364
+ },
365
+ "foreignKeys": {},
366
+ "compositePrimaryKeys": {},
367
+ "uniqueConstraints": {},
368
+ "policies": {},
369
+ "checkConstraints": {},
370
+ "isRLSEnabled": false
371
+ },
372
+ "public.junior_artifacts": {
373
+ "name": "junior_artifacts",
374
+ "schema": "",
375
+ "columns": {
376
+ "id": {
377
+ "name": "id",
378
+ "type": "text",
379
+ "primaryKey": true,
380
+ "notNull": true
381
+ },
382
+ "conversation_id": {
383
+ "name": "conversation_id",
384
+ "type": "text",
385
+ "primaryKey": false,
386
+ "notNull": true
387
+ },
388
+ "sha256": {
389
+ "name": "sha256",
390
+ "type": "text",
391
+ "primaryKey": false,
392
+ "notNull": true
393
+ },
394
+ "ext": {
395
+ "name": "ext",
396
+ "type": "text",
397
+ "primaryKey": false,
398
+ "notNull": true
399
+ },
400
+ "storage_key": {
401
+ "name": "storage_key",
402
+ "type": "text",
403
+ "primaryKey": false,
404
+ "notNull": true
405
+ },
406
+ "content_type": {
407
+ "name": "content_type",
408
+ "type": "text",
409
+ "primaryKey": false,
410
+ "notNull": true
411
+ },
412
+ "bytes": {
413
+ "name": "bytes",
414
+ "type": "integer",
415
+ "primaryKey": false,
416
+ "notNull": true
417
+ },
418
+ "public": {
419
+ "name": "public",
420
+ "type": "boolean",
421
+ "primaryKey": false,
422
+ "notNull": true
423
+ },
424
+ "created_at": {
425
+ "name": "created_at",
426
+ "type": "timestamp with time zone",
427
+ "primaryKey": false,
428
+ "notNull": true
429
+ },
430
+ "delete_requested_at": {
431
+ "name": "delete_requested_at",
432
+ "type": "timestamp with time zone",
433
+ "primaryKey": false,
434
+ "notNull": false
435
+ }
436
+ },
437
+ "indexes": {
438
+ "junior_artifacts_conversation_sha_uidx": {
439
+ "name": "junior_artifacts_conversation_sha_uidx",
440
+ "columns": [
441
+ {
442
+ "expression": "conversation_id",
443
+ "isExpression": false,
444
+ "asc": true,
445
+ "nulls": "last"
446
+ },
447
+ {
448
+ "expression": "sha256",
449
+ "isExpression": false,
450
+ "asc": true,
451
+ "nulls": "last"
452
+ }
453
+ ],
454
+ "isUnique": true,
455
+ "concurrently": false,
456
+ "method": "btree",
457
+ "with": {}
458
+ },
459
+ "junior_artifacts_gc_idx": {
460
+ "name": "junior_artifacts_gc_idx",
461
+ "columns": [
462
+ {
463
+ "expression": "delete_requested_at",
464
+ "isExpression": false,
465
+ "asc": true,
466
+ "nulls": "last"
467
+ },
468
+ {
469
+ "expression": "created_at",
470
+ "isExpression": false,
471
+ "asc": true,
472
+ "nulls": "last"
473
+ }
474
+ ],
475
+ "isUnique": false,
476
+ "concurrently": false,
477
+ "method": "btree",
478
+ "with": {}
479
+ },
480
+ "junior_artifacts_conversation_idx": {
481
+ "name": "junior_artifacts_conversation_idx",
482
+ "columns": [
483
+ {
484
+ "expression": "conversation_id",
485
+ "isExpression": false,
486
+ "asc": true,
487
+ "nulls": "last"
488
+ }
489
+ ],
490
+ "isUnique": false,
491
+ "concurrently": false,
492
+ "method": "btree",
493
+ "with": {}
494
+ }
495
+ },
496
+ "foreignKeys": {},
497
+ "compositePrimaryKeys": {},
498
+ "uniqueConstraints": {},
499
+ "policies": {},
500
+ "checkConstraints": {},
501
+ "isRLSEnabled": false
502
+ },
503
+ "public.junior_attachments": {
504
+ "name": "junior_attachments",
505
+ "schema": "",
506
+ "columns": {
507
+ "id": {
508
+ "name": "id",
509
+ "type": "text",
510
+ "primaryKey": true,
511
+ "notNull": true
512
+ },
513
+ "conversation_id": {
514
+ "name": "conversation_id",
515
+ "type": "text",
516
+ "primaryKey": false,
517
+ "notNull": true
518
+ },
519
+ "storage_provider": {
520
+ "name": "storage_provider",
521
+ "type": "text",
522
+ "primaryKey": false,
523
+ "notNull": true
524
+ },
525
+ "storage_key": {
526
+ "name": "storage_key",
527
+ "type": "text",
528
+ "primaryKey": false,
529
+ "notNull": true
530
+ },
531
+ "provider": {
532
+ "name": "provider",
533
+ "type": "text",
534
+ "primaryKey": false,
535
+ "notNull": false
536
+ },
537
+ "provider_id": {
538
+ "name": "provider_id",
539
+ "type": "text",
540
+ "primaryKey": false,
541
+ "notNull": false
542
+ },
543
+ "filename": {
544
+ "name": "filename",
545
+ "type": "text",
546
+ "primaryKey": false,
547
+ "notNull": true
548
+ },
549
+ "content_type": {
550
+ "name": "content_type",
551
+ "type": "text",
552
+ "primaryKey": false,
553
+ "notNull": true
554
+ },
555
+ "bytes": {
556
+ "name": "bytes",
557
+ "type": "integer",
558
+ "primaryKey": false,
559
+ "notNull": true
560
+ },
561
+ "sha256": {
562
+ "name": "sha256",
563
+ "type": "text",
564
+ "primaryKey": false,
565
+ "notNull": true
566
+ },
567
+ "vision_summary": {
568
+ "name": "vision_summary",
569
+ "type": "text",
570
+ "primaryKey": false,
571
+ "notNull": false
572
+ },
573
+ "created_at": {
574
+ "name": "created_at",
575
+ "type": "timestamp with time zone",
576
+ "primaryKey": false,
577
+ "notNull": true
578
+ },
579
+ "delete_requested_at": {
580
+ "name": "delete_requested_at",
581
+ "type": "timestamp with time zone",
582
+ "primaryKey": false,
583
+ "notNull": false
584
+ }
585
+ },
586
+ "indexes": {
587
+ "junior_attachments_conversation_idx": {
588
+ "name": "junior_attachments_conversation_idx",
589
+ "columns": [
590
+ {
591
+ "expression": "conversation_id",
592
+ "isExpression": false,
593
+ "asc": true,
594
+ "nulls": "last"
595
+ }
596
+ ],
597
+ "isUnique": false,
598
+ "concurrently": false,
599
+ "method": "btree",
600
+ "with": {}
601
+ },
602
+ "junior_attachments_provider_idx": {
603
+ "name": "junior_attachments_provider_idx",
604
+ "columns": [
605
+ {
606
+ "expression": "conversation_id",
607
+ "isExpression": false,
608
+ "asc": true,
609
+ "nulls": "last"
610
+ },
611
+ {
612
+ "expression": "provider",
613
+ "isExpression": false,
614
+ "asc": true,
615
+ "nulls": "last"
616
+ },
617
+ {
618
+ "expression": "provider_id",
619
+ "isExpression": false,
620
+ "asc": true,
621
+ "nulls": "last"
622
+ }
623
+ ],
624
+ "isUnique": false,
625
+ "concurrently": false,
626
+ "method": "btree",
627
+ "with": {}
628
+ },
629
+ "junior_attachments_gc_idx": {
630
+ "name": "junior_attachments_gc_idx",
631
+ "columns": [
632
+ {
633
+ "expression": "storage_provider",
634
+ "isExpression": false,
635
+ "asc": true,
636
+ "nulls": "last"
637
+ },
638
+ {
639
+ "expression": "delete_requested_at",
640
+ "isExpression": false,
641
+ "asc": true,
642
+ "nulls": "last"
643
+ },
644
+ {
645
+ "expression": "created_at",
646
+ "isExpression": false,
647
+ "asc": true,
648
+ "nulls": "last"
649
+ }
650
+ ],
651
+ "isUnique": false,
652
+ "concurrently": false,
653
+ "method": "btree",
654
+ "with": {}
655
+ }
656
+ },
657
+ "foreignKeys": {
658
+ "junior_attachments_conversation_id_junior_conversations_conversation_id_fk": {
659
+ "name": "junior_attachments_conversation_id_junior_conversations_conversation_id_fk",
660
+ "tableFrom": "junior_attachments",
661
+ "tableTo": "junior_conversations",
662
+ "columnsFrom": [
663
+ "conversation_id"
664
+ ],
665
+ "columnsTo": [
666
+ "conversation_id"
667
+ ],
668
+ "onDelete": "cascade",
669
+ "onUpdate": "no action"
670
+ }
671
+ },
672
+ "compositePrimaryKeys": {},
673
+ "uniqueConstraints": {},
674
+ "policies": {},
675
+ "checkConstraints": {},
676
+ "isRLSEnabled": false
677
+ },
678
+ "public.junior_code_changes": {
679
+ "name": "junior_code_changes",
680
+ "schema": "",
681
+ "columns": {
682
+ "id": {
683
+ "name": "id",
684
+ "type": "uuid",
685
+ "primaryKey": true,
686
+ "notNull": true
687
+ },
688
+ "closed_at": {
689
+ "name": "closed_at",
690
+ "type": "timestamp with time zone",
691
+ "primaryKey": false,
692
+ "notNull": false
693
+ },
694
+ "conversation_ids": {
695
+ "name": "conversation_ids",
696
+ "type": "text[]",
697
+ "primaryKey": false,
698
+ "notNull": true,
699
+ "default": "ARRAY[]::text[]"
700
+ },
701
+ "merged_at": {
702
+ "name": "merged_at",
703
+ "type": "timestamp with time zone",
704
+ "primaryKey": false,
705
+ "notNull": false
706
+ },
707
+ "number": {
708
+ "name": "number",
709
+ "type": "integer",
710
+ "primaryKey": false,
711
+ "notNull": true
712
+ },
713
+ "opened_at": {
714
+ "name": "opened_at",
715
+ "type": "timestamp with time zone",
716
+ "primaryKey": false,
717
+ "notNull": true
718
+ },
719
+ "provider": {
720
+ "name": "provider",
721
+ "type": "text",
722
+ "primaryKey": false,
723
+ "notNull": true
724
+ },
725
+ "provider_id": {
726
+ "name": "provider_id",
727
+ "type": "text",
728
+ "primaryKey": false,
729
+ "notNull": true
730
+ },
731
+ "repository_id": {
732
+ "name": "repository_id",
733
+ "type": "uuid",
734
+ "primaryKey": false,
735
+ "notNull": true
736
+ },
737
+ "state": {
738
+ "name": "state",
739
+ "type": "text",
740
+ "primaryKey": false,
741
+ "notNull": true
742
+ },
743
+ "title": {
744
+ "name": "title",
745
+ "type": "text",
746
+ "primaryKey": false,
747
+ "notNull": false
748
+ },
749
+ "updated_at": {
750
+ "name": "updated_at",
751
+ "type": "timestamp with time zone",
752
+ "primaryKey": false,
753
+ "notNull": true
754
+ },
755
+ "url": {
756
+ "name": "url",
757
+ "type": "text",
758
+ "primaryKey": false,
759
+ "notNull": false
760
+ }
761
+ },
762
+ "indexes": {
763
+ "junior_code_changes_provider_id_idx": {
764
+ "name": "junior_code_changes_provider_id_idx",
765
+ "columns": [
766
+ {
767
+ "expression": "provider",
768
+ "isExpression": false,
769
+ "asc": true,
770
+ "nulls": "last"
771
+ },
772
+ {
773
+ "expression": "provider_id",
774
+ "isExpression": false,
775
+ "asc": true,
776
+ "nulls": "last"
777
+ }
778
+ ],
779
+ "isUnique": true,
780
+ "concurrently": false,
781
+ "method": "btree",
782
+ "with": {}
783
+ },
784
+ "junior_code_changes_opened_at_idx": {
785
+ "name": "junior_code_changes_opened_at_idx",
786
+ "columns": [
787
+ {
788
+ "expression": "opened_at",
789
+ "isExpression": false,
790
+ "asc": true,
791
+ "nulls": "last"
792
+ }
793
+ ],
794
+ "isUnique": false,
795
+ "concurrently": false,
796
+ "method": "btree",
797
+ "with": {}
798
+ },
799
+ "junior_code_changes_merged_at_idx": {
800
+ "name": "junior_code_changes_merged_at_idx",
801
+ "columns": [
802
+ {
803
+ "expression": "merged_at",
804
+ "isExpression": false,
805
+ "asc": true,
806
+ "nulls": "last"
807
+ }
808
+ ],
809
+ "isUnique": false,
810
+ "concurrently": false,
811
+ "method": "btree",
812
+ "with": {}
813
+ },
814
+ "junior_code_changes_closed_at_idx": {
815
+ "name": "junior_code_changes_closed_at_idx",
816
+ "columns": [
817
+ {
818
+ "expression": "closed_at",
819
+ "isExpression": false,
820
+ "asc": true,
821
+ "nulls": "last"
822
+ }
823
+ ],
824
+ "isUnique": false,
825
+ "concurrently": false,
826
+ "method": "btree",
827
+ "with": {}
828
+ },
829
+ "junior_code_changes_open_idx": {
830
+ "name": "junior_code_changes_open_idx",
831
+ "columns": [
832
+ {
833
+ "expression": "id",
834
+ "isExpression": false,
835
+ "asc": true,
836
+ "nulls": "last"
837
+ }
838
+ ],
839
+ "isUnique": false,
840
+ "where": "\"junior_code_changes\".\"state\" = 'open'",
841
+ "concurrently": false,
842
+ "method": "btree",
843
+ "with": {}
844
+ }
845
+ },
846
+ "foreignKeys": {
847
+ "junior_code_changes_repository_id_junior_code_repositories_id_fk": {
848
+ "name": "junior_code_changes_repository_id_junior_code_repositories_id_fk",
849
+ "tableFrom": "junior_code_changes",
850
+ "tableTo": "junior_code_repositories",
851
+ "columnsFrom": [
852
+ "repository_id"
853
+ ],
854
+ "columnsTo": [
855
+ "id"
856
+ ],
857
+ "onDelete": "cascade",
858
+ "onUpdate": "no action"
859
+ }
860
+ },
861
+ "compositePrimaryKeys": {},
862
+ "uniqueConstraints": {},
863
+ "policies": {},
864
+ "checkConstraints": {},
865
+ "isRLSEnabled": false
866
+ },
867
+ "public.junior_code_repositories": {
868
+ "name": "junior_code_repositories",
869
+ "schema": "",
870
+ "columns": {
871
+ "id": {
872
+ "name": "id",
873
+ "type": "uuid",
874
+ "primaryKey": true,
875
+ "notNull": true
876
+ },
877
+ "name": {
878
+ "name": "name",
879
+ "type": "text",
880
+ "primaryKey": false,
881
+ "notNull": true
882
+ },
883
+ "provider": {
884
+ "name": "provider",
885
+ "type": "text",
886
+ "primaryKey": false,
887
+ "notNull": true
888
+ },
889
+ "provider_id": {
890
+ "name": "provider_id",
891
+ "type": "text",
892
+ "primaryKey": false,
893
+ "notNull": true
894
+ },
895
+ "url": {
896
+ "name": "url",
897
+ "type": "text",
898
+ "primaryKey": false,
899
+ "notNull": false
900
+ },
901
+ "updated_at": {
902
+ "name": "updated_at",
903
+ "type": "timestamp with time zone",
904
+ "primaryKey": false,
905
+ "notNull": true
906
+ }
907
+ },
908
+ "indexes": {
909
+ "junior_code_repositories_provider_id_idx": {
910
+ "name": "junior_code_repositories_provider_id_idx",
911
+ "columns": [
912
+ {
913
+ "expression": "provider",
914
+ "isExpression": false,
915
+ "asc": true,
916
+ "nulls": "last"
917
+ },
918
+ {
919
+ "expression": "provider_id",
920
+ "isExpression": false,
921
+ "asc": true,
922
+ "nulls": "last"
923
+ }
924
+ ],
925
+ "isUnique": true,
926
+ "concurrently": false,
927
+ "method": "btree",
928
+ "with": {}
929
+ }
930
+ },
931
+ "foreignKeys": {},
932
+ "compositePrimaryKeys": {},
933
+ "uniqueConstraints": {},
934
+ "policies": {},
935
+ "checkConstraints": {},
936
+ "isRLSEnabled": false
937
+ },
938
+ "public.junior_conversation_annotations": {
939
+ "name": "junior_conversation_annotations",
940
+ "schema": "",
941
+ "columns": {
942
+ "conversation_id": {
943
+ "name": "conversation_id",
944
+ "type": "text",
945
+ "primaryKey": false,
946
+ "notNull": true
947
+ },
948
+ "plugin": {
949
+ "name": "plugin",
950
+ "type": "text",
951
+ "primaryKey": false,
952
+ "notNull": true
953
+ },
954
+ "kind": {
955
+ "name": "kind",
956
+ "type": "text",
957
+ "primaryKey": false,
958
+ "notNull": true
959
+ },
960
+ "key": {
961
+ "name": "key",
962
+ "type": "text",
963
+ "primaryKey": false,
964
+ "notNull": true
965
+ },
966
+ "annotation_json": {
967
+ "name": "annotation_json",
968
+ "type": "jsonb",
969
+ "primaryKey": false,
970
+ "notNull": true
971
+ },
972
+ "created_at": {
973
+ "name": "created_at",
974
+ "type": "timestamp with time zone",
975
+ "primaryKey": false,
976
+ "notNull": true
977
+ },
978
+ "updated_at": {
979
+ "name": "updated_at",
980
+ "type": "timestamp with time zone",
981
+ "primaryKey": false,
982
+ "notNull": true
983
+ }
984
+ },
985
+ "indexes": {},
986
+ "foreignKeys": {
987
+ "junior_conversation_annotations_conversation_id_fk": {
988
+ "name": "junior_conversation_annotations_conversation_id_fk",
989
+ "tableFrom": "junior_conversation_annotations",
990
+ "tableTo": "junior_conversations",
991
+ "columnsFrom": [
992
+ "conversation_id"
993
+ ],
994
+ "columnsTo": [
995
+ "conversation_id"
996
+ ],
997
+ "onDelete": "cascade",
998
+ "onUpdate": "no action"
999
+ }
1000
+ },
1001
+ "compositePrimaryKeys": {
1002
+ "junior_conversation_annotations_pk": {
1003
+ "name": "junior_conversation_annotations_pk",
1004
+ "columns": [
1005
+ "conversation_id",
1006
+ "plugin",
1007
+ "kind",
1008
+ "key"
1009
+ ]
1010
+ }
1011
+ },
1012
+ "uniqueConstraints": {},
1013
+ "policies": {},
1014
+ "checkConstraints": {},
1015
+ "isRLSEnabled": false
1016
+ },
1017
+ "public.junior_conversation_bindings": {
1018
+ "name": "junior_conversation_bindings",
1019
+ "schema": "",
1020
+ "columns": {
1021
+ "conversation_id": {
1022
+ "name": "conversation_id",
1023
+ "type": "text",
1024
+ "primaryKey": false,
1025
+ "notNull": true
1026
+ },
1027
+ "provider": {
1028
+ "name": "provider",
1029
+ "type": "text",
1030
+ "primaryKey": false,
1031
+ "notNull": true
1032
+ },
1033
+ "provider_tenant_id": {
1034
+ "name": "provider_tenant_id",
1035
+ "type": "text",
1036
+ "primaryKey": false,
1037
+ "notNull": true,
1038
+ "default": "''"
1039
+ },
1040
+ "provider_destination_id": {
1041
+ "name": "provider_destination_id",
1042
+ "type": "text",
1043
+ "primaryKey": false,
1044
+ "notNull": true
1045
+ },
1046
+ "provider_conversation_id": {
1047
+ "name": "provider_conversation_id",
1048
+ "type": "text",
1049
+ "primaryKey": false,
1050
+ "notNull": true
1051
+ },
1052
+ "created_at": {
1053
+ "name": "created_at",
1054
+ "type": "timestamp with time zone",
1055
+ "primaryKey": false,
1056
+ "notNull": true
1057
+ }
1058
+ },
1059
+ "indexes": {
1060
+ "junior_conversation_bindings_conversation_idx": {
1061
+ "name": "junior_conversation_bindings_conversation_idx",
1062
+ "columns": [
1063
+ {
1064
+ "expression": "conversation_id",
1065
+ "isExpression": false,
1066
+ "asc": true,
1067
+ "nulls": "last"
1068
+ }
1069
+ ],
1070
+ "isUnique": false,
1071
+ "concurrently": false,
1072
+ "method": "btree",
1073
+ "with": {}
1074
+ }
1075
+ },
1076
+ "foreignKeys": {
1077
+ "junior_conversation_bindings_conversation_id_junior_conversations_conversation_id_fk": {
1078
+ "name": "junior_conversation_bindings_conversation_id_junior_conversations_conversation_id_fk",
1079
+ "tableFrom": "junior_conversation_bindings",
1080
+ "tableTo": "junior_conversations",
1081
+ "columnsFrom": [
1082
+ "conversation_id"
1083
+ ],
1084
+ "columnsTo": [
1085
+ "conversation_id"
1086
+ ],
1087
+ "onDelete": "no action",
1088
+ "onUpdate": "no action"
1089
+ }
1090
+ },
1091
+ "compositePrimaryKeys": {
1092
+ "junior_conversation_bindings_provider_conversation_pk": {
1093
+ "name": "junior_conversation_bindings_provider_conversation_pk",
1094
+ "columns": [
1095
+ "provider",
1096
+ "provider_tenant_id",
1097
+ "provider_destination_id",
1098
+ "provider_conversation_id"
1099
+ ]
1100
+ }
1101
+ },
1102
+ "uniqueConstraints": {},
1103
+ "policies": {},
1104
+ "checkConstraints": {},
1105
+ "isRLSEnabled": false
1106
+ },
1107
+ "public.junior_conversation_events": {
1108
+ "name": "junior_conversation_events",
1109
+ "schema": "",
1110
+ "columns": {
1111
+ "conversation_id": {
1112
+ "name": "conversation_id",
1113
+ "type": "text",
1114
+ "primaryKey": false,
1115
+ "notNull": true
1116
+ },
1117
+ "seq": {
1118
+ "name": "seq",
1119
+ "type": "integer",
1120
+ "primaryKey": false,
1121
+ "notNull": true
1122
+ },
1123
+ "history_version": {
1124
+ "name": "history_version",
1125
+ "type": "integer",
1126
+ "primaryKey": false,
1127
+ "notNull": true
1128
+ },
1129
+ "schema_version": {
1130
+ "name": "schema_version",
1131
+ "type": "integer",
1132
+ "primaryKey": false,
1133
+ "notNull": true,
1134
+ "default": 1
1135
+ },
1136
+ "idempotency_key": {
1137
+ "name": "idempotency_key",
1138
+ "type": "text",
1139
+ "primaryKey": false,
1140
+ "notNull": false
1141
+ },
1142
+ "type": {
1143
+ "name": "type",
1144
+ "type": "text",
1145
+ "primaryKey": false,
1146
+ "notNull": true
1147
+ },
1148
+ "payload": {
1149
+ "name": "payload",
1150
+ "type": "jsonb",
1151
+ "primaryKey": false,
1152
+ "notNull": true
1153
+ },
1154
+ "actor_identity_id": {
1155
+ "name": "actor_identity_id",
1156
+ "type": "text",
1157
+ "primaryKey": false,
1158
+ "notNull": false
1159
+ },
1160
+ "created_at": {
1161
+ "name": "created_at",
1162
+ "type": "timestamp with time zone",
1163
+ "primaryKey": false,
1164
+ "notNull": true
1165
+ }
1166
+ },
1167
+ "indexes": {
1168
+ "junior_conversation_events_history_version_idx": {
1169
+ "name": "junior_conversation_events_history_version_idx",
1170
+ "columns": [
1171
+ {
1172
+ "expression": "conversation_id",
1173
+ "isExpression": false,
1174
+ "asc": true,
1175
+ "nulls": "last"
1176
+ },
1177
+ {
1178
+ "expression": "history_version",
1179
+ "isExpression": false,
1180
+ "asc": true,
1181
+ "nulls": "last"
1182
+ },
1183
+ {
1184
+ "expression": "seq",
1185
+ "isExpression": false,
1186
+ "asc": true,
1187
+ "nulls": "last"
1188
+ }
1189
+ ],
1190
+ "isUnique": false,
1191
+ "concurrently": false,
1192
+ "method": "btree",
1193
+ "with": {}
1194
+ },
1195
+ "junior_conversation_events_type_idx": {
1196
+ "name": "junior_conversation_events_type_idx",
1197
+ "columns": [
1198
+ {
1199
+ "expression": "conversation_id",
1200
+ "isExpression": false,
1201
+ "asc": true,
1202
+ "nulls": "last"
1203
+ },
1204
+ {
1205
+ "expression": "type",
1206
+ "isExpression": false,
1207
+ "asc": true,
1208
+ "nulls": "last"
1209
+ },
1210
+ {
1211
+ "expression": "seq",
1212
+ "isExpression": false,
1213
+ "asc": true,
1214
+ "nulls": "last"
1215
+ }
1216
+ ],
1217
+ "isUnique": false,
1218
+ "concurrently": false,
1219
+ "method": "btree",
1220
+ "with": {}
1221
+ },
1222
+ "junior_conversation_events_actor_identity_idx": {
1223
+ "name": "junior_conversation_events_actor_identity_idx",
1224
+ "columns": [
1225
+ {
1226
+ "expression": "actor_identity_id",
1227
+ "isExpression": false,
1228
+ "asc": true,
1229
+ "nulls": "last"
1230
+ },
1231
+ {
1232
+ "expression": "conversation_id",
1233
+ "isExpression": false,
1234
+ "asc": true,
1235
+ "nulls": "last"
1236
+ },
1237
+ {
1238
+ "expression": "seq",
1239
+ "isExpression": false,
1240
+ "asc": true,
1241
+ "nulls": "last"
1242
+ }
1243
+ ],
1244
+ "isUnique": false,
1245
+ "concurrently": false,
1246
+ "method": "btree",
1247
+ "with": {}
1248
+ },
1249
+ "junior_conversation_events_message_search_idx": {
1250
+ "name": "junior_conversation_events_message_search_idx",
1251
+ "columns": [
1252
+ {
1253
+ "expression": "to_tsvector('english', \"payload\"->>'text')",
1254
+ "asc": true,
1255
+ "isExpression": true,
1256
+ "nulls": "last"
1257
+ }
1258
+ ],
1259
+ "isUnique": false,
1260
+ "where": "\"junior_conversation_events\".\"type\" = 'message'",
1261
+ "concurrently": false,
1262
+ "method": "gin",
1263
+ "with": {}
1264
+ },
1265
+ "junior_conversation_events_idempotency_idx": {
1266
+ "name": "junior_conversation_events_idempotency_idx",
1267
+ "columns": [
1268
+ {
1269
+ "expression": "conversation_id",
1270
+ "isExpression": false,
1271
+ "asc": true,
1272
+ "nulls": "last"
1273
+ },
1274
+ {
1275
+ "expression": "idempotency_key",
1276
+ "isExpression": false,
1277
+ "asc": true,
1278
+ "nulls": "last"
1279
+ }
1280
+ ],
1281
+ "isUnique": true,
1282
+ "concurrently": false,
1283
+ "method": "btree",
1284
+ "with": {}
1285
+ }
1286
+ },
1287
+ "foreignKeys": {
1288
+ "junior_conversation_events_actor_identity_id_junior_identities_id_fk": {
1289
+ "name": "junior_conversation_events_actor_identity_id_junior_identities_id_fk",
1290
+ "tableFrom": "junior_conversation_events",
1291
+ "tableTo": "junior_identities",
1292
+ "columnsFrom": [
1293
+ "actor_identity_id"
1294
+ ],
1295
+ "columnsTo": [
1296
+ "id"
1297
+ ],
1298
+ "onDelete": "no action",
1299
+ "onUpdate": "no action"
1300
+ },
1301
+ "junior_conversation_events_conversation_id_junior_conversations_conversation_id_fk": {
1302
+ "name": "junior_conversation_events_conversation_id_junior_conversations_conversation_id_fk",
1303
+ "tableFrom": "junior_conversation_events",
1304
+ "tableTo": "junior_conversations",
1305
+ "columnsFrom": [
1306
+ "conversation_id"
1307
+ ],
1308
+ "columnsTo": [
1309
+ "conversation_id"
1310
+ ],
1311
+ "onDelete": "no action",
1312
+ "onUpdate": "no action"
1313
+ }
1314
+ },
1315
+ "compositePrimaryKeys": {
1316
+ "junior_conversation_events_conversation_id_seq_pk": {
1317
+ "name": "junior_conversation_events_conversation_id_seq_pk",
1318
+ "columns": [
1319
+ "conversation_id",
1320
+ "seq"
1321
+ ]
1322
+ }
1323
+ },
1324
+ "uniqueConstraints": {},
1325
+ "policies": {},
1326
+ "checkConstraints": {},
1327
+ "isRLSEnabled": false
1328
+ },
1329
+ "public.junior_conversation_participants": {
1330
+ "name": "junior_conversation_participants",
1331
+ "schema": "",
1332
+ "columns": {
1333
+ "user_id": {
1334
+ "name": "user_id",
1335
+ "type": "text",
1336
+ "primaryKey": false,
1337
+ "notNull": true
1338
+ },
1339
+ "root_conversation_id": {
1340
+ "name": "root_conversation_id",
1341
+ "type": "text",
1342
+ "primaryKey": false,
1343
+ "notNull": true
1344
+ },
1345
+ "last_message_at": {
1346
+ "name": "last_message_at",
1347
+ "type": "timestamp with time zone",
1348
+ "primaryKey": false,
1349
+ "notNull": true
1350
+ },
1351
+ "archived_at": {
1352
+ "name": "archived_at",
1353
+ "type": "timestamp with time zone",
1354
+ "primaryKey": false,
1355
+ "notNull": false
1356
+ }
1357
+ },
1358
+ "indexes": {
1359
+ "junior_conversation_participants_user_activity_idx": {
1360
+ "name": "junior_conversation_participants_user_activity_idx",
1361
+ "columns": [
1362
+ {
1363
+ "expression": "user_id",
1364
+ "isExpression": false,
1365
+ "asc": true,
1366
+ "nulls": "last"
1367
+ },
1368
+ {
1369
+ "expression": "last_message_at",
1370
+ "isExpression": false,
1371
+ "asc": false,
1372
+ "nulls": "last"
1373
+ }
1374
+ ],
1375
+ "isUnique": false,
1376
+ "concurrently": false,
1377
+ "method": "btree",
1378
+ "with": {}
1379
+ },
1380
+ "junior_conversation_participants_root_idx": {
1381
+ "name": "junior_conversation_participants_root_idx",
1382
+ "columns": [
1383
+ {
1384
+ "expression": "root_conversation_id",
1385
+ "isExpression": false,
1386
+ "asc": true,
1387
+ "nulls": "last"
1388
+ }
1389
+ ],
1390
+ "isUnique": false,
1391
+ "concurrently": false,
1392
+ "method": "btree",
1393
+ "with": {}
1394
+ }
1395
+ },
1396
+ "foreignKeys": {
1397
+ "junior_conversation_participants_user_id_junior_users_id_fk": {
1398
+ "name": "junior_conversation_participants_user_id_junior_users_id_fk",
1399
+ "tableFrom": "junior_conversation_participants",
1400
+ "tableTo": "junior_users",
1401
+ "columnsFrom": [
1402
+ "user_id"
1403
+ ],
1404
+ "columnsTo": [
1405
+ "id"
1406
+ ],
1407
+ "onDelete": "no action",
1408
+ "onUpdate": "no action"
1409
+ },
1410
+ "junior_conversation_participants_root_conversation_id_junior_conversations_conversation_id_fk": {
1411
+ "name": "junior_conversation_participants_root_conversation_id_junior_conversations_conversation_id_fk",
1412
+ "tableFrom": "junior_conversation_participants",
1413
+ "tableTo": "junior_conversations",
1414
+ "columnsFrom": [
1415
+ "root_conversation_id"
1416
+ ],
1417
+ "columnsTo": [
1418
+ "conversation_id"
1419
+ ],
1420
+ "onDelete": "no action",
1421
+ "onUpdate": "no action"
1422
+ }
1423
+ },
1424
+ "compositePrimaryKeys": {
1425
+ "junior_conversation_participants_user_root_pk": {
1426
+ "name": "junior_conversation_participants_user_root_pk",
1427
+ "columns": [
1428
+ "user_id",
1429
+ "root_conversation_id"
1430
+ ]
1431
+ }
1432
+ },
1433
+ "uniqueConstraints": {},
1434
+ "policies": {},
1435
+ "checkConstraints": {},
1436
+ "isRLSEnabled": false
1437
+ },
1438
+ "public.junior_conversations": {
1439
+ "name": "junior_conversations",
1440
+ "schema": "",
1441
+ "columns": {
1442
+ "conversation_id": {
1443
+ "name": "conversation_id",
1444
+ "type": "text",
1445
+ "primaryKey": true,
1446
+ "notNull": true
1447
+ },
1448
+ "schema_version": {
1449
+ "name": "schema_version",
1450
+ "type": "integer",
1451
+ "primaryKey": false,
1452
+ "notNull": true,
1453
+ "default": 1
1454
+ },
1455
+ "source": {
1456
+ "name": "source",
1457
+ "type": "text",
1458
+ "primaryKey": false,
1459
+ "notNull": false
1460
+ },
1461
+ "source_json": {
1462
+ "name": "source_json",
1463
+ "type": "jsonb",
1464
+ "primaryKey": false,
1465
+ "notNull": false
1466
+ },
1467
+ "origin_type": {
1468
+ "name": "origin_type",
1469
+ "type": "text",
1470
+ "primaryKey": false,
1471
+ "notNull": false
1472
+ },
1473
+ "origin_id": {
1474
+ "name": "origin_id",
1475
+ "type": "text",
1476
+ "primaryKey": false,
1477
+ "notNull": false
1478
+ },
1479
+ "origin_run_id": {
1480
+ "name": "origin_run_id",
1481
+ "type": "text",
1482
+ "primaryKey": false,
1483
+ "notNull": false
1484
+ },
1485
+ "location_json": {
1486
+ "name": "location_json",
1487
+ "type": "jsonb",
1488
+ "primaryKey": false,
1489
+ "notNull": false
1490
+ },
1491
+ "destination_id": {
1492
+ "name": "destination_id",
1493
+ "type": "text",
1494
+ "primaryKey": false,
1495
+ "notNull": false
1496
+ },
1497
+ "destination_json": {
1498
+ "name": "destination_json",
1499
+ "type": "jsonb",
1500
+ "primaryKey": false,
1501
+ "notNull": false
1502
+ },
1503
+ "actor_identity_id": {
1504
+ "name": "actor_identity_id",
1505
+ "type": "text",
1506
+ "primaryKey": false,
1507
+ "notNull": false
1508
+ },
1509
+ "creator_identity_id": {
1510
+ "name": "creator_identity_id",
1511
+ "type": "text",
1512
+ "primaryKey": false,
1513
+ "notNull": false
1514
+ },
1515
+ "credential_subject_identity_id": {
1516
+ "name": "credential_subject_identity_id",
1517
+ "type": "text",
1518
+ "primaryKey": false,
1519
+ "notNull": false
1520
+ },
1521
+ "actor_json": {
1522
+ "name": "actor_json",
1523
+ "type": "jsonb",
1524
+ "primaryKey": false,
1525
+ "notNull": false
1526
+ },
1527
+ "channel_name": {
1528
+ "name": "channel_name",
1529
+ "type": "text",
1530
+ "primaryKey": false,
1531
+ "notNull": false
1532
+ },
1533
+ "title": {
1534
+ "name": "title",
1535
+ "type": "text",
1536
+ "primaryKey": false,
1537
+ "notNull": false
1538
+ },
1539
+ "created_at": {
1540
+ "name": "created_at",
1541
+ "type": "timestamp with time zone",
1542
+ "primaryKey": false,
1543
+ "notNull": true
1544
+ },
1545
+ "last_activity_at": {
1546
+ "name": "last_activity_at",
1547
+ "type": "timestamp with time zone",
1548
+ "primaryKey": false,
1549
+ "notNull": true
1550
+ },
1551
+ "updated_at": {
1552
+ "name": "updated_at",
1553
+ "type": "timestamp with time zone",
1554
+ "primaryKey": false,
1555
+ "notNull": true
1556
+ },
1557
+ "execution_updated_at": {
1558
+ "name": "execution_updated_at",
1559
+ "type": "timestamp with time zone",
1560
+ "primaryKey": false,
1561
+ "notNull": false
1562
+ },
1563
+ "execution_status": {
1564
+ "name": "execution_status",
1565
+ "type": "text",
1566
+ "primaryKey": false,
1567
+ "notNull": true
1568
+ },
1569
+ "run_id": {
1570
+ "name": "run_id",
1571
+ "type": "text",
1572
+ "primaryKey": false,
1573
+ "notNull": false
1574
+ },
1575
+ "last_checkpoint_at": {
1576
+ "name": "last_checkpoint_at",
1577
+ "type": "timestamp with time zone",
1578
+ "primaryKey": false,
1579
+ "notNull": false
1580
+ },
1581
+ "last_enqueued_at": {
1582
+ "name": "last_enqueued_at",
1583
+ "type": "timestamp with time zone",
1584
+ "primaryKey": false,
1585
+ "notNull": false
1586
+ },
1587
+ "parent_conversation_id": {
1588
+ "name": "parent_conversation_id",
1589
+ "type": "text",
1590
+ "primaryKey": false,
1591
+ "notNull": false
1592
+ },
1593
+ "root_conversation_id": {
1594
+ "name": "root_conversation_id",
1595
+ "type": "text",
1596
+ "primaryKey": false,
1597
+ "notNull": false
1598
+ },
1599
+ "transcript_purged_at": {
1600
+ "name": "transcript_purged_at",
1601
+ "type": "timestamp with time zone",
1602
+ "primaryKey": false,
1603
+ "notNull": false
1604
+ },
1605
+ "duration_ms": {
1606
+ "name": "duration_ms",
1607
+ "type": "integer",
1608
+ "primaryKey": false,
1609
+ "notNull": true,
1610
+ "default": 0
1611
+ },
1612
+ "usage_json": {
1613
+ "name": "usage_json",
1614
+ "type": "jsonb",
1615
+ "primaryKey": false,
1616
+ "notNull": false
1617
+ },
1618
+ "execution_duration_ms": {
1619
+ "name": "execution_duration_ms",
1620
+ "type": "integer",
1621
+ "primaryKey": false,
1622
+ "notNull": true,
1623
+ "default": 0
1624
+ },
1625
+ "execution_usage_json": {
1626
+ "name": "execution_usage_json",
1627
+ "type": "jsonb",
1628
+ "primaryKey": false,
1629
+ "notNull": false
1630
+ },
1631
+ "metric_run_id": {
1632
+ "name": "metric_run_id",
1633
+ "type": "text",
1634
+ "primaryKey": false,
1635
+ "notNull": false
1636
+ },
1637
+ "archived_at": {
1638
+ "name": "archived_at",
1639
+ "type": "timestamp with time zone",
1640
+ "primaryKey": false,
1641
+ "notNull": false
1642
+ }
1643
+ },
1644
+ "indexes": {
1645
+ "junior_conversations_last_activity_idx": {
1646
+ "name": "junior_conversations_last_activity_idx",
1647
+ "columns": [
1648
+ {
1649
+ "expression": "last_activity_at",
1650
+ "isExpression": false,
1651
+ "asc": false,
1652
+ "nulls": "last"
1653
+ },
1654
+ {
1655
+ "expression": "conversation_id",
1656
+ "isExpression": false,
1657
+ "asc": true,
1658
+ "nulls": "last"
1659
+ }
1660
+ ],
1661
+ "isUnique": false,
1662
+ "concurrently": false,
1663
+ "method": "btree",
1664
+ "with": {}
1665
+ },
1666
+ "junior_conversations_active_idx": {
1667
+ "name": "junior_conversations_active_idx",
1668
+ "columns": [
1669
+ {
1670
+ "expression": "coalesce(\"execution_updated_at\", \"updated_at\")",
1671
+ "asc": true,
1672
+ "isExpression": true,
1673
+ "nulls": "last"
1674
+ },
1675
+ {
1676
+ "expression": "conversation_id",
1677
+ "isExpression": false,
1678
+ "asc": true,
1679
+ "nulls": "last"
1680
+ }
1681
+ ],
1682
+ "isUnique": false,
1683
+ "where": "\"junior_conversations\".\"execution_status\" <> 'idle'",
1684
+ "concurrently": false,
1685
+ "method": "btree",
1686
+ "with": {}
1687
+ },
1688
+ "junior_conversations_destination_activity_idx": {
1689
+ "name": "junior_conversations_destination_activity_idx",
1690
+ "columns": [
1691
+ {
1692
+ "expression": "destination_id",
1693
+ "isExpression": false,
1694
+ "asc": true,
1695
+ "nulls": "last"
1696
+ },
1697
+ {
1698
+ "expression": "last_activity_at",
1699
+ "isExpression": false,
1700
+ "asc": false,
1701
+ "nulls": "last"
1702
+ }
1703
+ ],
1704
+ "isUnique": false,
1705
+ "concurrently": false,
1706
+ "method": "btree",
1707
+ "with": {}
1708
+ },
1709
+ "junior_conversations_actor_activity_idx": {
1710
+ "name": "junior_conversations_actor_activity_idx",
1711
+ "columns": [
1712
+ {
1713
+ "expression": "actor_identity_id",
1714
+ "isExpression": false,
1715
+ "asc": true,
1716
+ "nulls": "last"
1717
+ },
1718
+ {
1719
+ "expression": "last_activity_at",
1720
+ "isExpression": false,
1721
+ "asc": false,
1722
+ "nulls": "last"
1723
+ }
1724
+ ],
1725
+ "isUnique": false,
1726
+ "concurrently": false,
1727
+ "method": "btree",
1728
+ "with": {}
1729
+ },
1730
+ "junior_conversations_origin_idx": {
1731
+ "name": "junior_conversations_origin_idx",
1732
+ "columns": [
1733
+ {
1734
+ "expression": "origin_type",
1735
+ "isExpression": false,
1736
+ "asc": true,
1737
+ "nulls": "last"
1738
+ },
1739
+ {
1740
+ "expression": "origin_id",
1741
+ "isExpression": false,
1742
+ "asc": true,
1743
+ "nulls": "last"
1744
+ },
1745
+ {
1746
+ "expression": "last_activity_at",
1747
+ "isExpression": false,
1748
+ "asc": false,
1749
+ "nulls": "last"
1750
+ }
1751
+ ],
1752
+ "isUnique": false,
1753
+ "concurrently": false,
1754
+ "method": "btree",
1755
+ "with": {}
1756
+ },
1757
+ "junior_conversations_parent_idx": {
1758
+ "name": "junior_conversations_parent_idx",
1759
+ "columns": [
1760
+ {
1761
+ "expression": "parent_conversation_id",
1762
+ "isExpression": false,
1763
+ "asc": true,
1764
+ "nulls": "last"
1765
+ }
1766
+ ],
1767
+ "isUnique": false,
1768
+ "concurrently": false,
1769
+ "method": "btree",
1770
+ "with": {}
1771
+ },
1772
+ "junior_conversations_root_idx": {
1773
+ "name": "junior_conversations_root_idx",
1774
+ "columns": [
1775
+ {
1776
+ "expression": "root_conversation_id",
1777
+ "isExpression": false,
1778
+ "asc": true,
1779
+ "nulls": "last"
1780
+ }
1781
+ ],
1782
+ "isUnique": false,
1783
+ "concurrently": false,
1784
+ "method": "btree",
1785
+ "with": {}
1786
+ }
1787
+ },
1788
+ "foreignKeys": {
1789
+ "junior_conversations_destination_id_junior_destinations_id_fk": {
1790
+ "name": "junior_conversations_destination_id_junior_destinations_id_fk",
1791
+ "tableFrom": "junior_conversations",
1792
+ "tableTo": "junior_destinations",
1793
+ "columnsFrom": [
1794
+ "destination_id"
1795
+ ],
1796
+ "columnsTo": [
1797
+ "id"
1798
+ ],
1799
+ "onDelete": "no action",
1800
+ "onUpdate": "no action"
1801
+ },
1802
+ "junior_conversations_actor_identity_id_junior_identities_id_fk": {
1803
+ "name": "junior_conversations_actor_identity_id_junior_identities_id_fk",
1804
+ "tableFrom": "junior_conversations",
1805
+ "tableTo": "junior_identities",
1806
+ "columnsFrom": [
1807
+ "actor_identity_id"
1808
+ ],
1809
+ "columnsTo": [
1810
+ "id"
1811
+ ],
1812
+ "onDelete": "no action",
1813
+ "onUpdate": "no action"
1814
+ },
1815
+ "junior_conversations_creator_identity_id_junior_identities_id_fk": {
1816
+ "name": "junior_conversations_creator_identity_id_junior_identities_id_fk",
1817
+ "tableFrom": "junior_conversations",
1818
+ "tableTo": "junior_identities",
1819
+ "columnsFrom": [
1820
+ "creator_identity_id"
1821
+ ],
1822
+ "columnsTo": [
1823
+ "id"
1824
+ ],
1825
+ "onDelete": "no action",
1826
+ "onUpdate": "no action"
1827
+ },
1828
+ "junior_conversations_credential_subject_identity_id_junior_identities_id_fk": {
1829
+ "name": "junior_conversations_credential_subject_identity_id_junior_identities_id_fk",
1830
+ "tableFrom": "junior_conversations",
1831
+ "tableTo": "junior_identities",
1832
+ "columnsFrom": [
1833
+ "credential_subject_identity_id"
1834
+ ],
1835
+ "columnsTo": [
1836
+ "id"
1837
+ ],
1838
+ "onDelete": "no action",
1839
+ "onUpdate": "no action"
1840
+ },
1841
+ "junior_conversations_parent_conversation_id_junior_conversations_conversation_id_fk": {
1842
+ "name": "junior_conversations_parent_conversation_id_junior_conversations_conversation_id_fk",
1843
+ "tableFrom": "junior_conversations",
1844
+ "tableTo": "junior_conversations",
1845
+ "columnsFrom": [
1846
+ "parent_conversation_id"
1847
+ ],
1848
+ "columnsTo": [
1849
+ "conversation_id"
1850
+ ],
1851
+ "onDelete": "no action",
1852
+ "onUpdate": "no action"
1853
+ },
1854
+ "junior_conversations_root_conversation_id_junior_conversations_conversation_id_fk": {
1855
+ "name": "junior_conversations_root_conversation_id_junior_conversations_conversation_id_fk",
1856
+ "tableFrom": "junior_conversations",
1857
+ "tableTo": "junior_conversations",
1858
+ "columnsFrom": [
1859
+ "root_conversation_id"
1860
+ ],
1861
+ "columnsTo": [
1862
+ "conversation_id"
1863
+ ],
1864
+ "onDelete": "no action",
1865
+ "onUpdate": "no action"
1866
+ }
1867
+ },
1868
+ "compositePrimaryKeys": {},
1869
+ "uniqueConstraints": {},
1870
+ "policies": {},
1871
+ "checkConstraints": {},
1872
+ "isRLSEnabled": false
1873
+ },
1874
+ "public.junior_destinations": {
1875
+ "name": "junior_destinations",
1876
+ "schema": "",
1877
+ "columns": {
1878
+ "id": {
1879
+ "name": "id",
1880
+ "type": "text",
1881
+ "primaryKey": true,
1882
+ "notNull": true
1883
+ },
1884
+ "provider": {
1885
+ "name": "provider",
1886
+ "type": "text",
1887
+ "primaryKey": false,
1888
+ "notNull": true
1889
+ },
1890
+ "provider_tenant_id": {
1891
+ "name": "provider_tenant_id",
1892
+ "type": "text",
1893
+ "primaryKey": false,
1894
+ "notNull": true,
1895
+ "default": "''"
1896
+ },
1897
+ "provider_destination_id": {
1898
+ "name": "provider_destination_id",
1899
+ "type": "text",
1900
+ "primaryKey": false,
1901
+ "notNull": true
1902
+ },
1903
+ "kind": {
1904
+ "name": "kind",
1905
+ "type": "text",
1906
+ "primaryKey": false,
1907
+ "notNull": true
1908
+ },
1909
+ "parent_destination_id": {
1910
+ "name": "parent_destination_id",
1911
+ "type": "text",
1912
+ "primaryKey": false,
1913
+ "notNull": false
1914
+ },
1915
+ "display_name": {
1916
+ "name": "display_name",
1917
+ "type": "text",
1918
+ "primaryKey": false,
1919
+ "notNull": false
1920
+ },
1921
+ "visibility": {
1922
+ "name": "visibility",
1923
+ "type": "text",
1924
+ "primaryKey": false,
1925
+ "notNull": true,
1926
+ "default": "'unknown'"
1927
+ },
1928
+ "metadata_json": {
1929
+ "name": "metadata_json",
1930
+ "type": "jsonb",
1931
+ "primaryKey": false,
1932
+ "notNull": false
1933
+ },
1934
+ "created_at": {
1935
+ "name": "created_at",
1936
+ "type": "timestamp with time zone",
1937
+ "primaryKey": false,
1938
+ "notNull": true
1939
+ },
1940
+ "updated_at": {
1941
+ "name": "updated_at",
1942
+ "type": "timestamp with time zone",
1943
+ "primaryKey": false,
1944
+ "notNull": true
1945
+ }
1946
+ },
1947
+ "indexes": {
1948
+ "junior_destinations_provider_destination_uidx": {
1949
+ "name": "junior_destinations_provider_destination_uidx",
1950
+ "columns": [
1951
+ {
1952
+ "expression": "provider",
1953
+ "isExpression": false,
1954
+ "asc": true,
1955
+ "nulls": "last"
1956
+ },
1957
+ {
1958
+ "expression": "provider_tenant_id",
1959
+ "isExpression": false,
1960
+ "asc": true,
1961
+ "nulls": "last"
1962
+ },
1963
+ {
1964
+ "expression": "provider_destination_id",
1965
+ "isExpression": false,
1966
+ "asc": true,
1967
+ "nulls": "last"
1968
+ }
1969
+ ],
1970
+ "isUnique": true,
1971
+ "concurrently": false,
1972
+ "method": "btree",
1973
+ "with": {}
1974
+ },
1975
+ "junior_destinations_provider_kind_idx": {
1976
+ "name": "junior_destinations_provider_kind_idx",
1977
+ "columns": [
1978
+ {
1979
+ "expression": "provider",
1980
+ "isExpression": false,
1981
+ "asc": true,
1982
+ "nulls": "last"
1983
+ },
1984
+ {
1985
+ "expression": "kind",
1986
+ "isExpression": false,
1987
+ "asc": true,
1988
+ "nulls": "last"
1989
+ }
1990
+ ],
1991
+ "isUnique": false,
1992
+ "concurrently": false,
1993
+ "method": "btree",
1994
+ "with": {}
1995
+ }
1996
+ },
1997
+ "foreignKeys": {},
1998
+ "compositePrimaryKeys": {},
1999
+ "uniqueConstraints": {},
2000
+ "policies": {},
2001
+ "checkConstraints": {},
2002
+ "isRLSEnabled": false
2003
+ },
2004
+ "public.junior_event_tasks": {
2005
+ "name": "junior_event_tasks",
2006
+ "schema": "",
2007
+ "columns": {
2008
+ "id": {
2009
+ "name": "id",
2010
+ "type": "text",
2011
+ "primaryKey": true,
2012
+ "notNull": true
2013
+ },
2014
+ "team_id": {
2015
+ "name": "team_id",
2016
+ "type": "text",
2017
+ "primaryKey": false,
2018
+ "notNull": true
2019
+ },
2020
+ "namespace": {
2021
+ "name": "namespace",
2022
+ "type": "text",
2023
+ "primaryKey": false,
2024
+ "notNull": true
2025
+ },
2026
+ "identifier": {
2027
+ "name": "identifier",
2028
+ "type": "text",
2029
+ "primaryKey": false,
2030
+ "notNull": true
2031
+ },
2032
+ "created_at_ms": {
2033
+ "name": "created_at_ms",
2034
+ "type": "bigint",
2035
+ "primaryKey": false,
2036
+ "notNull": true
2037
+ },
2038
+ "status": {
2039
+ "name": "status",
2040
+ "type": "text",
2041
+ "primaryKey": false,
2042
+ "notNull": true,
2043
+ "default": "'active'"
2044
+ },
2045
+ "title": {
2046
+ "name": "title",
2047
+ "type": "text",
2048
+ "primaryKey": false,
2049
+ "notNull": false
2050
+ },
2051
+ "task_json": {
2052
+ "name": "task_json",
2053
+ "type": "jsonb",
2054
+ "primaryKey": false,
2055
+ "notNull": true
2056
+ }
2057
+ },
2058
+ "indexes": {
2059
+ "junior_event_tasks_team_idx": {
2060
+ "name": "junior_event_tasks_team_idx",
2061
+ "columns": [
2062
+ {
2063
+ "expression": "team_id",
2064
+ "isExpression": false,
2065
+ "asc": true,
2066
+ "nulls": "last"
2067
+ },
2068
+ {
2069
+ "expression": "created_at_ms",
2070
+ "isExpression": false,
2071
+ "asc": true,
2072
+ "nulls": "last"
2073
+ },
2074
+ {
2075
+ "expression": "id",
2076
+ "isExpression": false,
2077
+ "asc": true,
2078
+ "nulls": "last"
2079
+ }
2080
+ ],
2081
+ "isUnique": false,
2082
+ "where": "\"junior_event_tasks\".\"status\" <> 'deleted'",
2083
+ "concurrently": false,
2084
+ "method": "btree",
2085
+ "with": {}
2086
+ },
2087
+ "junior_event_tasks_match_idx": {
2088
+ "name": "junior_event_tasks_match_idx",
2089
+ "columns": [
2090
+ {
2091
+ "expression": "namespace",
2092
+ "isExpression": false,
2093
+ "asc": true,
2094
+ "nulls": "last"
2095
+ },
2096
+ {
2097
+ "expression": "identifier",
2098
+ "isExpression": false,
2099
+ "asc": true,
2100
+ "nulls": "last"
2101
+ },
2102
+ {
2103
+ "expression": "created_at_ms",
2104
+ "isExpression": false,
2105
+ "asc": true,
2106
+ "nulls": "last"
2107
+ },
2108
+ {
2109
+ "expression": "id",
2110
+ "isExpression": false,
2111
+ "asc": true,
2112
+ "nulls": "last"
2113
+ }
2114
+ ],
2115
+ "isUnique": false,
2116
+ "where": "\"junior_event_tasks\".\"status\" <> 'deleted'",
2117
+ "concurrently": false,
2118
+ "method": "btree",
2119
+ "with": {}
2120
+ }
2121
+ },
2122
+ "foreignKeys": {},
2123
+ "compositePrimaryKeys": {},
2124
+ "uniqueConstraints": {},
2125
+ "policies": {},
2126
+ "checkConstraints": {},
2127
+ "isRLSEnabled": false
2128
+ },
2129
+ "public.junior_identities": {
2130
+ "name": "junior_identities",
2131
+ "schema": "",
2132
+ "columns": {
2133
+ "id": {
2134
+ "name": "id",
2135
+ "type": "text",
2136
+ "primaryKey": true,
2137
+ "notNull": true
2138
+ },
2139
+ "kind": {
2140
+ "name": "kind",
2141
+ "type": "text",
2142
+ "primaryKey": false,
2143
+ "notNull": true
2144
+ },
2145
+ "provider": {
2146
+ "name": "provider",
2147
+ "type": "text",
2148
+ "primaryKey": false,
2149
+ "notNull": true
2150
+ },
2151
+ "provider_tenant_id": {
2152
+ "name": "provider_tenant_id",
2153
+ "type": "text",
2154
+ "primaryKey": false,
2155
+ "notNull": true,
2156
+ "default": "''"
2157
+ },
2158
+ "provider_subject_id": {
2159
+ "name": "provider_subject_id",
2160
+ "type": "text",
2161
+ "primaryKey": false,
2162
+ "notNull": true
2163
+ },
2164
+ "display_name": {
2165
+ "name": "display_name",
2166
+ "type": "text",
2167
+ "primaryKey": false,
2168
+ "notNull": false
2169
+ },
2170
+ "handle": {
2171
+ "name": "handle",
2172
+ "type": "text",
2173
+ "primaryKey": false,
2174
+ "notNull": false
2175
+ },
2176
+ "email": {
2177
+ "name": "email",
2178
+ "type": "text",
2179
+ "primaryKey": false,
2180
+ "notNull": false
2181
+ },
2182
+ "avatar_url": {
2183
+ "name": "avatar_url",
2184
+ "type": "text",
2185
+ "primaryKey": false,
2186
+ "notNull": false
2187
+ },
2188
+ "metadata_json": {
2189
+ "name": "metadata_json",
2190
+ "type": "jsonb",
2191
+ "primaryKey": false,
2192
+ "notNull": false
2193
+ },
2194
+ "created_at": {
2195
+ "name": "created_at",
2196
+ "type": "timestamp with time zone",
2197
+ "primaryKey": false,
2198
+ "notNull": true
2199
+ },
2200
+ "updated_at": {
2201
+ "name": "updated_at",
2202
+ "type": "timestamp with time zone",
2203
+ "primaryKey": false,
2204
+ "notNull": true
2205
+ },
2206
+ "user_id": {
2207
+ "name": "user_id",
2208
+ "type": "text",
2209
+ "primaryKey": false,
2210
+ "notNull": false
2211
+ },
2212
+ "email_normalized": {
2213
+ "name": "email_normalized",
2214
+ "type": "text",
2215
+ "primaryKey": false,
2216
+ "notNull": false
2217
+ },
2218
+ "email_verified": {
2219
+ "name": "email_verified",
2220
+ "type": "boolean",
2221
+ "primaryKey": false,
2222
+ "notNull": true,
2223
+ "default": false
2224
+ }
2225
+ },
2226
+ "indexes": {
2227
+ "junior_identities_provider_subject_uidx": {
2228
+ "name": "junior_identities_provider_subject_uidx",
2229
+ "columns": [
2230
+ {
2231
+ "expression": "provider",
2232
+ "isExpression": false,
2233
+ "asc": true,
2234
+ "nulls": "last"
2235
+ },
2236
+ {
2237
+ "expression": "provider_tenant_id",
2238
+ "isExpression": false,
2239
+ "asc": true,
2240
+ "nulls": "last"
2241
+ },
2242
+ {
2243
+ "expression": "provider_subject_id",
2244
+ "isExpression": false,
2245
+ "asc": true,
2246
+ "nulls": "last"
2247
+ }
2248
+ ],
2249
+ "isUnique": true,
2250
+ "concurrently": false,
2251
+ "method": "btree",
2252
+ "with": {}
2253
+ },
2254
+ "junior_identities_user_idx": {
2255
+ "name": "junior_identities_user_idx",
2256
+ "columns": [
2257
+ {
2258
+ "expression": "user_id",
2259
+ "isExpression": false,
2260
+ "asc": true,
2261
+ "nulls": "last"
2262
+ }
2263
+ ],
2264
+ "isUnique": false,
2265
+ "concurrently": false,
2266
+ "method": "btree",
2267
+ "with": {}
2268
+ },
2269
+ "junior_identities_verified_email_idx": {
2270
+ "name": "junior_identities_verified_email_idx",
2271
+ "columns": [
2272
+ {
2273
+ "expression": "email_normalized",
2274
+ "isExpression": false,
2275
+ "asc": true,
2276
+ "nulls": "last"
2277
+ }
2278
+ ],
2279
+ "isUnique": false,
2280
+ "where": "\"junior_identities\".\"email_verified\" = true AND \"junior_identities\".\"email_normalized\" IS NOT NULL",
2281
+ "concurrently": false,
2282
+ "method": "btree",
2283
+ "with": {}
2284
+ },
2285
+ "junior_identities_kind_provider_idx": {
2286
+ "name": "junior_identities_kind_provider_idx",
2287
+ "columns": [
2288
+ {
2289
+ "expression": "kind",
2290
+ "isExpression": false,
2291
+ "asc": true,
2292
+ "nulls": "last"
2293
+ },
2294
+ {
2295
+ "expression": "provider",
2296
+ "isExpression": false,
2297
+ "asc": true,
2298
+ "nulls": "last"
2299
+ }
2300
+ ],
2301
+ "isUnique": false,
2302
+ "concurrently": false,
2303
+ "method": "btree",
2304
+ "with": {}
2305
+ }
2306
+ },
2307
+ "foreignKeys": {
2308
+ "junior_identities_user_id_junior_users_id_fk": {
2309
+ "name": "junior_identities_user_id_junior_users_id_fk",
2310
+ "tableFrom": "junior_identities",
2311
+ "tableTo": "junior_users",
2312
+ "columnsFrom": [
2313
+ "user_id"
2314
+ ],
2315
+ "columnsTo": [
2316
+ "id"
2317
+ ],
2318
+ "onDelete": "no action",
2319
+ "onUpdate": "no action"
2320
+ }
2321
+ },
2322
+ "compositePrimaryKeys": {},
2323
+ "uniqueConstraints": {},
2324
+ "policies": {},
2325
+ "checkConstraints": {},
2326
+ "isRLSEnabled": false
2327
+ },
2328
+ "public.junior_location_configurations": {
2329
+ "name": "junior_location_configurations",
2330
+ "schema": "",
2331
+ "columns": {
2332
+ "location_id": {
2333
+ "name": "location_id",
2334
+ "type": "text",
2335
+ "primaryKey": false,
2336
+ "notNull": true
2337
+ },
2338
+ "key": {
2339
+ "name": "key",
2340
+ "type": "text",
2341
+ "primaryKey": false,
2342
+ "notNull": true
2343
+ },
2344
+ "value": {
2345
+ "name": "value",
2346
+ "type": "text",
2347
+ "primaryKey": false,
2348
+ "notNull": true
2349
+ },
2350
+ "updated_at": {
2351
+ "name": "updated_at",
2352
+ "type": "timestamp with time zone",
2353
+ "primaryKey": false,
2354
+ "notNull": true
2355
+ },
2356
+ "updated_by": {
2357
+ "name": "updated_by",
2358
+ "type": "text",
2359
+ "primaryKey": false,
2360
+ "notNull": false
2361
+ },
2362
+ "source": {
2363
+ "name": "source",
2364
+ "type": "text",
2365
+ "primaryKey": false,
2366
+ "notNull": false
2367
+ },
2368
+ "expires_at": {
2369
+ "name": "expires_at",
2370
+ "type": "text",
2371
+ "primaryKey": false,
2372
+ "notNull": false
2373
+ }
2374
+ },
2375
+ "indexes": {},
2376
+ "foreignKeys": {
2377
+ "junior_location_configurations_location_id_junior_destinations_id_fk": {
2378
+ "name": "junior_location_configurations_location_id_junior_destinations_id_fk",
2379
+ "tableFrom": "junior_location_configurations",
2380
+ "tableTo": "junior_destinations",
2381
+ "columnsFrom": [
2382
+ "location_id"
2383
+ ],
2384
+ "columnsTo": [
2385
+ "id"
2386
+ ],
2387
+ "onDelete": "cascade",
2388
+ "onUpdate": "no action"
2389
+ }
2390
+ },
2391
+ "compositePrimaryKeys": {
2392
+ "junior_location_configurations_location_id_key_pk": {
2393
+ "name": "junior_location_configurations_location_id_key_pk",
2394
+ "columns": [
2395
+ "location_id",
2396
+ "key"
2397
+ ]
2398
+ }
2399
+ },
2400
+ "uniqueConstraints": {},
2401
+ "policies": {},
2402
+ "checkConstraints": {},
2403
+ "isRLSEnabled": false
2404
+ },
2405
+ "public.junior_scheduler_runs": {
2406
+ "name": "junior_scheduler_runs",
2407
+ "schema": "",
2408
+ "columns": {
2409
+ "id": {
2410
+ "name": "id",
2411
+ "type": "text",
2412
+ "primaryKey": true,
2413
+ "notNull": true
2414
+ },
2415
+ "task_id": {
2416
+ "name": "task_id",
2417
+ "type": "text",
2418
+ "primaryKey": false,
2419
+ "notNull": true
2420
+ },
2421
+ "status": {
2422
+ "name": "status",
2423
+ "type": "text",
2424
+ "primaryKey": false,
2425
+ "notNull": true
2426
+ },
2427
+ "scheduled_for_ms": {
2428
+ "name": "scheduled_for_ms",
2429
+ "type": "bigint",
2430
+ "primaryKey": false,
2431
+ "notNull": true
2432
+ },
2433
+ "record": {
2434
+ "name": "record",
2435
+ "type": "jsonb",
2436
+ "primaryKey": false,
2437
+ "notNull": true
2438
+ }
2439
+ },
2440
+ "indexes": {
2441
+ "junior_scheduler_runs_task_status_idx": {
2442
+ "name": "junior_scheduler_runs_task_status_idx",
2443
+ "columns": [
2444
+ {
2445
+ "expression": "task_id",
2446
+ "isExpression": false,
2447
+ "asc": true,
2448
+ "nulls": "last"
2449
+ },
2450
+ {
2451
+ "expression": "status",
2452
+ "isExpression": false,
2453
+ "asc": true,
2454
+ "nulls": "last"
2455
+ },
2456
+ {
2457
+ "expression": "scheduled_for_ms",
2458
+ "isExpression": false,
2459
+ "asc": true,
2460
+ "nulls": "last"
2461
+ }
2462
+ ],
2463
+ "isUnique": false,
2464
+ "concurrently": false,
2465
+ "method": "btree",
2466
+ "with": {}
2467
+ },
2468
+ "junior_scheduler_runs_status_idx": {
2469
+ "name": "junior_scheduler_runs_status_idx",
2470
+ "columns": [
2471
+ {
2472
+ "expression": "status",
2473
+ "isExpression": false,
2474
+ "asc": true,
2475
+ "nulls": "last"
2476
+ },
2477
+ {
2478
+ "expression": "scheduled_for_ms",
2479
+ "isExpression": false,
2480
+ "asc": true,
2481
+ "nulls": "last"
2482
+ }
2483
+ ],
2484
+ "isUnique": false,
2485
+ "concurrently": false,
2486
+ "method": "btree",
2487
+ "with": {}
2488
+ }
2489
+ },
2490
+ "foreignKeys": {},
2491
+ "compositePrimaryKeys": {},
2492
+ "uniqueConstraints": {},
2493
+ "policies": {},
2494
+ "checkConstraints": {},
2495
+ "isRLSEnabled": false
2496
+ },
2497
+ "public.junior_scheduler_tasks": {
2498
+ "name": "junior_scheduler_tasks",
2499
+ "schema": "",
2500
+ "columns": {
2501
+ "id": {
2502
+ "name": "id",
2503
+ "type": "text",
2504
+ "primaryKey": true,
2505
+ "notNull": true
2506
+ },
2507
+ "team_id": {
2508
+ "name": "team_id",
2509
+ "type": "text",
2510
+ "primaryKey": false,
2511
+ "notNull": true
2512
+ },
2513
+ "creator_slack_user_id": {
2514
+ "name": "creator_slack_user_id",
2515
+ "type": "text",
2516
+ "primaryKey": false,
2517
+ "notNull": false
2518
+ },
2519
+ "creator_identity_id": {
2520
+ "name": "creator_identity_id",
2521
+ "type": "text",
2522
+ "primaryKey": false,
2523
+ "notNull": false
2524
+ },
2525
+ "status": {
2526
+ "name": "status",
2527
+ "type": "text",
2528
+ "primaryKey": false,
2529
+ "notNull": true
2530
+ },
2531
+ "next_run_at_ms": {
2532
+ "name": "next_run_at_ms",
2533
+ "type": "bigint",
2534
+ "primaryKey": false,
2535
+ "notNull": false
2536
+ },
2537
+ "run_now_at_ms": {
2538
+ "name": "run_now_at_ms",
2539
+ "type": "bigint",
2540
+ "primaryKey": false,
2541
+ "notNull": false
2542
+ },
2543
+ "created_at_ms": {
2544
+ "name": "created_at_ms",
2545
+ "type": "bigint",
2546
+ "primaryKey": false,
2547
+ "notNull": true
2548
+ },
2549
+ "title": {
2550
+ "name": "title",
2551
+ "type": "text",
2552
+ "primaryKey": false,
2553
+ "notNull": false
2554
+ },
2555
+ "record": {
2556
+ "name": "record",
2557
+ "type": "jsonb",
2558
+ "primaryKey": false,
2559
+ "notNull": true
2560
+ }
2561
+ },
2562
+ "indexes": {
2563
+ "junior_scheduler_tasks_creator_idx": {
2564
+ "name": "junior_scheduler_tasks_creator_idx",
2565
+ "columns": [
2566
+ {
2567
+ "expression": "team_id",
2568
+ "isExpression": false,
2569
+ "asc": true,
2570
+ "nulls": "last"
2571
+ },
2572
+ {
2573
+ "expression": "creator_slack_user_id",
2574
+ "isExpression": false,
2575
+ "asc": true,
2576
+ "nulls": "last"
2577
+ },
2578
+ {
2579
+ "expression": "created_at_ms",
2580
+ "isExpression": false,
2581
+ "asc": true,
2582
+ "nulls": "last"
2583
+ },
2584
+ {
2585
+ "expression": "id",
2586
+ "isExpression": false,
2587
+ "asc": true,
2588
+ "nulls": "last"
2589
+ }
2590
+ ],
2591
+ "isUnique": false,
2592
+ "where": "\"junior_scheduler_tasks\".\"status\" <> 'deleted'",
2593
+ "concurrently": false,
2594
+ "method": "btree",
2595
+ "with": {}
2596
+ },
2597
+ "junior_scheduler_tasks_creator_identity_idx": {
2598
+ "name": "junior_scheduler_tasks_creator_identity_idx",
2599
+ "columns": [
2600
+ {
2601
+ "expression": "creator_identity_id",
2602
+ "isExpression": false,
2603
+ "asc": true,
2604
+ "nulls": "last"
2605
+ },
2606
+ {
2607
+ "expression": "created_at_ms",
2608
+ "isExpression": false,
2609
+ "asc": true,
2610
+ "nulls": "last"
2611
+ },
2612
+ {
2613
+ "expression": "id",
2614
+ "isExpression": false,
2615
+ "asc": true,
2616
+ "nulls": "last"
2617
+ }
2618
+ ],
2619
+ "isUnique": false,
2620
+ "where": "\"junior_scheduler_tasks\".\"status\" <> 'deleted' AND \"junior_scheduler_tasks\".\"creator_identity_id\" IS NOT NULL",
2621
+ "concurrently": false,
2622
+ "method": "btree",
2623
+ "with": {}
2624
+ },
2625
+ "junior_scheduler_tasks_team_status_idx": {
2626
+ "name": "junior_scheduler_tasks_team_status_idx",
2627
+ "columns": [
2628
+ {
2629
+ "expression": "team_id",
2630
+ "isExpression": false,
2631
+ "asc": true,
2632
+ "nulls": "last"
2633
+ },
2634
+ {
2635
+ "expression": "created_at_ms",
2636
+ "isExpression": false,
2637
+ "asc": true,
2638
+ "nulls": "last"
2639
+ },
2640
+ {
2641
+ "expression": "id",
2642
+ "isExpression": false,
2643
+ "asc": true,
2644
+ "nulls": "last"
2645
+ }
2646
+ ],
2647
+ "isUnique": false,
2648
+ "where": "\"junior_scheduler_tasks\".\"status\" <> 'deleted'",
2649
+ "concurrently": false,
2650
+ "method": "btree",
2651
+ "with": {}
2652
+ },
2653
+ "junior_scheduler_tasks_run_now_due_idx": {
2654
+ "name": "junior_scheduler_tasks_run_now_due_idx",
2655
+ "columns": [
2656
+ {
2657
+ "expression": "run_now_at_ms",
2658
+ "isExpression": false,
2659
+ "asc": true,
2660
+ "nulls": "last"
2661
+ },
2662
+ {
2663
+ "expression": "created_at_ms",
2664
+ "isExpression": false,
2665
+ "asc": true,
2666
+ "nulls": "last"
2667
+ },
2668
+ {
2669
+ "expression": "id",
2670
+ "isExpression": false,
2671
+ "asc": true,
2672
+ "nulls": "last"
2673
+ }
2674
+ ],
2675
+ "isUnique": false,
2676
+ "where": "\"junior_scheduler_tasks\".\"status\" = 'active' AND \"junior_scheduler_tasks\".\"run_now_at_ms\" IS NOT NULL",
2677
+ "concurrently": false,
2678
+ "method": "btree",
2679
+ "with": {}
2680
+ },
2681
+ "junior_scheduler_tasks_next_run_due_idx": {
2682
+ "name": "junior_scheduler_tasks_next_run_due_idx",
2683
+ "columns": [
2684
+ {
2685
+ "expression": "next_run_at_ms",
2686
+ "isExpression": false,
2687
+ "asc": true,
2688
+ "nulls": "last"
2689
+ },
2690
+ {
2691
+ "expression": "created_at_ms",
2692
+ "isExpression": false,
2693
+ "asc": true,
2694
+ "nulls": "last"
2695
+ },
2696
+ {
2697
+ "expression": "id",
2698
+ "isExpression": false,
2699
+ "asc": true,
2700
+ "nulls": "last"
2701
+ }
2702
+ ],
2703
+ "isUnique": false,
2704
+ "where": "\"junior_scheduler_tasks\".\"status\" = 'active' AND \"junior_scheduler_tasks\".\"next_run_at_ms\" IS NOT NULL",
2705
+ "concurrently": false,
2706
+ "method": "btree",
2707
+ "with": {}
2708
+ }
2709
+ },
2710
+ "foreignKeys": {},
2711
+ "compositePrimaryKeys": {},
2712
+ "uniqueConstraints": {},
2713
+ "policies": {},
2714
+ "checkConstraints": {},
2715
+ "isRLSEnabled": false
2716
+ },
2717
+ "public.junior_snapshots": {
2718
+ "name": "junior_snapshots",
2719
+ "schema": "",
2720
+ "columns": {
2721
+ "id": {
2722
+ "name": "id",
2723
+ "type": "text",
2724
+ "primaryKey": true,
2725
+ "notNull": true
2726
+ },
2727
+ "workspace_id": {
2728
+ "name": "workspace_id",
2729
+ "type": "text",
2730
+ "primaryKey": false,
2731
+ "notNull": true
2732
+ },
2733
+ "profile_hash": {
2734
+ "name": "profile_hash",
2735
+ "type": "text",
2736
+ "primaryKey": false,
2737
+ "notNull": true
2738
+ },
2739
+ "status": {
2740
+ "name": "status",
2741
+ "type": "text",
2742
+ "primaryKey": false,
2743
+ "notNull": true
2744
+ },
2745
+ "snapshot_id": {
2746
+ "name": "snapshot_id",
2747
+ "type": "text",
2748
+ "primaryKey": false,
2749
+ "notNull": false
2750
+ },
2751
+ "build_duration_ms": {
2752
+ "name": "build_duration_ms",
2753
+ "type": "integer",
2754
+ "primaryKey": false,
2755
+ "notNull": false
2756
+ },
2757
+ "size_bytes": {
2758
+ "name": "size_bytes",
2759
+ "type": "bigint",
2760
+ "primaryKey": false,
2761
+ "notNull": false
2762
+ },
2763
+ "generated_at": {
2764
+ "name": "generated_at",
2765
+ "type": "timestamp with time zone",
2766
+ "primaryKey": false,
2767
+ "notNull": false
2768
+ },
2769
+ "build_started_at": {
2770
+ "name": "build_started_at",
2771
+ "type": "timestamp with time zone",
2772
+ "primaryKey": false,
2773
+ "notNull": false
2774
+ },
2775
+ "build_phase": {
2776
+ "name": "build_phase",
2777
+ "type": "text",
2778
+ "primaryKey": false,
2779
+ "notNull": false
2780
+ },
2781
+ "build_sandbox_name": {
2782
+ "name": "build_sandbox_name",
2783
+ "type": "text",
2784
+ "primaryKey": false,
2785
+ "notNull": false
2786
+ },
2787
+ "build_command_id": {
2788
+ "name": "build_command_id",
2789
+ "type": "text",
2790
+ "primaryKey": false,
2791
+ "notNull": false
2792
+ },
2793
+ "build_error": {
2794
+ "name": "build_error",
2795
+ "type": "text",
2796
+ "primaryKey": false,
2797
+ "notNull": false
2798
+ },
2799
+ "created_at": {
2800
+ "name": "created_at",
2801
+ "type": "timestamp with time zone",
2802
+ "primaryKey": false,
2803
+ "notNull": true
2804
+ },
2805
+ "updated_at": {
2806
+ "name": "updated_at",
2807
+ "type": "timestamp with time zone",
2808
+ "primaryKey": false,
2809
+ "notNull": true
2810
+ }
2811
+ },
2812
+ "indexes": {
2813
+ "junior_snapshots_snapshot_id_uidx": {
2814
+ "name": "junior_snapshots_snapshot_id_uidx",
2815
+ "columns": [
2816
+ {
2817
+ "expression": "snapshot_id",
2818
+ "isExpression": false,
2819
+ "asc": true,
2820
+ "nulls": "last"
2821
+ }
2822
+ ],
2823
+ "isUnique": true,
2824
+ "concurrently": false,
2825
+ "method": "btree",
2826
+ "with": {}
2827
+ },
2828
+ "junior_snapshots_workspace_idx": {
2829
+ "name": "junior_snapshots_workspace_idx",
2830
+ "columns": [
2831
+ {
2832
+ "expression": "workspace_id",
2833
+ "isExpression": false,
2834
+ "asc": true,
2835
+ "nulls": "last"
2836
+ }
2837
+ ],
2838
+ "isUnique": false,
2839
+ "concurrently": false,
2840
+ "method": "btree",
2841
+ "with": {}
2842
+ },
2843
+ "junior_snapshots_workspace_profile_status_idx": {
2844
+ "name": "junior_snapshots_workspace_profile_status_idx",
2845
+ "columns": [
2846
+ {
2847
+ "expression": "workspace_id",
2848
+ "isExpression": false,
2849
+ "asc": true,
2850
+ "nulls": "last"
2851
+ },
2852
+ {
2853
+ "expression": "profile_hash",
2854
+ "isExpression": false,
2855
+ "asc": true,
2856
+ "nulls": "last"
2857
+ },
2858
+ {
2859
+ "expression": "status",
2860
+ "isExpression": false,
2861
+ "asc": true,
2862
+ "nulls": "last"
2863
+ }
2864
+ ],
2865
+ "isUnique": false,
2866
+ "concurrently": false,
2867
+ "method": "btree",
2868
+ "with": {}
2869
+ },
2870
+ "junior_snapshots_active_build_uidx": {
2871
+ "name": "junior_snapshots_active_build_uidx",
2872
+ "columns": [
2873
+ {
2874
+ "expression": "workspace_id",
2875
+ "isExpression": false,
2876
+ "asc": true,
2877
+ "nulls": "last"
2878
+ },
2879
+ {
2880
+ "expression": "profile_hash",
2881
+ "isExpression": false,
2882
+ "asc": true,
2883
+ "nulls": "last"
2884
+ }
2885
+ ],
2886
+ "isUnique": true,
2887
+ "where": "\"junior_snapshots\".\"status\" = 'building'",
2888
+ "concurrently": false,
2889
+ "method": "btree",
2890
+ "with": {}
2891
+ },
2892
+ "junior_snapshots_workspace_status_idx": {
2893
+ "name": "junior_snapshots_workspace_status_idx",
2894
+ "columns": [
2895
+ {
2896
+ "expression": "workspace_id",
2897
+ "isExpression": false,
2898
+ "asc": true,
2899
+ "nulls": "last"
2900
+ },
2901
+ {
2902
+ "expression": "status",
2903
+ "isExpression": false,
2904
+ "asc": true,
2905
+ "nulls": "last"
2906
+ }
2907
+ ],
2908
+ "isUnique": false,
2909
+ "concurrently": false,
2910
+ "method": "btree",
2911
+ "with": {}
2912
+ }
2913
+ },
2914
+ "foreignKeys": {
2915
+ "junior_snapshots_workspace_id_junior_workspaces_id_fk": {
2916
+ "name": "junior_snapshots_workspace_id_junior_workspaces_id_fk",
2917
+ "tableFrom": "junior_snapshots",
2918
+ "tableTo": "junior_workspaces",
2919
+ "columnsFrom": [
2920
+ "workspace_id"
2921
+ ],
2922
+ "columnsTo": [
2923
+ "id"
2924
+ ],
2925
+ "onDelete": "cascade",
2926
+ "onUpdate": "no action"
2927
+ }
2928
+ },
2929
+ "compositePrimaryKeys": {},
2930
+ "uniqueConstraints": {},
2931
+ "policies": {},
2932
+ "checkConstraints": {
2933
+ "junior_snapshots_status_check": {
2934
+ "name": "junior_snapshots_status_check",
2935
+ "value": "\"junior_snapshots\".\"status\" in ('building', 'failed', 'ready')"
2936
+ },
2937
+ "junior_snapshots_build_phase_check": {
2938
+ "name": "junior_snapshots_build_phase_check",
2939
+ "value": "\"junior_snapshots\".\"build_phase\" is null or \"junior_snapshots\".\"build_phase\" in ('created', 'dependencies_installed', 'repositories_prepared')"
2940
+ },
2941
+ "junior_snapshots_ready_fields_check": {
2942
+ "name": "junior_snapshots_ready_fields_check",
2943
+ "value": "\"junior_snapshots\".\"status\" <> 'ready' or (\"junior_snapshots\".\"snapshot_id\" is not null and \"junior_snapshots\".\"build_duration_ms\" is not null and \"junior_snapshots\".\"generated_at\" is not null)"
2944
+ },
2945
+ "junior_snapshots_build_fields_check": {
2946
+ "name": "junior_snapshots_build_fields_check",
2947
+ "value": "\"junior_snapshots\".\"status\" = 'ready' or (\"junior_snapshots\".\"build_started_at\" is not null and \"junior_snapshots\".\"build_phase\" is not null)"
2948
+ },
2949
+ "junior_snapshots_build_duration_check": {
2950
+ "name": "junior_snapshots_build_duration_check",
2951
+ "value": "\"junior_snapshots\".\"build_duration_ms\" is null or \"junior_snapshots\".\"build_duration_ms\" >= 0"
2952
+ },
2953
+ "junior_snapshots_size_bytes_check": {
2954
+ "name": "junior_snapshots_size_bytes_check",
2955
+ "value": "\"junior_snapshots\".\"size_bytes\" is null or \"junior_snapshots\".\"size_bytes\" >= 0"
2956
+ }
2957
+ },
2958
+ "isRLSEnabled": false
2959
+ },
2960
+ "public.junior_stats": {
2961
+ "name": "junior_stats",
2962
+ "schema": "",
2963
+ "columns": {
2964
+ "date": {
2965
+ "name": "date",
2966
+ "type": "date",
2967
+ "primaryKey": false,
2968
+ "notNull": true
2969
+ },
2970
+ "namespace": {
2971
+ "name": "namespace",
2972
+ "type": "text",
2973
+ "primaryKey": false,
2974
+ "notNull": true
2975
+ },
2976
+ "metric": {
2977
+ "name": "metric",
2978
+ "type": "text",
2979
+ "primaryKey": false,
2980
+ "notNull": true
2981
+ },
2982
+ "name": {
2983
+ "name": "name",
2984
+ "type": "text",
2985
+ "primaryKey": false,
2986
+ "notNull": true
2987
+ },
2988
+ "count": {
2989
+ "name": "count",
2990
+ "type": "integer",
2991
+ "primaryKey": false,
2992
+ "notNull": true,
2993
+ "default": 0
2994
+ }
2995
+ },
2996
+ "indexes": {},
2997
+ "foreignKeys": {},
2998
+ "compositePrimaryKeys": {
2999
+ "junior_stats_date_namespace_metric_name_pk": {
3000
+ "name": "junior_stats_date_namespace_metric_name_pk",
3001
+ "columns": [
3002
+ "date",
3003
+ "namespace",
3004
+ "metric",
3005
+ "name"
3006
+ ]
3007
+ }
3008
+ },
3009
+ "uniqueConstraints": {},
3010
+ "policies": {},
3011
+ "checkConstraints": {},
3012
+ "isRLSEnabled": false
3013
+ },
3014
+ "public.junior_task_executions": {
3015
+ "name": "junior_task_executions",
3016
+ "schema": "",
3017
+ "columns": {
3018
+ "execution_id": {
3019
+ "name": "execution_id",
3020
+ "type": "text",
3021
+ "primaryKey": false,
3022
+ "notNull": true
3023
+ },
3024
+ "kind": {
3025
+ "name": "kind",
3026
+ "type": "text",
3027
+ "primaryKey": false,
3028
+ "notNull": true
3029
+ },
3030
+ "namespace": {
3031
+ "name": "namespace",
3032
+ "type": "text",
3033
+ "primaryKey": false,
3034
+ "notNull": true
3035
+ },
3036
+ "task_id": {
3037
+ "name": "task_id",
3038
+ "type": "text",
3039
+ "primaryKey": false,
3040
+ "notNull": true
3041
+ },
3042
+ "conversation_id": {
3043
+ "name": "conversation_id",
3044
+ "type": "text",
3045
+ "primaryKey": false,
3046
+ "notNull": false
3047
+ },
3048
+ "executed_at_ms": {
3049
+ "name": "executed_at_ms",
3050
+ "type": "bigint",
3051
+ "primaryKey": false,
3052
+ "notNull": true
3053
+ },
3054
+ "status": {
3055
+ "name": "status",
3056
+ "type": "text",
3057
+ "primaryKey": false,
3058
+ "notNull": true
3059
+ }
3060
+ },
3061
+ "indexes": {
3062
+ "junior_task_executions_task_time_idx": {
3063
+ "name": "junior_task_executions_task_time_idx",
3064
+ "columns": [
3065
+ {
3066
+ "expression": "kind",
3067
+ "isExpression": false,
3068
+ "asc": true,
3069
+ "nulls": "last"
3070
+ },
3071
+ {
3072
+ "expression": "namespace",
3073
+ "isExpression": false,
3074
+ "asc": true,
3075
+ "nulls": "last"
3076
+ },
3077
+ {
3078
+ "expression": "task_id",
3079
+ "isExpression": false,
3080
+ "asc": true,
3081
+ "nulls": "last"
3082
+ },
3083
+ {
3084
+ "expression": "executed_at_ms",
3085
+ "isExpression": false,
3086
+ "asc": true,
3087
+ "nulls": "last"
3088
+ }
3089
+ ],
3090
+ "isUnique": false,
3091
+ "concurrently": false,
3092
+ "method": "btree",
3093
+ "with": {}
3094
+ },
3095
+ "junior_task_executions_time_kind_idx": {
3096
+ "name": "junior_task_executions_time_kind_idx",
3097
+ "columns": [
3098
+ {
3099
+ "expression": "executed_at_ms",
3100
+ "isExpression": false,
3101
+ "asc": true,
3102
+ "nulls": "last"
3103
+ },
3104
+ {
3105
+ "expression": "kind",
3106
+ "isExpression": false,
3107
+ "asc": true,
3108
+ "nulls": "last"
3109
+ }
3110
+ ],
3111
+ "isUnique": false,
3112
+ "concurrently": false,
3113
+ "method": "btree",
3114
+ "with": {}
3115
+ },
3116
+ "junior_task_executions_conversation_time_idx": {
3117
+ "name": "junior_task_executions_conversation_time_idx",
3118
+ "columns": [
3119
+ {
3120
+ "expression": "conversation_id",
3121
+ "isExpression": false,
3122
+ "asc": true,
3123
+ "nulls": "last"
3124
+ },
3125
+ {
3126
+ "expression": "executed_at_ms",
3127
+ "isExpression": false,
3128
+ "asc": true,
3129
+ "nulls": "last"
3130
+ }
3131
+ ],
3132
+ "isUnique": false,
3133
+ "concurrently": false,
3134
+ "method": "btree",
3135
+ "with": {}
3136
+ }
3137
+ },
3138
+ "foreignKeys": {
3139
+ "junior_task_executions_conversation_id_junior_conversations_conversation_id_fk": {
3140
+ "name": "junior_task_executions_conversation_id_junior_conversations_conversation_id_fk",
3141
+ "tableFrom": "junior_task_executions",
3142
+ "tableTo": "junior_conversations",
3143
+ "columnsFrom": [
3144
+ "conversation_id"
3145
+ ],
3146
+ "columnsTo": [
3147
+ "conversation_id"
3148
+ ],
3149
+ "onDelete": "no action",
3150
+ "onUpdate": "no action"
3151
+ }
3152
+ },
3153
+ "compositePrimaryKeys": {
3154
+ "junior_task_executions_kind_namespace_execution_id_pk": {
3155
+ "name": "junior_task_executions_kind_namespace_execution_id_pk",
3156
+ "columns": [
3157
+ "kind",
3158
+ "namespace",
3159
+ "execution_id"
3160
+ ]
3161
+ }
3162
+ },
3163
+ "uniqueConstraints": {},
3164
+ "policies": {},
3165
+ "checkConstraints": {
3166
+ "junior_task_executions_kind_check": {
3167
+ "name": "junior_task_executions_kind_check",
3168
+ "value": "\"junior_task_executions\".\"kind\" in ('scheduled', 'event')"
3169
+ },
3170
+ "junior_task_executions_status_check": {
3171
+ "name": "junior_task_executions_status_check",
3172
+ "value": "\"junior_task_executions\".\"status\" in ('blocked', 'completed', 'failed')"
3173
+ }
3174
+ },
3175
+ "isRLSEnabled": false
3176
+ },
3177
+ "public.junior_users": {
3178
+ "name": "junior_users",
3179
+ "schema": "",
3180
+ "columns": {
3181
+ "id": {
3182
+ "name": "id",
3183
+ "type": "text",
3184
+ "primaryKey": true,
3185
+ "notNull": true
3186
+ },
3187
+ "primary_email": {
3188
+ "name": "primary_email",
3189
+ "type": "text",
3190
+ "primaryKey": false,
3191
+ "notNull": true
3192
+ },
3193
+ "primary_email_normalized": {
3194
+ "name": "primary_email_normalized",
3195
+ "type": "text",
3196
+ "primaryKey": false,
3197
+ "notNull": true
3198
+ },
3199
+ "display_name": {
3200
+ "name": "display_name",
3201
+ "type": "text",
3202
+ "primaryKey": false,
3203
+ "notNull": false
3204
+ },
3205
+ "created_at": {
3206
+ "name": "created_at",
3207
+ "type": "timestamp with time zone",
3208
+ "primaryKey": false,
3209
+ "notNull": true
3210
+ },
3211
+ "updated_at": {
3212
+ "name": "updated_at",
3213
+ "type": "timestamp with time zone",
3214
+ "primaryKey": false,
3215
+ "notNull": true
3216
+ }
3217
+ },
3218
+ "indexes": {
3219
+ "junior_users_primary_email_normalized_uidx": {
3220
+ "name": "junior_users_primary_email_normalized_uidx",
3221
+ "columns": [
3222
+ {
3223
+ "expression": "primary_email_normalized",
3224
+ "isExpression": false,
3225
+ "asc": true,
3226
+ "nulls": "last"
3227
+ }
3228
+ ],
3229
+ "isUnique": true,
3230
+ "concurrently": false,
3231
+ "method": "btree",
3232
+ "with": {}
3233
+ }
3234
+ },
3235
+ "foreignKeys": {},
3236
+ "compositePrimaryKeys": {},
3237
+ "uniqueConstraints": {},
3238
+ "policies": {},
3239
+ "checkConstraints": {},
3240
+ "isRLSEnabled": false
3241
+ },
3242
+ "public.junior_workspace_repos": {
3243
+ "name": "junior_workspace_repos",
3244
+ "schema": "",
3245
+ "columns": {
3246
+ "workspace_id": {
3247
+ "name": "workspace_id",
3248
+ "type": "text",
3249
+ "primaryKey": false,
3250
+ "notNull": true
3251
+ },
3252
+ "provider": {
3253
+ "name": "provider",
3254
+ "type": "text",
3255
+ "primaryKey": false,
3256
+ "notNull": true
3257
+ },
3258
+ "repo": {
3259
+ "name": "repo",
3260
+ "type": "text",
3261
+ "primaryKey": false,
3262
+ "notNull": true
3263
+ }
3264
+ },
3265
+ "indexes": {},
3266
+ "foreignKeys": {
3267
+ "junior_workspace_repos_workspace_id_junior_workspaces_id_fk": {
3268
+ "name": "junior_workspace_repos_workspace_id_junior_workspaces_id_fk",
3269
+ "tableFrom": "junior_workspace_repos",
3270
+ "tableTo": "junior_workspaces",
3271
+ "columnsFrom": [
3272
+ "workspace_id"
3273
+ ],
3274
+ "columnsTo": [
3275
+ "id"
3276
+ ],
3277
+ "onDelete": "cascade",
3278
+ "onUpdate": "no action"
3279
+ }
3280
+ },
3281
+ "compositePrimaryKeys": {
3282
+ "junior_workspace_repos_workspace_id_provider_repo_pk": {
3283
+ "name": "junior_workspace_repos_workspace_id_provider_repo_pk",
3284
+ "columns": [
3285
+ "workspace_id",
3286
+ "provider",
3287
+ "repo"
3288
+ ]
3289
+ }
3290
+ },
3291
+ "uniqueConstraints": {},
3292
+ "policies": {},
3293
+ "checkConstraints": {},
3294
+ "isRLSEnabled": false
3295
+ },
3296
+ "public.junior_workspaces": {
3297
+ "name": "junior_workspaces",
3298
+ "schema": "",
3299
+ "columns": {
3300
+ "id": {
3301
+ "name": "id",
3302
+ "type": "text",
3303
+ "primaryKey": true,
3304
+ "notNull": true
3305
+ },
3306
+ "name": {
3307
+ "name": "name",
3308
+ "type": "text",
3309
+ "primaryKey": false,
3310
+ "notNull": true
3311
+ },
3312
+ "setup_script": {
3313
+ "name": "setup_script",
3314
+ "type": "text",
3315
+ "primaryKey": false,
3316
+ "notNull": true,
3317
+ "default": "''"
3318
+ },
3319
+ "created_at": {
3320
+ "name": "created_at",
3321
+ "type": "timestamp with time zone",
3322
+ "primaryKey": false,
3323
+ "notNull": true
3324
+ },
3325
+ "updated_at": {
3326
+ "name": "updated_at",
3327
+ "type": "timestamp with time zone",
3328
+ "primaryKey": false,
3329
+ "notNull": true
3330
+ }
3331
+ },
3332
+ "indexes": {
3333
+ "junior_workspaces_name_idx": {
3334
+ "name": "junior_workspaces_name_idx",
3335
+ "columns": [
3336
+ {
3337
+ "expression": "name",
3338
+ "isExpression": false,
3339
+ "asc": true,
3340
+ "nulls": "last"
3341
+ }
3342
+ ],
3343
+ "isUnique": true,
3344
+ "concurrently": false,
3345
+ "method": "btree",
3346
+ "with": {}
3347
+ }
3348
+ },
3349
+ "foreignKeys": {},
3350
+ "compositePrimaryKeys": {},
3351
+ "uniqueConstraints": {},
3352
+ "policies": {},
3353
+ "checkConstraints": {},
3354
+ "isRLSEnabled": false
3355
+ }
3356
+ },
3357
+ "enums": {},
3358
+ "schemas": {},
3359
+ "sequences": {},
3360
+ "roles": {},
3361
+ "policies": {},
3362
+ "views": {},
3363
+ "_meta": {
3364
+ "columns": {},
3365
+ "schemas": {},
3366
+ "tables": {}
3367
+ }
3368
+ }