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