@sentry/junior 0.221.1 → 0.223.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/dist/{agent-CY49A4pN.js → agent-Bzbf92vv.js} +97 -42
  2. package/dist/{agent-hooks-BnZBgDPe.js → agent-hooks-DZU5nsd1.js} +60 -15
  3. package/dist/{agent-runner-BC8iSAfE.js → agent-runner-2VQ9WhkG.js} +6 -5
  4. package/dist/api/schema.d.ts +209 -11
  5. package/dist/api/schema.js +4 -4
  6. package/dist/api.js +18 -515
  7. package/dist/{app-BYD2Nyji.d.ts → app-BbSD6EtD.d.ts} +1 -1
  8. package/dist/app.d.ts +1 -1
  9. package/dist/app.js +241 -39
  10. package/dist/{auth-pause-state-CJwPs1cT.js → auth-pause-state-Bn2vX4PA.js} +41 -7
  11. package/dist/{briefs-BSOhy23c.js → briefs-BJPfCrlT.js} +6 -6
  12. package/dist/{catalog-runtime-0oMD2jas.js → catalog-runtime-BthunUDD.js} +1 -1
  13. package/dist/{checkpoint-Bl47qAIY.js → checkpoint-Deu-OVb3.js} +11 -7
  14. package/dist/cli/chat.js +13 -13
  15. package/dist/cli/check.js +3 -3
  16. package/dist/cli/main.js +1 -1
  17. package/dist/cli/plugins.js +3 -3
  18. package/dist/cli/snapshot-create.js +3 -3
  19. package/dist/cli/upgrade.js +3 -3
  20. package/dist/{client-BrThxuRI.js → client-DjC6-6iU.js} +56 -6
  21. package/dist/{config-CEuC6CFj.js → config-CtoUVs72.js} +6 -7
  22. package/dist/{conversation-BSRGzJmY.js → conversation-1HUoZr2l.js} +75 -4
  23. package/dist/{conversation-privacy-aHn1OwXL.js → conversation-privacy-xS1t92xa.js} +1 -1
  24. package/dist/{credential-sync-Dht95TJQ.js → credential-sync-CKdXEUDO.js} +180 -31
  25. package/dist/{execution-stats-D9m2kmmg.js → execution-stats-CrXs9vSH.js} +3 -3
  26. package/dist/{executor-3IasVOqK.js → executor-AOhG9X1t.js} +1 -1
  27. package/dist/history-yaSjGMD_.d.ts +65 -0
  28. package/dist/instrumentation.js +2 -2
  29. package/dist/{job-queue-36liupTq.js → job-queue-CNd9cpIy.js} +1 -1
  30. package/dist/{logging-gR24QCo_.js → logging-DiN3o3nB.js} +1 -1
  31. package/dist/nitro.d.ts +1 -1
  32. package/dist/nitro.js +3 -3
  33. package/dist/{oauth-callback-server-BvNIWVA3.js → oauth-callback-server-Ca0VLUEw.js} +2 -2
  34. package/dist/{pending-auth-Cl4BsopG.js → pending-auth-D7vmttn_.js} +2 -2
  35. package/dist/{profile-VmUpQuOm.js → profile-BsNrw8lj.js} +4 -4
  36. package/dist/{prompt-BkaHwBW0.js → prompt-90miy8VV.js} +1 -1
  37. package/dist/{registry-BATk1X_v.js → registry-Dankt-Pl.js} +1 -1
  38. package/dist/reporting-window-DbUqng0P.js +229 -0
  39. package/dist/{resolve-Cf79l1H8.js → resolve-B38CpJe2.js} +2 -2
  40. package/dist/{runner-DNN4EPj_.js → runner-Ck5rEjCm.js} +21 -10
  41. package/dist/{sandbox-egress-signals-C-HUJW1G.js → sandbox-egress-signals-BOfFkvly.js} +1 -1
  42. package/dist/{schema-YPJXVcOW.js → schema-RpbW5Od2.js} +5 -128
  43. package/dist/{short-title-Cy3D8vg1.js → short-title-BHd_jUFX.js} +2 -2
  44. package/dist/{skills-DMQkR1Yu.js → skills-DbP4TDft.js} +2 -2
  45. package/dist/{spawn-BHk7RpYw.js → spawn-DzXc_PKO.js} +2 -2
  46. package/dist/{stats-8Bzht8zO.js → stats-pNGp3G5q.js} +56 -15
  47. package/dist/{task-queue-Cm4FhC0n.js → task-queue-Cy9y1foT.js} +3 -3
  48. package/dist/{task-runner-dQwOhCYs.js → task-runner-DI1FBJFJ.js} +8 -8
  49. package/dist/{thread-state-D0Ktlch_.js → thread-state-DXgxOYpZ.js} +5 -5
  50. package/dist/{turn-execution-BfLZfabf.js → turn-execution-BNOXrZ-M.js} +3 -3
  51. package/dist/{turn-lifecycle-D75pWL8e.js → turn-lifecycle-Bjf6y2GO.js} +1 -1
  52. package/dist/{validation-D5fdtuzG.js → validation-D5CIslEu.js} +1 -1
  53. package/dist/{version-DErORHQC.js → version-_ZQFlslB.js} +1 -1
  54. package/dist/version.js +1 -1
  55. package/dist/{web-authorization-IHMPbDay.js → web-authorization-6mmfS_o-.js} +1 -1
  56. package/dist/web-input-BJpWm6go.js +899 -0
  57. package/dist/{work-CaaSjlNk.js → work-DvIlJR3C.js} +9 -9
  58. package/dist/{worker-Eom9CfBl.js → worker-D1qidg-Y.js} +5 -5
  59. package/migrations/0044_event_automation_channel_destinations.sql +36 -0
  60. package/migrations/meta/0044_snapshot.json +3473 -0
  61. package/migrations/meta/_journal.json +7 -0
  62. package/package.json +4 -4
  63. package/dist/history-ClE4toxe.d.ts +0 -32
  64. package/dist/reporting-schema-DosTN__Q.js +0 -105
  65. package/dist/web-input-DskRJhrK.js +0 -392
@@ -0,0 +1,3473 @@
1
+ {
2
+ "id": "b83d9902-a77d-4fbc-8c38-d38d3d472201",
3
+ "prevId": "0959e65c-dd48-4eec-b9ce-1a74f0b41ca5",
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
+ "with": {},
43
+ "method": "btree",
44
+ "concurrently": false
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
+ "columnsFrom": ["parent_conversation_id"],
52
+ "tableTo": "junior_conversations",
53
+ "columnsTo": ["conversation_id"],
54
+ "onUpdate": "no action",
55
+ "onDelete": "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
+ "columnsFrom": ["child_conversation_id"],
61
+ "tableTo": "junior_conversations",
62
+ "columnsTo": ["conversation_id"],
63
+ "onUpdate": "no action",
64
+ "onDelete": "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
+ "with": {},
204
+ "method": "btree",
205
+ "concurrently": false
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
+ "with": {},
225
+ "method": "btree",
226
+ "concurrently": false
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
+ "columnsFrom": ["parent_conversation_id"],
234
+ "tableTo": "junior_conversations",
235
+ "columnsTo": ["conversation_id"],
236
+ "onUpdate": "no action",
237
+ "onDelete": "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
+ "columnsFrom": ["child_conversation_id"],
243
+ "tableTo": "junior_conversations",
244
+ "columnsTo": ["conversation_id"],
245
+ "onUpdate": "no action",
246
+ "onDelete": "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
+ "with": {},
327
+ "method": "btree",
328
+ "concurrently": false
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
+ "with": {},
342
+ "method": "btree",
343
+ "concurrently": false
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
+ "with": {},
437
+ "method": "btree",
438
+ "concurrently": false
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
+ "with": {},
458
+ "method": "btree",
459
+ "concurrently": false
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
+ "with": {},
473
+ "method": "btree",
474
+ "concurrently": false
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
+ "with": {},
580
+ "method": "btree",
581
+ "concurrently": false
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
+ "with": {},
607
+ "method": "btree",
608
+ "concurrently": false
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
+ "with": {},
634
+ "method": "btree",
635
+ "concurrently": false
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
+ "columnsFrom": ["conversation_id"],
643
+ "tableTo": "junior_conversations",
644
+ "columnsTo": ["conversation_id"],
645
+ "onUpdate": "no action",
646
+ "onDelete": "cascade"
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
+ "with": {},
733
+ "method": "btree",
734
+ "concurrently": false
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
+ "with": {},
754
+ "method": "btree",
755
+ "concurrently": false
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
+ "with": {},
775
+ "method": "btree",
776
+ "concurrently": false
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
+ "columnsFrom": ["conversation_id"],
784
+ "tableTo": "junior_conversations",
785
+ "columnsTo": ["conversation_id"],
786
+ "onUpdate": "no action",
787
+ "onDelete": "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_code_changes": {
811
+ "name": "junior_code_changes",
812
+ "schema": "",
813
+ "columns": {
814
+ "id": {
815
+ "name": "id",
816
+ "type": "uuid",
817
+ "primaryKey": true,
818
+ "notNull": true
819
+ },
820
+ "closed_at": {
821
+ "name": "closed_at",
822
+ "type": "timestamp with time zone",
823
+ "primaryKey": false,
824
+ "notNull": false
825
+ },
826
+ "conversation_ids": {
827
+ "name": "conversation_ids",
828
+ "type": "text[]",
829
+ "primaryKey": false,
830
+ "notNull": true,
831
+ "default": "ARRAY[]::text[]"
832
+ },
833
+ "merged_at": {
834
+ "name": "merged_at",
835
+ "type": "timestamp with time zone",
836
+ "primaryKey": false,
837
+ "notNull": false
838
+ },
839
+ "number": {
840
+ "name": "number",
841
+ "type": "integer",
842
+ "primaryKey": false,
843
+ "notNull": true
844
+ },
845
+ "opened_at": {
846
+ "name": "opened_at",
847
+ "type": "timestamp with time zone",
848
+ "primaryKey": false,
849
+ "notNull": true
850
+ },
851
+ "provider": {
852
+ "name": "provider",
853
+ "type": "text",
854
+ "primaryKey": false,
855
+ "notNull": true
856
+ },
857
+ "provider_id": {
858
+ "name": "provider_id",
859
+ "type": "text",
860
+ "primaryKey": false,
861
+ "notNull": true
862
+ },
863
+ "repository_id": {
864
+ "name": "repository_id",
865
+ "type": "uuid",
866
+ "primaryKey": false,
867
+ "notNull": true
868
+ },
869
+ "state": {
870
+ "name": "state",
871
+ "type": "text",
872
+ "primaryKey": false,
873
+ "notNull": true
874
+ },
875
+ "title": {
876
+ "name": "title",
877
+ "type": "text",
878
+ "primaryKey": false,
879
+ "notNull": false
880
+ },
881
+ "updated_at": {
882
+ "name": "updated_at",
883
+ "type": "timestamp with time zone",
884
+ "primaryKey": false,
885
+ "notNull": true
886
+ },
887
+ "url": {
888
+ "name": "url",
889
+ "type": "text",
890
+ "primaryKey": false,
891
+ "notNull": false
892
+ }
893
+ },
894
+ "indexes": {
895
+ "junior_code_changes_provider_id_idx": {
896
+ "name": "junior_code_changes_provider_id_idx",
897
+ "columns": [
898
+ {
899
+ "expression": "provider",
900
+ "isExpression": false,
901
+ "asc": true,
902
+ "nulls": "last"
903
+ },
904
+ {
905
+ "expression": "provider_id",
906
+ "isExpression": false,
907
+ "asc": true,
908
+ "nulls": "last"
909
+ }
910
+ ],
911
+ "isUnique": true,
912
+ "with": {},
913
+ "method": "btree",
914
+ "concurrently": false
915
+ },
916
+ "junior_code_changes_opened_at_idx": {
917
+ "name": "junior_code_changes_opened_at_idx",
918
+ "columns": [
919
+ {
920
+ "expression": "opened_at",
921
+ "isExpression": false,
922
+ "asc": true,
923
+ "nulls": "last"
924
+ }
925
+ ],
926
+ "isUnique": false,
927
+ "with": {},
928
+ "method": "btree",
929
+ "concurrently": false
930
+ },
931
+ "junior_code_changes_merged_at_idx": {
932
+ "name": "junior_code_changes_merged_at_idx",
933
+ "columns": [
934
+ {
935
+ "expression": "merged_at",
936
+ "isExpression": false,
937
+ "asc": true,
938
+ "nulls": "last"
939
+ }
940
+ ],
941
+ "isUnique": false,
942
+ "with": {},
943
+ "method": "btree",
944
+ "concurrently": false
945
+ },
946
+ "junior_code_changes_closed_at_idx": {
947
+ "name": "junior_code_changes_closed_at_idx",
948
+ "columns": [
949
+ {
950
+ "expression": "closed_at",
951
+ "isExpression": false,
952
+ "asc": true,
953
+ "nulls": "last"
954
+ }
955
+ ],
956
+ "isUnique": false,
957
+ "with": {},
958
+ "method": "btree",
959
+ "concurrently": false
960
+ },
961
+ "junior_code_changes_open_idx": {
962
+ "name": "junior_code_changes_open_idx",
963
+ "columns": [
964
+ {
965
+ "expression": "id",
966
+ "isExpression": false,
967
+ "asc": true,
968
+ "nulls": "last"
969
+ }
970
+ ],
971
+ "isUnique": false,
972
+ "with": {},
973
+ "method": "btree",
974
+ "where": "\"junior_code_changes\".\"state\" = 'open'",
975
+ "concurrently": false
976
+ }
977
+ },
978
+ "foreignKeys": {
979
+ "junior_code_changes_repository_id_junior_code_repositories_id_fk": {
980
+ "name": "junior_code_changes_repository_id_junior_code_repositories_id_fk",
981
+ "tableFrom": "junior_code_changes",
982
+ "columnsFrom": ["repository_id"],
983
+ "tableTo": "junior_code_repositories",
984
+ "columnsTo": ["id"],
985
+ "onUpdate": "no action",
986
+ "onDelete": "cascade"
987
+ }
988
+ },
989
+ "compositePrimaryKeys": {},
990
+ "uniqueConstraints": {},
991
+ "policies": {},
992
+ "checkConstraints": {},
993
+ "isRLSEnabled": false
994
+ },
995
+ "public.junior_code_repositories": {
996
+ "name": "junior_code_repositories",
997
+ "schema": "",
998
+ "columns": {
999
+ "id": {
1000
+ "name": "id",
1001
+ "type": "uuid",
1002
+ "primaryKey": true,
1003
+ "notNull": true
1004
+ },
1005
+ "name": {
1006
+ "name": "name",
1007
+ "type": "text",
1008
+ "primaryKey": false,
1009
+ "notNull": true
1010
+ },
1011
+ "provider": {
1012
+ "name": "provider",
1013
+ "type": "text",
1014
+ "primaryKey": false,
1015
+ "notNull": true
1016
+ },
1017
+ "provider_id": {
1018
+ "name": "provider_id",
1019
+ "type": "text",
1020
+ "primaryKey": false,
1021
+ "notNull": true
1022
+ },
1023
+ "url": {
1024
+ "name": "url",
1025
+ "type": "text",
1026
+ "primaryKey": false,
1027
+ "notNull": false
1028
+ },
1029
+ "updated_at": {
1030
+ "name": "updated_at",
1031
+ "type": "timestamp with time zone",
1032
+ "primaryKey": false,
1033
+ "notNull": true
1034
+ }
1035
+ },
1036
+ "indexes": {
1037
+ "junior_code_repositories_provider_id_idx": {
1038
+ "name": "junior_code_repositories_provider_id_idx",
1039
+ "columns": [
1040
+ {
1041
+ "expression": "provider",
1042
+ "isExpression": false,
1043
+ "asc": true,
1044
+ "nulls": "last"
1045
+ },
1046
+ {
1047
+ "expression": "provider_id",
1048
+ "isExpression": false,
1049
+ "asc": true,
1050
+ "nulls": "last"
1051
+ }
1052
+ ],
1053
+ "isUnique": true,
1054
+ "with": {},
1055
+ "method": "btree",
1056
+ "concurrently": false
1057
+ }
1058
+ },
1059
+ "foreignKeys": {},
1060
+ "compositePrimaryKeys": {},
1061
+ "uniqueConstraints": {},
1062
+ "policies": {},
1063
+ "checkConstraints": {},
1064
+ "isRLSEnabled": false
1065
+ },
1066
+ "public.junior_conversation_annotations": {
1067
+ "name": "junior_conversation_annotations",
1068
+ "schema": "",
1069
+ "columns": {
1070
+ "conversation_id": {
1071
+ "name": "conversation_id",
1072
+ "type": "text",
1073
+ "primaryKey": false,
1074
+ "notNull": true
1075
+ },
1076
+ "plugin": {
1077
+ "name": "plugin",
1078
+ "type": "text",
1079
+ "primaryKey": false,
1080
+ "notNull": true
1081
+ },
1082
+ "kind": {
1083
+ "name": "kind",
1084
+ "type": "text",
1085
+ "primaryKey": false,
1086
+ "notNull": true
1087
+ },
1088
+ "key": {
1089
+ "name": "key",
1090
+ "type": "text",
1091
+ "primaryKey": false,
1092
+ "notNull": true
1093
+ },
1094
+ "annotation_json": {
1095
+ "name": "annotation_json",
1096
+ "type": "jsonb",
1097
+ "primaryKey": false,
1098
+ "notNull": true
1099
+ },
1100
+ "created_at": {
1101
+ "name": "created_at",
1102
+ "type": "timestamp with time zone",
1103
+ "primaryKey": false,
1104
+ "notNull": true
1105
+ },
1106
+ "updated_at": {
1107
+ "name": "updated_at",
1108
+ "type": "timestamp with time zone",
1109
+ "primaryKey": false,
1110
+ "notNull": true
1111
+ }
1112
+ },
1113
+ "indexes": {},
1114
+ "foreignKeys": {
1115
+ "junior_conversation_annotations_conversation_id_fk": {
1116
+ "name": "junior_conversation_annotations_conversation_id_fk",
1117
+ "tableFrom": "junior_conversation_annotations",
1118
+ "columnsFrom": ["conversation_id"],
1119
+ "tableTo": "junior_conversations",
1120
+ "columnsTo": ["conversation_id"],
1121
+ "onUpdate": "no action",
1122
+ "onDelete": "cascade"
1123
+ }
1124
+ },
1125
+ "compositePrimaryKeys": {
1126
+ "junior_conversation_annotations_pk": {
1127
+ "name": "junior_conversation_annotations_pk",
1128
+ "columns": ["conversation_id", "plugin", "kind", "key"]
1129
+ }
1130
+ },
1131
+ "uniqueConstraints": {},
1132
+ "policies": {},
1133
+ "checkConstraints": {},
1134
+ "isRLSEnabled": false
1135
+ },
1136
+ "public.junior_conversation_bindings": {
1137
+ "name": "junior_conversation_bindings",
1138
+ "schema": "",
1139
+ "columns": {
1140
+ "conversation_id": {
1141
+ "name": "conversation_id",
1142
+ "type": "text",
1143
+ "primaryKey": false,
1144
+ "notNull": true
1145
+ },
1146
+ "provider": {
1147
+ "name": "provider",
1148
+ "type": "text",
1149
+ "primaryKey": false,
1150
+ "notNull": true
1151
+ },
1152
+ "provider_tenant_id": {
1153
+ "name": "provider_tenant_id",
1154
+ "type": "text",
1155
+ "primaryKey": false,
1156
+ "notNull": true,
1157
+ "default": "''"
1158
+ },
1159
+ "provider_destination_id": {
1160
+ "name": "provider_destination_id",
1161
+ "type": "text",
1162
+ "primaryKey": false,
1163
+ "notNull": true
1164
+ },
1165
+ "provider_conversation_id": {
1166
+ "name": "provider_conversation_id",
1167
+ "type": "text",
1168
+ "primaryKey": false,
1169
+ "notNull": true
1170
+ },
1171
+ "created_at": {
1172
+ "name": "created_at",
1173
+ "type": "timestamp with time zone",
1174
+ "primaryKey": false,
1175
+ "notNull": true
1176
+ }
1177
+ },
1178
+ "indexes": {
1179
+ "junior_conversation_bindings_conversation_idx": {
1180
+ "name": "junior_conversation_bindings_conversation_idx",
1181
+ "columns": [
1182
+ {
1183
+ "expression": "conversation_id",
1184
+ "isExpression": false,
1185
+ "asc": true,
1186
+ "nulls": "last"
1187
+ }
1188
+ ],
1189
+ "isUnique": false,
1190
+ "with": {},
1191
+ "method": "btree",
1192
+ "concurrently": false
1193
+ }
1194
+ },
1195
+ "foreignKeys": {
1196
+ "junior_conversation_bindings_conversation_id_junior_conversations_conversation_id_fk": {
1197
+ "name": "junior_conversation_bindings_conversation_id_junior_conversations_conversation_id_fk",
1198
+ "tableFrom": "junior_conversation_bindings",
1199
+ "columnsFrom": ["conversation_id"],
1200
+ "tableTo": "junior_conversations",
1201
+ "columnsTo": ["conversation_id"],
1202
+ "onUpdate": "no action",
1203
+ "onDelete": "no action"
1204
+ }
1205
+ },
1206
+ "compositePrimaryKeys": {
1207
+ "junior_conversation_bindings_provider_conversation_pk": {
1208
+ "name": "junior_conversation_bindings_provider_conversation_pk",
1209
+ "columns": [
1210
+ "provider",
1211
+ "provider_tenant_id",
1212
+ "provider_destination_id",
1213
+ "provider_conversation_id"
1214
+ ]
1215
+ }
1216
+ },
1217
+ "uniqueConstraints": {},
1218
+ "policies": {},
1219
+ "checkConstraints": {},
1220
+ "isRLSEnabled": false
1221
+ },
1222
+ "public.junior_conversation_briefs": {
1223
+ "name": "junior_conversation_briefs",
1224
+ "schema": "",
1225
+ "columns": {
1226
+ "conversation_id": {
1227
+ "name": "conversation_id",
1228
+ "type": "text",
1229
+ "primaryKey": false,
1230
+ "notNull": true
1231
+ },
1232
+ "version": {
1233
+ "name": "version",
1234
+ "type": "integer",
1235
+ "primaryKey": false,
1236
+ "notNull": true
1237
+ },
1238
+ "turn_id": {
1239
+ "name": "turn_id",
1240
+ "type": "text",
1241
+ "primaryKey": false,
1242
+ "notNull": true
1243
+ },
1244
+ "through_seq": {
1245
+ "name": "through_seq",
1246
+ "type": "integer",
1247
+ "primaryKey": false,
1248
+ "notNull": true
1249
+ },
1250
+ "content": {
1251
+ "name": "content",
1252
+ "type": "jsonb",
1253
+ "primaryKey": false,
1254
+ "notNull": true
1255
+ },
1256
+ "search_text": {
1257
+ "name": "search_text",
1258
+ "type": "text",
1259
+ "primaryKey": false,
1260
+ "notNull": true
1261
+ },
1262
+ "model_id": {
1263
+ "name": "model_id",
1264
+ "type": "text",
1265
+ "primaryKey": false,
1266
+ "notNull": true
1267
+ },
1268
+ "cost_usd": {
1269
+ "name": "cost_usd",
1270
+ "type": "double precision",
1271
+ "primaryKey": false,
1272
+ "notNull": false
1273
+ },
1274
+ "created_at": {
1275
+ "name": "created_at",
1276
+ "type": "timestamp with time zone",
1277
+ "primaryKey": false,
1278
+ "notNull": true,
1279
+ "default": "now()"
1280
+ }
1281
+ },
1282
+ "indexes": {
1283
+ "junior_conversation_briefs_conversation_turn_idx": {
1284
+ "name": "junior_conversation_briefs_conversation_turn_idx",
1285
+ "columns": [
1286
+ {
1287
+ "expression": "conversation_id",
1288
+ "isExpression": false,
1289
+ "asc": true,
1290
+ "nulls": "last"
1291
+ },
1292
+ {
1293
+ "expression": "turn_id",
1294
+ "isExpression": false,
1295
+ "asc": true,
1296
+ "nulls": "last"
1297
+ }
1298
+ ],
1299
+ "isUnique": true,
1300
+ "with": {},
1301
+ "method": "btree",
1302
+ "concurrently": false
1303
+ },
1304
+ "junior_conversation_briefs_conversation_version_idx": {
1305
+ "name": "junior_conversation_briefs_conversation_version_idx",
1306
+ "columns": [
1307
+ {
1308
+ "expression": "conversation_id",
1309
+ "isExpression": false,
1310
+ "asc": true,
1311
+ "nulls": "last"
1312
+ },
1313
+ {
1314
+ "expression": "version",
1315
+ "isExpression": false,
1316
+ "asc": false,
1317
+ "nulls": "last"
1318
+ }
1319
+ ],
1320
+ "isUnique": false,
1321
+ "with": {},
1322
+ "method": "btree",
1323
+ "concurrently": false
1324
+ },
1325
+ "junior_conversation_briefs_search_idx": {
1326
+ "name": "junior_conversation_briefs_search_idx",
1327
+ "columns": [
1328
+ {
1329
+ "expression": "to_tsvector('english', \"search_text\")",
1330
+ "isExpression": true,
1331
+ "asc": true,
1332
+ "nulls": "last"
1333
+ }
1334
+ ],
1335
+ "isUnique": false,
1336
+ "with": {},
1337
+ "method": "gin",
1338
+ "concurrently": false
1339
+ }
1340
+ },
1341
+ "foreignKeys": {
1342
+ "junior_conversation_briefs_conversation_id_junior_conversations_conversation_id_fk": {
1343
+ "name": "junior_conversation_briefs_conversation_id_junior_conversations_conversation_id_fk",
1344
+ "tableFrom": "junior_conversation_briefs",
1345
+ "columnsFrom": ["conversation_id"],
1346
+ "tableTo": "junior_conversations",
1347
+ "columnsTo": ["conversation_id"],
1348
+ "onUpdate": "no action",
1349
+ "onDelete": "cascade"
1350
+ }
1351
+ },
1352
+ "compositePrimaryKeys": {
1353
+ "junior_conversation_briefs_conversation_id_version_pk": {
1354
+ "name": "junior_conversation_briefs_conversation_id_version_pk",
1355
+ "columns": ["conversation_id", "version"]
1356
+ }
1357
+ },
1358
+ "uniqueConstraints": {},
1359
+ "policies": {},
1360
+ "checkConstraints": {},
1361
+ "isRLSEnabled": false
1362
+ },
1363
+ "public.junior_conversation_events": {
1364
+ "name": "junior_conversation_events",
1365
+ "schema": "",
1366
+ "columns": {
1367
+ "conversation_id": {
1368
+ "name": "conversation_id",
1369
+ "type": "text",
1370
+ "primaryKey": false,
1371
+ "notNull": true
1372
+ },
1373
+ "seq": {
1374
+ "name": "seq",
1375
+ "type": "integer",
1376
+ "primaryKey": false,
1377
+ "notNull": true
1378
+ },
1379
+ "history_version": {
1380
+ "name": "history_version",
1381
+ "type": "integer",
1382
+ "primaryKey": false,
1383
+ "notNull": true
1384
+ },
1385
+ "schema_version": {
1386
+ "name": "schema_version",
1387
+ "type": "integer",
1388
+ "primaryKey": false,
1389
+ "notNull": true,
1390
+ "default": 1
1391
+ },
1392
+ "idempotency_key": {
1393
+ "name": "idempotency_key",
1394
+ "type": "text",
1395
+ "primaryKey": false,
1396
+ "notNull": false
1397
+ },
1398
+ "type": {
1399
+ "name": "type",
1400
+ "type": "text",
1401
+ "primaryKey": false,
1402
+ "notNull": true
1403
+ },
1404
+ "payload": {
1405
+ "name": "payload",
1406
+ "type": "jsonb",
1407
+ "primaryKey": false,
1408
+ "notNull": true
1409
+ },
1410
+ "actor_identity_id": {
1411
+ "name": "actor_identity_id",
1412
+ "type": "text",
1413
+ "primaryKey": false,
1414
+ "notNull": false
1415
+ },
1416
+ "created_at": {
1417
+ "name": "created_at",
1418
+ "type": "timestamp with time zone",
1419
+ "primaryKey": false,
1420
+ "notNull": true
1421
+ }
1422
+ },
1423
+ "indexes": {
1424
+ "junior_conversation_events_history_version_idx": {
1425
+ "name": "junior_conversation_events_history_version_idx",
1426
+ "columns": [
1427
+ {
1428
+ "expression": "conversation_id",
1429
+ "isExpression": false,
1430
+ "asc": true,
1431
+ "nulls": "last"
1432
+ },
1433
+ {
1434
+ "expression": "history_version",
1435
+ "isExpression": false,
1436
+ "asc": true,
1437
+ "nulls": "last"
1438
+ },
1439
+ {
1440
+ "expression": "seq",
1441
+ "isExpression": false,
1442
+ "asc": true,
1443
+ "nulls": "last"
1444
+ }
1445
+ ],
1446
+ "isUnique": false,
1447
+ "with": {},
1448
+ "method": "btree",
1449
+ "concurrently": false
1450
+ },
1451
+ "junior_conversation_events_type_idx": {
1452
+ "name": "junior_conversation_events_type_idx",
1453
+ "columns": [
1454
+ {
1455
+ "expression": "conversation_id",
1456
+ "isExpression": false,
1457
+ "asc": true,
1458
+ "nulls": "last"
1459
+ },
1460
+ {
1461
+ "expression": "type",
1462
+ "isExpression": false,
1463
+ "asc": true,
1464
+ "nulls": "last"
1465
+ },
1466
+ {
1467
+ "expression": "seq",
1468
+ "isExpression": false,
1469
+ "asc": true,
1470
+ "nulls": "last"
1471
+ }
1472
+ ],
1473
+ "isUnique": false,
1474
+ "with": {},
1475
+ "method": "btree",
1476
+ "concurrently": false
1477
+ },
1478
+ "junior_conversation_events_actor_identity_idx": {
1479
+ "name": "junior_conversation_events_actor_identity_idx",
1480
+ "columns": [
1481
+ {
1482
+ "expression": "actor_identity_id",
1483
+ "isExpression": false,
1484
+ "asc": true,
1485
+ "nulls": "last"
1486
+ },
1487
+ {
1488
+ "expression": "conversation_id",
1489
+ "isExpression": false,
1490
+ "asc": true,
1491
+ "nulls": "last"
1492
+ },
1493
+ {
1494
+ "expression": "seq",
1495
+ "isExpression": false,
1496
+ "asc": true,
1497
+ "nulls": "last"
1498
+ }
1499
+ ],
1500
+ "isUnique": false,
1501
+ "with": {},
1502
+ "method": "btree",
1503
+ "concurrently": false
1504
+ },
1505
+ "junior_conversation_events_message_search_idx": {
1506
+ "name": "junior_conversation_events_message_search_idx",
1507
+ "columns": [
1508
+ {
1509
+ "expression": "to_tsvector('english', \"payload\"->>'text')",
1510
+ "isExpression": true,
1511
+ "asc": true,
1512
+ "nulls": "last"
1513
+ }
1514
+ ],
1515
+ "isUnique": false,
1516
+ "with": {},
1517
+ "method": "gin",
1518
+ "where": "\"junior_conversation_events\".\"type\" = 'message'",
1519
+ "concurrently": false
1520
+ },
1521
+ "junior_conversation_events_idempotency_idx": {
1522
+ "name": "junior_conversation_events_idempotency_idx",
1523
+ "columns": [
1524
+ {
1525
+ "expression": "conversation_id",
1526
+ "isExpression": false,
1527
+ "asc": true,
1528
+ "nulls": "last"
1529
+ },
1530
+ {
1531
+ "expression": "idempotency_key",
1532
+ "isExpression": false,
1533
+ "asc": true,
1534
+ "nulls": "last"
1535
+ }
1536
+ ],
1537
+ "isUnique": true,
1538
+ "with": {},
1539
+ "method": "btree",
1540
+ "concurrently": false
1541
+ }
1542
+ },
1543
+ "foreignKeys": {
1544
+ "junior_conversation_events_actor_identity_id_junior_identities_id_fk": {
1545
+ "name": "junior_conversation_events_actor_identity_id_junior_identities_id_fk",
1546
+ "tableFrom": "junior_conversation_events",
1547
+ "columnsFrom": ["actor_identity_id"],
1548
+ "tableTo": "junior_identities",
1549
+ "columnsTo": ["id"],
1550
+ "onUpdate": "no action",
1551
+ "onDelete": "no action"
1552
+ },
1553
+ "junior_conversation_events_conversation_id_junior_conversations_conversation_id_fk": {
1554
+ "name": "junior_conversation_events_conversation_id_junior_conversations_conversation_id_fk",
1555
+ "tableFrom": "junior_conversation_events",
1556
+ "columnsFrom": ["conversation_id"],
1557
+ "tableTo": "junior_conversations",
1558
+ "columnsTo": ["conversation_id"],
1559
+ "onUpdate": "no action",
1560
+ "onDelete": "no action"
1561
+ }
1562
+ },
1563
+ "compositePrimaryKeys": {
1564
+ "junior_conversation_events_conversation_id_seq_pk": {
1565
+ "name": "junior_conversation_events_conversation_id_seq_pk",
1566
+ "columns": ["conversation_id", "seq"]
1567
+ }
1568
+ },
1569
+ "uniqueConstraints": {},
1570
+ "policies": {},
1571
+ "checkConstraints": {},
1572
+ "isRLSEnabled": false
1573
+ },
1574
+ "public.junior_conversation_metrics": {
1575
+ "name": "junior_conversation_metrics",
1576
+ "schema": "",
1577
+ "columns": {
1578
+ "conversation_id": {
1579
+ "name": "conversation_id",
1580
+ "type": "text",
1581
+ "primaryKey": false,
1582
+ "notNull": true
1583
+ },
1584
+ "run_id": {
1585
+ "name": "run_id",
1586
+ "type": "text",
1587
+ "primaryKey": false,
1588
+ "notNull": true
1589
+ },
1590
+ "metric": {
1591
+ "name": "metric",
1592
+ "type": "text",
1593
+ "primaryKey": false,
1594
+ "notNull": true
1595
+ },
1596
+ "value": {
1597
+ "name": "value",
1598
+ "type": "double precision",
1599
+ "primaryKey": false,
1600
+ "notNull": true
1601
+ },
1602
+ "occurred_at": {
1603
+ "name": "occurred_at",
1604
+ "type": "timestamp with time zone",
1605
+ "primaryKey": false,
1606
+ "notNull": true
1607
+ },
1608
+ "updated_at": {
1609
+ "name": "updated_at",
1610
+ "type": "timestamp with time zone",
1611
+ "primaryKey": false,
1612
+ "notNull": true
1613
+ }
1614
+ },
1615
+ "indexes": {
1616
+ "junior_conversation_metrics_occurred_at_metric_idx": {
1617
+ "name": "junior_conversation_metrics_occurred_at_metric_idx",
1618
+ "columns": [
1619
+ {
1620
+ "expression": "occurred_at",
1621
+ "isExpression": false,
1622
+ "asc": true,
1623
+ "nulls": "last"
1624
+ },
1625
+ {
1626
+ "expression": "metric",
1627
+ "isExpression": false,
1628
+ "asc": true,
1629
+ "nulls": "last"
1630
+ }
1631
+ ],
1632
+ "isUnique": false,
1633
+ "with": {},
1634
+ "method": "btree",
1635
+ "concurrently": false
1636
+ }
1637
+ },
1638
+ "foreignKeys": {
1639
+ "junior_conversation_metrics_conversation_id_junior_conversations_conversation_id_fk": {
1640
+ "name": "junior_conversation_metrics_conversation_id_junior_conversations_conversation_id_fk",
1641
+ "tableFrom": "junior_conversation_metrics",
1642
+ "columnsFrom": ["conversation_id"],
1643
+ "tableTo": "junior_conversations",
1644
+ "columnsTo": ["conversation_id"],
1645
+ "onUpdate": "no action",
1646
+ "onDelete": "no action"
1647
+ }
1648
+ },
1649
+ "compositePrimaryKeys": {
1650
+ "junior_conversation_metrics_conversation_id_run_id_metric_pk": {
1651
+ "name": "junior_conversation_metrics_conversation_id_run_id_metric_pk",
1652
+ "columns": ["conversation_id", "run_id", "metric"]
1653
+ }
1654
+ },
1655
+ "uniqueConstraints": {},
1656
+ "policies": {},
1657
+ "checkConstraints": {},
1658
+ "isRLSEnabled": false
1659
+ },
1660
+ "public.junior_conversation_participants": {
1661
+ "name": "junior_conversation_participants",
1662
+ "schema": "",
1663
+ "columns": {
1664
+ "user_id": {
1665
+ "name": "user_id",
1666
+ "type": "text",
1667
+ "primaryKey": false,
1668
+ "notNull": true
1669
+ },
1670
+ "root_conversation_id": {
1671
+ "name": "root_conversation_id",
1672
+ "type": "text",
1673
+ "primaryKey": false,
1674
+ "notNull": true
1675
+ },
1676
+ "last_message_at": {
1677
+ "name": "last_message_at",
1678
+ "type": "timestamp with time zone",
1679
+ "primaryKey": false,
1680
+ "notNull": true
1681
+ },
1682
+ "archived_at": {
1683
+ "name": "archived_at",
1684
+ "type": "timestamp with time zone",
1685
+ "primaryKey": false,
1686
+ "notNull": false
1687
+ }
1688
+ },
1689
+ "indexes": {
1690
+ "junior_conversation_participants_user_activity_idx": {
1691
+ "name": "junior_conversation_participants_user_activity_idx",
1692
+ "columns": [
1693
+ {
1694
+ "expression": "user_id",
1695
+ "isExpression": false,
1696
+ "asc": true,
1697
+ "nulls": "last"
1698
+ },
1699
+ {
1700
+ "expression": "last_message_at",
1701
+ "isExpression": false,
1702
+ "asc": false,
1703
+ "nulls": "last"
1704
+ }
1705
+ ],
1706
+ "isUnique": false,
1707
+ "with": {},
1708
+ "method": "btree",
1709
+ "concurrently": false
1710
+ },
1711
+ "junior_conversation_participants_root_idx": {
1712
+ "name": "junior_conversation_participants_root_idx",
1713
+ "columns": [
1714
+ {
1715
+ "expression": "root_conversation_id",
1716
+ "isExpression": false,
1717
+ "asc": true,
1718
+ "nulls": "last"
1719
+ }
1720
+ ],
1721
+ "isUnique": false,
1722
+ "with": {},
1723
+ "method": "btree",
1724
+ "concurrently": false
1725
+ }
1726
+ },
1727
+ "foreignKeys": {
1728
+ "junior_conversation_participants_user_id_junior_users_id_fk": {
1729
+ "name": "junior_conversation_participants_user_id_junior_users_id_fk",
1730
+ "tableFrom": "junior_conversation_participants",
1731
+ "columnsFrom": ["user_id"],
1732
+ "tableTo": "junior_users",
1733
+ "columnsTo": ["id"],
1734
+ "onUpdate": "no action",
1735
+ "onDelete": "no action"
1736
+ },
1737
+ "junior_conversation_participants_root_conversation_id_junior_conversations_conversation_id_fk": {
1738
+ "name": "junior_conversation_participants_root_conversation_id_junior_conversations_conversation_id_fk",
1739
+ "tableFrom": "junior_conversation_participants",
1740
+ "columnsFrom": ["root_conversation_id"],
1741
+ "tableTo": "junior_conversations",
1742
+ "columnsTo": ["conversation_id"],
1743
+ "onUpdate": "no action",
1744
+ "onDelete": "no action"
1745
+ }
1746
+ },
1747
+ "compositePrimaryKeys": {
1748
+ "junior_conversation_participants_user_root_pk": {
1749
+ "name": "junior_conversation_participants_user_root_pk",
1750
+ "columns": ["user_id", "root_conversation_id"]
1751
+ }
1752
+ },
1753
+ "uniqueConstraints": {},
1754
+ "policies": {},
1755
+ "checkConstraints": {},
1756
+ "isRLSEnabled": false
1757
+ },
1758
+ "public.junior_conversations": {
1759
+ "name": "junior_conversations",
1760
+ "schema": "",
1761
+ "columns": {
1762
+ "conversation_id": {
1763
+ "name": "conversation_id",
1764
+ "type": "text",
1765
+ "primaryKey": true,
1766
+ "notNull": true
1767
+ },
1768
+ "schema_version": {
1769
+ "name": "schema_version",
1770
+ "type": "integer",
1771
+ "primaryKey": false,
1772
+ "notNull": true,
1773
+ "default": 1
1774
+ },
1775
+ "source": {
1776
+ "name": "source",
1777
+ "type": "text",
1778
+ "primaryKey": false,
1779
+ "notNull": false
1780
+ },
1781
+ "source_json": {
1782
+ "name": "source_json",
1783
+ "type": "jsonb",
1784
+ "primaryKey": false,
1785
+ "notNull": false
1786
+ },
1787
+ "origin_type": {
1788
+ "name": "origin_type",
1789
+ "type": "text",
1790
+ "primaryKey": false,
1791
+ "notNull": false
1792
+ },
1793
+ "origin_id": {
1794
+ "name": "origin_id",
1795
+ "type": "text",
1796
+ "primaryKey": false,
1797
+ "notNull": false
1798
+ },
1799
+ "origin_run_id": {
1800
+ "name": "origin_run_id",
1801
+ "type": "text",
1802
+ "primaryKey": false,
1803
+ "notNull": false
1804
+ },
1805
+ "location_json": {
1806
+ "name": "location_json",
1807
+ "type": "jsonb",
1808
+ "primaryKey": false,
1809
+ "notNull": false
1810
+ },
1811
+ "destination_id": {
1812
+ "name": "destination_id",
1813
+ "type": "text",
1814
+ "primaryKey": false,
1815
+ "notNull": false
1816
+ },
1817
+ "destination_json": {
1818
+ "name": "destination_json",
1819
+ "type": "jsonb",
1820
+ "primaryKey": false,
1821
+ "notNull": false
1822
+ },
1823
+ "actor_identity_id": {
1824
+ "name": "actor_identity_id",
1825
+ "type": "text",
1826
+ "primaryKey": false,
1827
+ "notNull": false
1828
+ },
1829
+ "creator_identity_id": {
1830
+ "name": "creator_identity_id",
1831
+ "type": "text",
1832
+ "primaryKey": false,
1833
+ "notNull": false
1834
+ },
1835
+ "credential_subject_identity_id": {
1836
+ "name": "credential_subject_identity_id",
1837
+ "type": "text",
1838
+ "primaryKey": false,
1839
+ "notNull": false
1840
+ },
1841
+ "actor_json": {
1842
+ "name": "actor_json",
1843
+ "type": "jsonb",
1844
+ "primaryKey": false,
1845
+ "notNull": false
1846
+ },
1847
+ "channel_name": {
1848
+ "name": "channel_name",
1849
+ "type": "text",
1850
+ "primaryKey": false,
1851
+ "notNull": false
1852
+ },
1853
+ "title": {
1854
+ "name": "title",
1855
+ "type": "text",
1856
+ "primaryKey": false,
1857
+ "notNull": false
1858
+ },
1859
+ "created_at": {
1860
+ "name": "created_at",
1861
+ "type": "timestamp with time zone",
1862
+ "primaryKey": false,
1863
+ "notNull": true
1864
+ },
1865
+ "last_activity_at": {
1866
+ "name": "last_activity_at",
1867
+ "type": "timestamp with time zone",
1868
+ "primaryKey": false,
1869
+ "notNull": true
1870
+ },
1871
+ "updated_at": {
1872
+ "name": "updated_at",
1873
+ "type": "timestamp with time zone",
1874
+ "primaryKey": false,
1875
+ "notNull": true
1876
+ },
1877
+ "execution_updated_at": {
1878
+ "name": "execution_updated_at",
1879
+ "type": "timestamp with time zone",
1880
+ "primaryKey": false,
1881
+ "notNull": false
1882
+ },
1883
+ "execution_status": {
1884
+ "name": "execution_status",
1885
+ "type": "text",
1886
+ "primaryKey": false,
1887
+ "notNull": true
1888
+ },
1889
+ "run_id": {
1890
+ "name": "run_id",
1891
+ "type": "text",
1892
+ "primaryKey": false,
1893
+ "notNull": false
1894
+ },
1895
+ "last_checkpoint_at": {
1896
+ "name": "last_checkpoint_at",
1897
+ "type": "timestamp with time zone",
1898
+ "primaryKey": false,
1899
+ "notNull": false
1900
+ },
1901
+ "last_enqueued_at": {
1902
+ "name": "last_enqueued_at",
1903
+ "type": "timestamp with time zone",
1904
+ "primaryKey": false,
1905
+ "notNull": false
1906
+ },
1907
+ "parent_conversation_id": {
1908
+ "name": "parent_conversation_id",
1909
+ "type": "text",
1910
+ "primaryKey": false,
1911
+ "notNull": false
1912
+ },
1913
+ "root_conversation_id": {
1914
+ "name": "root_conversation_id",
1915
+ "type": "text",
1916
+ "primaryKey": false,
1917
+ "notNull": false
1918
+ },
1919
+ "transcript_purged_at": {
1920
+ "name": "transcript_purged_at",
1921
+ "type": "timestamp with time zone",
1922
+ "primaryKey": false,
1923
+ "notNull": false
1924
+ },
1925
+ "duration_ms": {
1926
+ "name": "duration_ms",
1927
+ "type": "integer",
1928
+ "primaryKey": false,
1929
+ "notNull": true,
1930
+ "default": 0
1931
+ },
1932
+ "usage_json": {
1933
+ "name": "usage_json",
1934
+ "type": "jsonb",
1935
+ "primaryKey": false,
1936
+ "notNull": false
1937
+ },
1938
+ "execution_duration_ms": {
1939
+ "name": "execution_duration_ms",
1940
+ "type": "integer",
1941
+ "primaryKey": false,
1942
+ "notNull": true,
1943
+ "default": 0
1944
+ },
1945
+ "execution_usage_json": {
1946
+ "name": "execution_usage_json",
1947
+ "type": "jsonb",
1948
+ "primaryKey": false,
1949
+ "notNull": false
1950
+ },
1951
+ "metric_run_id": {
1952
+ "name": "metric_run_id",
1953
+ "type": "text",
1954
+ "primaryKey": false,
1955
+ "notNull": false
1956
+ },
1957
+ "archived_at": {
1958
+ "name": "archived_at",
1959
+ "type": "timestamp with time zone",
1960
+ "primaryKey": false,
1961
+ "notNull": false
1962
+ }
1963
+ },
1964
+ "indexes": {
1965
+ "junior_conversations_last_activity_idx": {
1966
+ "name": "junior_conversations_last_activity_idx",
1967
+ "columns": [
1968
+ {
1969
+ "expression": "last_activity_at",
1970
+ "isExpression": false,
1971
+ "asc": false,
1972
+ "nulls": "last"
1973
+ },
1974
+ {
1975
+ "expression": "conversation_id",
1976
+ "isExpression": false,
1977
+ "asc": true,
1978
+ "nulls": "last"
1979
+ }
1980
+ ],
1981
+ "isUnique": false,
1982
+ "with": {},
1983
+ "method": "btree",
1984
+ "concurrently": false
1985
+ },
1986
+ "junior_conversations_active_idx": {
1987
+ "name": "junior_conversations_active_idx",
1988
+ "columns": [
1989
+ {
1990
+ "expression": "coalesce(\"execution_updated_at\", \"updated_at\")",
1991
+ "isExpression": true,
1992
+ "asc": true,
1993
+ "nulls": "last"
1994
+ },
1995
+ {
1996
+ "expression": "conversation_id",
1997
+ "isExpression": false,
1998
+ "asc": true,
1999
+ "nulls": "last"
2000
+ }
2001
+ ],
2002
+ "isUnique": false,
2003
+ "with": {},
2004
+ "method": "btree",
2005
+ "where": "\"junior_conversations\".\"execution_status\" <> 'idle'",
2006
+ "concurrently": false
2007
+ },
2008
+ "junior_conversations_destination_activity_idx": {
2009
+ "name": "junior_conversations_destination_activity_idx",
2010
+ "columns": [
2011
+ {
2012
+ "expression": "destination_id",
2013
+ "isExpression": false,
2014
+ "asc": true,
2015
+ "nulls": "last"
2016
+ },
2017
+ {
2018
+ "expression": "last_activity_at",
2019
+ "isExpression": false,
2020
+ "asc": false,
2021
+ "nulls": "last"
2022
+ }
2023
+ ],
2024
+ "isUnique": false,
2025
+ "with": {},
2026
+ "method": "btree",
2027
+ "concurrently": false
2028
+ },
2029
+ "junior_conversations_actor_activity_idx": {
2030
+ "name": "junior_conversations_actor_activity_idx",
2031
+ "columns": [
2032
+ {
2033
+ "expression": "actor_identity_id",
2034
+ "isExpression": false,
2035
+ "asc": true,
2036
+ "nulls": "last"
2037
+ },
2038
+ {
2039
+ "expression": "last_activity_at",
2040
+ "isExpression": false,
2041
+ "asc": false,
2042
+ "nulls": "last"
2043
+ }
2044
+ ],
2045
+ "isUnique": false,
2046
+ "with": {},
2047
+ "method": "btree",
2048
+ "concurrently": false
2049
+ },
2050
+ "junior_conversations_origin_idx": {
2051
+ "name": "junior_conversations_origin_idx",
2052
+ "columns": [
2053
+ {
2054
+ "expression": "origin_type",
2055
+ "isExpression": false,
2056
+ "asc": true,
2057
+ "nulls": "last"
2058
+ },
2059
+ {
2060
+ "expression": "origin_id",
2061
+ "isExpression": false,
2062
+ "asc": true,
2063
+ "nulls": "last"
2064
+ },
2065
+ {
2066
+ "expression": "last_activity_at",
2067
+ "isExpression": false,
2068
+ "asc": false,
2069
+ "nulls": "last"
2070
+ }
2071
+ ],
2072
+ "isUnique": false,
2073
+ "with": {},
2074
+ "method": "btree",
2075
+ "concurrently": false
2076
+ },
2077
+ "junior_conversations_parent_idx": {
2078
+ "name": "junior_conversations_parent_idx",
2079
+ "columns": [
2080
+ {
2081
+ "expression": "parent_conversation_id",
2082
+ "isExpression": false,
2083
+ "asc": true,
2084
+ "nulls": "last"
2085
+ }
2086
+ ],
2087
+ "isUnique": false,
2088
+ "with": {},
2089
+ "method": "btree",
2090
+ "concurrently": false
2091
+ },
2092
+ "junior_conversations_root_idx": {
2093
+ "name": "junior_conversations_root_idx",
2094
+ "columns": [
2095
+ {
2096
+ "expression": "root_conversation_id",
2097
+ "isExpression": false,
2098
+ "asc": true,
2099
+ "nulls": "last"
2100
+ }
2101
+ ],
2102
+ "isUnique": false,
2103
+ "with": {},
2104
+ "method": "btree",
2105
+ "concurrently": false
2106
+ }
2107
+ },
2108
+ "foreignKeys": {
2109
+ "junior_conversations_destination_id_junior_destinations_id_fk": {
2110
+ "name": "junior_conversations_destination_id_junior_destinations_id_fk",
2111
+ "tableFrom": "junior_conversations",
2112
+ "columnsFrom": ["destination_id"],
2113
+ "tableTo": "junior_destinations",
2114
+ "columnsTo": ["id"],
2115
+ "onUpdate": "no action",
2116
+ "onDelete": "no action"
2117
+ },
2118
+ "junior_conversations_actor_identity_id_junior_identities_id_fk": {
2119
+ "name": "junior_conversations_actor_identity_id_junior_identities_id_fk",
2120
+ "tableFrom": "junior_conversations",
2121
+ "columnsFrom": ["actor_identity_id"],
2122
+ "tableTo": "junior_identities",
2123
+ "columnsTo": ["id"],
2124
+ "onUpdate": "no action",
2125
+ "onDelete": "no action"
2126
+ },
2127
+ "junior_conversations_creator_identity_id_junior_identities_id_fk": {
2128
+ "name": "junior_conversations_creator_identity_id_junior_identities_id_fk",
2129
+ "tableFrom": "junior_conversations",
2130
+ "columnsFrom": ["creator_identity_id"],
2131
+ "tableTo": "junior_identities",
2132
+ "columnsTo": ["id"],
2133
+ "onUpdate": "no action",
2134
+ "onDelete": "no action"
2135
+ },
2136
+ "junior_conversations_credential_subject_identity_id_junior_identities_id_fk": {
2137
+ "name": "junior_conversations_credential_subject_identity_id_junior_identities_id_fk",
2138
+ "tableFrom": "junior_conversations",
2139
+ "columnsFrom": ["credential_subject_identity_id"],
2140
+ "tableTo": "junior_identities",
2141
+ "columnsTo": ["id"],
2142
+ "onUpdate": "no action",
2143
+ "onDelete": "no action"
2144
+ },
2145
+ "junior_conversations_parent_conversation_id_junior_conversations_conversation_id_fk": {
2146
+ "name": "junior_conversations_parent_conversation_id_junior_conversations_conversation_id_fk",
2147
+ "tableFrom": "junior_conversations",
2148
+ "columnsFrom": ["parent_conversation_id"],
2149
+ "tableTo": "junior_conversations",
2150
+ "columnsTo": ["conversation_id"],
2151
+ "onUpdate": "no action",
2152
+ "onDelete": "no action"
2153
+ },
2154
+ "junior_conversations_root_conversation_id_junior_conversations_conversation_id_fk": {
2155
+ "name": "junior_conversations_root_conversation_id_junior_conversations_conversation_id_fk",
2156
+ "tableFrom": "junior_conversations",
2157
+ "columnsFrom": ["root_conversation_id"],
2158
+ "tableTo": "junior_conversations",
2159
+ "columnsTo": ["conversation_id"],
2160
+ "onUpdate": "no action",
2161
+ "onDelete": "no action"
2162
+ }
2163
+ },
2164
+ "compositePrimaryKeys": {},
2165
+ "uniqueConstraints": {},
2166
+ "policies": {},
2167
+ "checkConstraints": {},
2168
+ "isRLSEnabled": false
2169
+ },
2170
+ "public.junior_destinations": {
2171
+ "name": "junior_destinations",
2172
+ "schema": "",
2173
+ "columns": {
2174
+ "id": {
2175
+ "name": "id",
2176
+ "type": "text",
2177
+ "primaryKey": true,
2178
+ "notNull": true
2179
+ },
2180
+ "provider": {
2181
+ "name": "provider",
2182
+ "type": "text",
2183
+ "primaryKey": false,
2184
+ "notNull": true
2185
+ },
2186
+ "provider_tenant_id": {
2187
+ "name": "provider_tenant_id",
2188
+ "type": "text",
2189
+ "primaryKey": false,
2190
+ "notNull": true,
2191
+ "default": "''"
2192
+ },
2193
+ "provider_destination_id": {
2194
+ "name": "provider_destination_id",
2195
+ "type": "text",
2196
+ "primaryKey": false,
2197
+ "notNull": true
2198
+ },
2199
+ "kind": {
2200
+ "name": "kind",
2201
+ "type": "text",
2202
+ "primaryKey": false,
2203
+ "notNull": true
2204
+ },
2205
+ "parent_destination_id": {
2206
+ "name": "parent_destination_id",
2207
+ "type": "text",
2208
+ "primaryKey": false,
2209
+ "notNull": false
2210
+ },
2211
+ "display_name": {
2212
+ "name": "display_name",
2213
+ "type": "text",
2214
+ "primaryKey": false,
2215
+ "notNull": false
2216
+ },
2217
+ "visibility": {
2218
+ "name": "visibility",
2219
+ "type": "text",
2220
+ "primaryKey": false,
2221
+ "notNull": true,
2222
+ "default": "'unknown'"
2223
+ },
2224
+ "metadata_json": {
2225
+ "name": "metadata_json",
2226
+ "type": "jsonb",
2227
+ "primaryKey": false,
2228
+ "notNull": false
2229
+ },
2230
+ "created_at": {
2231
+ "name": "created_at",
2232
+ "type": "timestamp with time zone",
2233
+ "primaryKey": false,
2234
+ "notNull": true
2235
+ },
2236
+ "updated_at": {
2237
+ "name": "updated_at",
2238
+ "type": "timestamp with time zone",
2239
+ "primaryKey": false,
2240
+ "notNull": true
2241
+ }
2242
+ },
2243
+ "indexes": {
2244
+ "junior_destinations_provider_destination_uidx": {
2245
+ "name": "junior_destinations_provider_destination_uidx",
2246
+ "columns": [
2247
+ {
2248
+ "expression": "provider",
2249
+ "isExpression": false,
2250
+ "asc": true,
2251
+ "nulls": "last"
2252
+ },
2253
+ {
2254
+ "expression": "provider_tenant_id",
2255
+ "isExpression": false,
2256
+ "asc": true,
2257
+ "nulls": "last"
2258
+ },
2259
+ {
2260
+ "expression": "provider_destination_id",
2261
+ "isExpression": false,
2262
+ "asc": true,
2263
+ "nulls": "last"
2264
+ }
2265
+ ],
2266
+ "isUnique": true,
2267
+ "with": {},
2268
+ "method": "btree",
2269
+ "concurrently": false
2270
+ },
2271
+ "junior_destinations_provider_kind_idx": {
2272
+ "name": "junior_destinations_provider_kind_idx",
2273
+ "columns": [
2274
+ {
2275
+ "expression": "provider",
2276
+ "isExpression": false,
2277
+ "asc": true,
2278
+ "nulls": "last"
2279
+ },
2280
+ {
2281
+ "expression": "kind",
2282
+ "isExpression": false,
2283
+ "asc": true,
2284
+ "nulls": "last"
2285
+ }
2286
+ ],
2287
+ "isUnique": false,
2288
+ "with": {},
2289
+ "method": "btree",
2290
+ "concurrently": false
2291
+ }
2292
+ },
2293
+ "foreignKeys": {},
2294
+ "compositePrimaryKeys": {},
2295
+ "uniqueConstraints": {},
2296
+ "policies": {},
2297
+ "checkConstraints": {},
2298
+ "isRLSEnabled": false
2299
+ },
2300
+ "public.junior_event_tasks": {
2301
+ "name": "junior_event_tasks",
2302
+ "schema": "",
2303
+ "columns": {
2304
+ "id": {
2305
+ "name": "id",
2306
+ "type": "text",
2307
+ "primaryKey": true,
2308
+ "notNull": true
2309
+ },
2310
+ "team_id": {
2311
+ "name": "team_id",
2312
+ "type": "text",
2313
+ "primaryKey": false,
2314
+ "notNull": true
2315
+ },
2316
+ "namespace": {
2317
+ "name": "namespace",
2318
+ "type": "text",
2319
+ "primaryKey": false,
2320
+ "notNull": true
2321
+ },
2322
+ "identifier": {
2323
+ "name": "identifier",
2324
+ "type": "text",
2325
+ "primaryKey": false,
2326
+ "notNull": true
2327
+ },
2328
+ "created_at_ms": {
2329
+ "name": "created_at_ms",
2330
+ "type": "bigint",
2331
+ "primaryKey": false,
2332
+ "notNull": true
2333
+ },
2334
+ "status": {
2335
+ "name": "status",
2336
+ "type": "text",
2337
+ "primaryKey": false,
2338
+ "notNull": true,
2339
+ "default": "'active'"
2340
+ },
2341
+ "title": {
2342
+ "name": "title",
2343
+ "type": "text",
2344
+ "primaryKey": false,
2345
+ "notNull": false
2346
+ },
2347
+ "task_json": {
2348
+ "name": "task_json",
2349
+ "type": "jsonb",
2350
+ "primaryKey": false,
2351
+ "notNull": true
2352
+ }
2353
+ },
2354
+ "indexes": {
2355
+ "junior_event_tasks_team_idx": {
2356
+ "name": "junior_event_tasks_team_idx",
2357
+ "columns": [
2358
+ {
2359
+ "expression": "team_id",
2360
+ "isExpression": false,
2361
+ "asc": true,
2362
+ "nulls": "last"
2363
+ },
2364
+ {
2365
+ "expression": "created_at_ms",
2366
+ "isExpression": false,
2367
+ "asc": true,
2368
+ "nulls": "last"
2369
+ },
2370
+ {
2371
+ "expression": "id",
2372
+ "isExpression": false,
2373
+ "asc": true,
2374
+ "nulls": "last"
2375
+ }
2376
+ ],
2377
+ "isUnique": false,
2378
+ "with": {},
2379
+ "method": "btree",
2380
+ "where": "\"junior_event_tasks\".\"status\" <> 'deleted'",
2381
+ "concurrently": false
2382
+ },
2383
+ "junior_event_tasks_match_idx": {
2384
+ "name": "junior_event_tasks_match_idx",
2385
+ "columns": [
2386
+ {
2387
+ "expression": "namespace",
2388
+ "isExpression": false,
2389
+ "asc": true,
2390
+ "nulls": "last"
2391
+ },
2392
+ {
2393
+ "expression": "identifier",
2394
+ "isExpression": false,
2395
+ "asc": true,
2396
+ "nulls": "last"
2397
+ },
2398
+ {
2399
+ "expression": "created_at_ms",
2400
+ "isExpression": false,
2401
+ "asc": true,
2402
+ "nulls": "last"
2403
+ },
2404
+ {
2405
+ "expression": "id",
2406
+ "isExpression": false,
2407
+ "asc": true,
2408
+ "nulls": "last"
2409
+ }
2410
+ ],
2411
+ "isUnique": false,
2412
+ "with": {},
2413
+ "method": "btree",
2414
+ "where": "\"junior_event_tasks\".\"status\" <> 'deleted'",
2415
+ "concurrently": false
2416
+ }
2417
+ },
2418
+ "foreignKeys": {},
2419
+ "compositePrimaryKeys": {},
2420
+ "uniqueConstraints": {},
2421
+ "policies": {},
2422
+ "checkConstraints": {},
2423
+ "isRLSEnabled": false
2424
+ },
2425
+ "public.junior_identities": {
2426
+ "name": "junior_identities",
2427
+ "schema": "",
2428
+ "columns": {
2429
+ "id": {
2430
+ "name": "id",
2431
+ "type": "text",
2432
+ "primaryKey": true,
2433
+ "notNull": true
2434
+ },
2435
+ "kind": {
2436
+ "name": "kind",
2437
+ "type": "text",
2438
+ "primaryKey": false,
2439
+ "notNull": true
2440
+ },
2441
+ "provider": {
2442
+ "name": "provider",
2443
+ "type": "text",
2444
+ "primaryKey": false,
2445
+ "notNull": true
2446
+ },
2447
+ "provider_tenant_id": {
2448
+ "name": "provider_tenant_id",
2449
+ "type": "text",
2450
+ "primaryKey": false,
2451
+ "notNull": true,
2452
+ "default": "''"
2453
+ },
2454
+ "provider_subject_id": {
2455
+ "name": "provider_subject_id",
2456
+ "type": "text",
2457
+ "primaryKey": false,
2458
+ "notNull": true
2459
+ },
2460
+ "display_name": {
2461
+ "name": "display_name",
2462
+ "type": "text",
2463
+ "primaryKey": false,
2464
+ "notNull": false
2465
+ },
2466
+ "handle": {
2467
+ "name": "handle",
2468
+ "type": "text",
2469
+ "primaryKey": false,
2470
+ "notNull": false
2471
+ },
2472
+ "email": {
2473
+ "name": "email",
2474
+ "type": "text",
2475
+ "primaryKey": false,
2476
+ "notNull": false
2477
+ },
2478
+ "avatar_url": {
2479
+ "name": "avatar_url",
2480
+ "type": "text",
2481
+ "primaryKey": false,
2482
+ "notNull": false
2483
+ },
2484
+ "metadata_json": {
2485
+ "name": "metadata_json",
2486
+ "type": "jsonb",
2487
+ "primaryKey": false,
2488
+ "notNull": false
2489
+ },
2490
+ "created_at": {
2491
+ "name": "created_at",
2492
+ "type": "timestamp with time zone",
2493
+ "primaryKey": false,
2494
+ "notNull": true
2495
+ },
2496
+ "updated_at": {
2497
+ "name": "updated_at",
2498
+ "type": "timestamp with time zone",
2499
+ "primaryKey": false,
2500
+ "notNull": true
2501
+ },
2502
+ "user_id": {
2503
+ "name": "user_id",
2504
+ "type": "text",
2505
+ "primaryKey": false,
2506
+ "notNull": false
2507
+ },
2508
+ "email_normalized": {
2509
+ "name": "email_normalized",
2510
+ "type": "text",
2511
+ "primaryKey": false,
2512
+ "notNull": false
2513
+ },
2514
+ "email_verified": {
2515
+ "name": "email_verified",
2516
+ "type": "boolean",
2517
+ "primaryKey": false,
2518
+ "notNull": true,
2519
+ "default": false
2520
+ }
2521
+ },
2522
+ "indexes": {
2523
+ "junior_identities_provider_subject_uidx": {
2524
+ "name": "junior_identities_provider_subject_uidx",
2525
+ "columns": [
2526
+ {
2527
+ "expression": "provider",
2528
+ "isExpression": false,
2529
+ "asc": true,
2530
+ "nulls": "last"
2531
+ },
2532
+ {
2533
+ "expression": "provider_tenant_id",
2534
+ "isExpression": false,
2535
+ "asc": true,
2536
+ "nulls": "last"
2537
+ },
2538
+ {
2539
+ "expression": "provider_subject_id",
2540
+ "isExpression": false,
2541
+ "asc": true,
2542
+ "nulls": "last"
2543
+ }
2544
+ ],
2545
+ "isUnique": true,
2546
+ "with": {},
2547
+ "method": "btree",
2548
+ "concurrently": false
2549
+ },
2550
+ "junior_identities_user_idx": {
2551
+ "name": "junior_identities_user_idx",
2552
+ "columns": [
2553
+ {
2554
+ "expression": "user_id",
2555
+ "isExpression": false,
2556
+ "asc": true,
2557
+ "nulls": "last"
2558
+ }
2559
+ ],
2560
+ "isUnique": false,
2561
+ "with": {},
2562
+ "method": "btree",
2563
+ "concurrently": false
2564
+ },
2565
+ "junior_identities_verified_email_idx": {
2566
+ "name": "junior_identities_verified_email_idx",
2567
+ "columns": [
2568
+ {
2569
+ "expression": "email_normalized",
2570
+ "isExpression": false,
2571
+ "asc": true,
2572
+ "nulls": "last"
2573
+ }
2574
+ ],
2575
+ "isUnique": false,
2576
+ "with": {},
2577
+ "method": "btree",
2578
+ "where": "\"junior_identities\".\"email_verified\" = true AND \"junior_identities\".\"email_normalized\" IS NOT NULL",
2579
+ "concurrently": false
2580
+ },
2581
+ "junior_identities_kind_provider_idx": {
2582
+ "name": "junior_identities_kind_provider_idx",
2583
+ "columns": [
2584
+ {
2585
+ "expression": "kind",
2586
+ "isExpression": false,
2587
+ "asc": true,
2588
+ "nulls": "last"
2589
+ },
2590
+ {
2591
+ "expression": "provider",
2592
+ "isExpression": false,
2593
+ "asc": true,
2594
+ "nulls": "last"
2595
+ }
2596
+ ],
2597
+ "isUnique": false,
2598
+ "with": {},
2599
+ "method": "btree",
2600
+ "concurrently": false
2601
+ }
2602
+ },
2603
+ "foreignKeys": {
2604
+ "junior_identities_user_id_junior_users_id_fk": {
2605
+ "name": "junior_identities_user_id_junior_users_id_fk",
2606
+ "tableFrom": "junior_identities",
2607
+ "columnsFrom": ["user_id"],
2608
+ "tableTo": "junior_users",
2609
+ "columnsTo": ["id"],
2610
+ "onUpdate": "no action",
2611
+ "onDelete": "no action"
2612
+ }
2613
+ },
2614
+ "compositePrimaryKeys": {},
2615
+ "uniqueConstraints": {},
2616
+ "policies": {},
2617
+ "checkConstraints": {},
2618
+ "isRLSEnabled": false
2619
+ },
2620
+ "public.junior_location_configurations": {
2621
+ "name": "junior_location_configurations",
2622
+ "schema": "",
2623
+ "columns": {
2624
+ "location_id": {
2625
+ "name": "location_id",
2626
+ "type": "text",
2627
+ "primaryKey": false,
2628
+ "notNull": true
2629
+ },
2630
+ "key": {
2631
+ "name": "key",
2632
+ "type": "text",
2633
+ "primaryKey": false,
2634
+ "notNull": true
2635
+ },
2636
+ "value": {
2637
+ "name": "value",
2638
+ "type": "text",
2639
+ "primaryKey": false,
2640
+ "notNull": true
2641
+ },
2642
+ "updated_at": {
2643
+ "name": "updated_at",
2644
+ "type": "timestamp with time zone",
2645
+ "primaryKey": false,
2646
+ "notNull": true
2647
+ },
2648
+ "updated_by": {
2649
+ "name": "updated_by",
2650
+ "type": "text",
2651
+ "primaryKey": false,
2652
+ "notNull": false
2653
+ },
2654
+ "source": {
2655
+ "name": "source",
2656
+ "type": "text",
2657
+ "primaryKey": false,
2658
+ "notNull": false
2659
+ },
2660
+ "expires_at": {
2661
+ "name": "expires_at",
2662
+ "type": "text",
2663
+ "primaryKey": false,
2664
+ "notNull": false
2665
+ }
2666
+ },
2667
+ "indexes": {},
2668
+ "foreignKeys": {
2669
+ "junior_location_configurations_location_id_junior_destinations_id_fk": {
2670
+ "name": "junior_location_configurations_location_id_junior_destinations_id_fk",
2671
+ "tableFrom": "junior_location_configurations",
2672
+ "columnsFrom": ["location_id"],
2673
+ "tableTo": "junior_destinations",
2674
+ "columnsTo": ["id"],
2675
+ "onUpdate": "no action",
2676
+ "onDelete": "cascade"
2677
+ }
2678
+ },
2679
+ "compositePrimaryKeys": {
2680
+ "junior_location_configurations_location_id_key_pk": {
2681
+ "name": "junior_location_configurations_location_id_key_pk",
2682
+ "columns": ["location_id", "key"]
2683
+ }
2684
+ },
2685
+ "uniqueConstraints": {},
2686
+ "policies": {},
2687
+ "checkConstraints": {},
2688
+ "isRLSEnabled": false
2689
+ },
2690
+ "public.junior_scheduler_runs": {
2691
+ "name": "junior_scheduler_runs",
2692
+ "schema": "",
2693
+ "columns": {
2694
+ "id": {
2695
+ "name": "id",
2696
+ "type": "text",
2697
+ "primaryKey": true,
2698
+ "notNull": true
2699
+ },
2700
+ "task_id": {
2701
+ "name": "task_id",
2702
+ "type": "text",
2703
+ "primaryKey": false,
2704
+ "notNull": true
2705
+ },
2706
+ "status": {
2707
+ "name": "status",
2708
+ "type": "text",
2709
+ "primaryKey": false,
2710
+ "notNull": true
2711
+ },
2712
+ "scheduled_for_ms": {
2713
+ "name": "scheduled_for_ms",
2714
+ "type": "bigint",
2715
+ "primaryKey": false,
2716
+ "notNull": true
2717
+ },
2718
+ "record": {
2719
+ "name": "record",
2720
+ "type": "jsonb",
2721
+ "primaryKey": false,
2722
+ "notNull": true
2723
+ }
2724
+ },
2725
+ "indexes": {
2726
+ "junior_scheduler_runs_task_status_idx": {
2727
+ "name": "junior_scheduler_runs_task_status_idx",
2728
+ "columns": [
2729
+ {
2730
+ "expression": "task_id",
2731
+ "isExpression": false,
2732
+ "asc": true,
2733
+ "nulls": "last"
2734
+ },
2735
+ {
2736
+ "expression": "status",
2737
+ "isExpression": false,
2738
+ "asc": true,
2739
+ "nulls": "last"
2740
+ },
2741
+ {
2742
+ "expression": "scheduled_for_ms",
2743
+ "isExpression": false,
2744
+ "asc": true,
2745
+ "nulls": "last"
2746
+ }
2747
+ ],
2748
+ "isUnique": false,
2749
+ "with": {},
2750
+ "method": "btree",
2751
+ "concurrently": false
2752
+ },
2753
+ "junior_scheduler_runs_status_idx": {
2754
+ "name": "junior_scheduler_runs_status_idx",
2755
+ "columns": [
2756
+ {
2757
+ "expression": "status",
2758
+ "isExpression": false,
2759
+ "asc": true,
2760
+ "nulls": "last"
2761
+ },
2762
+ {
2763
+ "expression": "scheduled_for_ms",
2764
+ "isExpression": false,
2765
+ "asc": true,
2766
+ "nulls": "last"
2767
+ }
2768
+ ],
2769
+ "isUnique": false,
2770
+ "with": {},
2771
+ "method": "btree",
2772
+ "concurrently": false
2773
+ }
2774
+ },
2775
+ "foreignKeys": {},
2776
+ "compositePrimaryKeys": {},
2777
+ "uniqueConstraints": {},
2778
+ "policies": {},
2779
+ "checkConstraints": {},
2780
+ "isRLSEnabled": false
2781
+ },
2782
+ "public.junior_scheduler_tasks": {
2783
+ "name": "junior_scheduler_tasks",
2784
+ "schema": "",
2785
+ "columns": {
2786
+ "id": {
2787
+ "name": "id",
2788
+ "type": "text",
2789
+ "primaryKey": true,
2790
+ "notNull": true
2791
+ },
2792
+ "team_id": {
2793
+ "name": "team_id",
2794
+ "type": "text",
2795
+ "primaryKey": false,
2796
+ "notNull": true
2797
+ },
2798
+ "creator_slack_user_id": {
2799
+ "name": "creator_slack_user_id",
2800
+ "type": "text",
2801
+ "primaryKey": false,
2802
+ "notNull": false
2803
+ },
2804
+ "creator_identity_id": {
2805
+ "name": "creator_identity_id",
2806
+ "type": "text",
2807
+ "primaryKey": false,
2808
+ "notNull": false
2809
+ },
2810
+ "status": {
2811
+ "name": "status",
2812
+ "type": "text",
2813
+ "primaryKey": false,
2814
+ "notNull": true
2815
+ },
2816
+ "next_run_at_ms": {
2817
+ "name": "next_run_at_ms",
2818
+ "type": "bigint",
2819
+ "primaryKey": false,
2820
+ "notNull": false
2821
+ },
2822
+ "run_now_at_ms": {
2823
+ "name": "run_now_at_ms",
2824
+ "type": "bigint",
2825
+ "primaryKey": false,
2826
+ "notNull": false
2827
+ },
2828
+ "created_at_ms": {
2829
+ "name": "created_at_ms",
2830
+ "type": "bigint",
2831
+ "primaryKey": false,
2832
+ "notNull": true
2833
+ },
2834
+ "title": {
2835
+ "name": "title",
2836
+ "type": "text",
2837
+ "primaryKey": false,
2838
+ "notNull": false
2839
+ },
2840
+ "record": {
2841
+ "name": "record",
2842
+ "type": "jsonb",
2843
+ "primaryKey": false,
2844
+ "notNull": true
2845
+ }
2846
+ },
2847
+ "indexes": {
2848
+ "junior_scheduler_tasks_creator_idx": {
2849
+ "name": "junior_scheduler_tasks_creator_idx",
2850
+ "columns": [
2851
+ {
2852
+ "expression": "team_id",
2853
+ "isExpression": false,
2854
+ "asc": true,
2855
+ "nulls": "last"
2856
+ },
2857
+ {
2858
+ "expression": "creator_slack_user_id",
2859
+ "isExpression": false,
2860
+ "asc": true,
2861
+ "nulls": "last"
2862
+ },
2863
+ {
2864
+ "expression": "created_at_ms",
2865
+ "isExpression": false,
2866
+ "asc": true,
2867
+ "nulls": "last"
2868
+ },
2869
+ {
2870
+ "expression": "id",
2871
+ "isExpression": false,
2872
+ "asc": true,
2873
+ "nulls": "last"
2874
+ }
2875
+ ],
2876
+ "isUnique": false,
2877
+ "with": {},
2878
+ "method": "btree",
2879
+ "where": "\"junior_scheduler_tasks\".\"status\" <> 'deleted'",
2880
+ "concurrently": false
2881
+ },
2882
+ "junior_scheduler_tasks_creator_identity_idx": {
2883
+ "name": "junior_scheduler_tasks_creator_identity_idx",
2884
+ "columns": [
2885
+ {
2886
+ "expression": "creator_identity_id",
2887
+ "isExpression": false,
2888
+ "asc": true,
2889
+ "nulls": "last"
2890
+ },
2891
+ {
2892
+ "expression": "created_at_ms",
2893
+ "isExpression": false,
2894
+ "asc": true,
2895
+ "nulls": "last"
2896
+ },
2897
+ {
2898
+ "expression": "id",
2899
+ "isExpression": false,
2900
+ "asc": true,
2901
+ "nulls": "last"
2902
+ }
2903
+ ],
2904
+ "isUnique": false,
2905
+ "with": {},
2906
+ "method": "btree",
2907
+ "where": "\"junior_scheduler_tasks\".\"status\" <> 'deleted' AND \"junior_scheduler_tasks\".\"creator_identity_id\" IS NOT NULL",
2908
+ "concurrently": false
2909
+ },
2910
+ "junior_scheduler_tasks_team_status_idx": {
2911
+ "name": "junior_scheduler_tasks_team_status_idx",
2912
+ "columns": [
2913
+ {
2914
+ "expression": "team_id",
2915
+ "isExpression": false,
2916
+ "asc": true,
2917
+ "nulls": "last"
2918
+ },
2919
+ {
2920
+ "expression": "created_at_ms",
2921
+ "isExpression": false,
2922
+ "asc": true,
2923
+ "nulls": "last"
2924
+ },
2925
+ {
2926
+ "expression": "id",
2927
+ "isExpression": false,
2928
+ "asc": true,
2929
+ "nulls": "last"
2930
+ }
2931
+ ],
2932
+ "isUnique": false,
2933
+ "with": {},
2934
+ "method": "btree",
2935
+ "where": "\"junior_scheduler_tasks\".\"status\" <> 'deleted'",
2936
+ "concurrently": false
2937
+ },
2938
+ "junior_scheduler_tasks_run_now_due_idx": {
2939
+ "name": "junior_scheduler_tasks_run_now_due_idx",
2940
+ "columns": [
2941
+ {
2942
+ "expression": "run_now_at_ms",
2943
+ "isExpression": false,
2944
+ "asc": true,
2945
+ "nulls": "last"
2946
+ },
2947
+ {
2948
+ "expression": "created_at_ms",
2949
+ "isExpression": false,
2950
+ "asc": true,
2951
+ "nulls": "last"
2952
+ },
2953
+ {
2954
+ "expression": "id",
2955
+ "isExpression": false,
2956
+ "asc": true,
2957
+ "nulls": "last"
2958
+ }
2959
+ ],
2960
+ "isUnique": false,
2961
+ "with": {},
2962
+ "method": "btree",
2963
+ "where": "\"junior_scheduler_tasks\".\"status\" = 'active' AND \"junior_scheduler_tasks\".\"run_now_at_ms\" IS NOT NULL",
2964
+ "concurrently": false
2965
+ },
2966
+ "junior_scheduler_tasks_next_run_due_idx": {
2967
+ "name": "junior_scheduler_tasks_next_run_due_idx",
2968
+ "columns": [
2969
+ {
2970
+ "expression": "next_run_at_ms",
2971
+ "isExpression": false,
2972
+ "asc": true,
2973
+ "nulls": "last"
2974
+ },
2975
+ {
2976
+ "expression": "created_at_ms",
2977
+ "isExpression": false,
2978
+ "asc": true,
2979
+ "nulls": "last"
2980
+ },
2981
+ {
2982
+ "expression": "id",
2983
+ "isExpression": false,
2984
+ "asc": true,
2985
+ "nulls": "last"
2986
+ }
2987
+ ],
2988
+ "isUnique": false,
2989
+ "with": {},
2990
+ "method": "btree",
2991
+ "where": "\"junior_scheduler_tasks\".\"status\" = 'active' AND \"junior_scheduler_tasks\".\"next_run_at_ms\" IS NOT NULL",
2992
+ "concurrently": false
2993
+ }
2994
+ },
2995
+ "foreignKeys": {},
2996
+ "compositePrimaryKeys": {},
2997
+ "uniqueConstraints": {},
2998
+ "policies": {},
2999
+ "checkConstraints": {},
3000
+ "isRLSEnabled": false
3001
+ },
3002
+ "public.junior_snapshots": {
3003
+ "name": "junior_snapshots",
3004
+ "schema": "",
3005
+ "columns": {
3006
+ "id": {
3007
+ "name": "id",
3008
+ "type": "text",
3009
+ "primaryKey": true,
3010
+ "notNull": true
3011
+ },
3012
+ "workspace_id": {
3013
+ "name": "workspace_id",
3014
+ "type": "text",
3015
+ "primaryKey": false,
3016
+ "notNull": true
3017
+ },
3018
+ "profile_hash": {
3019
+ "name": "profile_hash",
3020
+ "type": "text",
3021
+ "primaryKey": false,
3022
+ "notNull": true
3023
+ },
3024
+ "status": {
3025
+ "name": "status",
3026
+ "type": "text",
3027
+ "primaryKey": false,
3028
+ "notNull": true
3029
+ },
3030
+ "snapshot_id": {
3031
+ "name": "snapshot_id",
3032
+ "type": "text",
3033
+ "primaryKey": false,
3034
+ "notNull": false
3035
+ },
3036
+ "build_duration_ms": {
3037
+ "name": "build_duration_ms",
3038
+ "type": "integer",
3039
+ "primaryKey": false,
3040
+ "notNull": false
3041
+ },
3042
+ "size_bytes": {
3043
+ "name": "size_bytes",
3044
+ "type": "bigint",
3045
+ "primaryKey": false,
3046
+ "notNull": false
3047
+ },
3048
+ "generated_at": {
3049
+ "name": "generated_at",
3050
+ "type": "timestamp with time zone",
3051
+ "primaryKey": false,
3052
+ "notNull": false
3053
+ },
3054
+ "build_started_at": {
3055
+ "name": "build_started_at",
3056
+ "type": "timestamp with time zone",
3057
+ "primaryKey": false,
3058
+ "notNull": false
3059
+ },
3060
+ "build_phase": {
3061
+ "name": "build_phase",
3062
+ "type": "text",
3063
+ "primaryKey": false,
3064
+ "notNull": false
3065
+ },
3066
+ "build_sandbox_name": {
3067
+ "name": "build_sandbox_name",
3068
+ "type": "text",
3069
+ "primaryKey": false,
3070
+ "notNull": false
3071
+ },
3072
+ "build_command_id": {
3073
+ "name": "build_command_id",
3074
+ "type": "text",
3075
+ "primaryKey": false,
3076
+ "notNull": false
3077
+ },
3078
+ "build_error": {
3079
+ "name": "build_error",
3080
+ "type": "text",
3081
+ "primaryKey": false,
3082
+ "notNull": false
3083
+ },
3084
+ "created_at": {
3085
+ "name": "created_at",
3086
+ "type": "timestamp with time zone",
3087
+ "primaryKey": false,
3088
+ "notNull": true
3089
+ },
3090
+ "updated_at": {
3091
+ "name": "updated_at",
3092
+ "type": "timestamp with time zone",
3093
+ "primaryKey": false,
3094
+ "notNull": true
3095
+ }
3096
+ },
3097
+ "indexes": {
3098
+ "junior_snapshots_snapshot_id_uidx": {
3099
+ "name": "junior_snapshots_snapshot_id_uidx",
3100
+ "columns": [
3101
+ {
3102
+ "expression": "snapshot_id",
3103
+ "isExpression": false,
3104
+ "asc": true,
3105
+ "nulls": "last"
3106
+ }
3107
+ ],
3108
+ "isUnique": true,
3109
+ "with": {},
3110
+ "method": "btree",
3111
+ "concurrently": false
3112
+ },
3113
+ "junior_snapshots_workspace_idx": {
3114
+ "name": "junior_snapshots_workspace_idx",
3115
+ "columns": [
3116
+ {
3117
+ "expression": "workspace_id",
3118
+ "isExpression": false,
3119
+ "asc": true,
3120
+ "nulls": "last"
3121
+ }
3122
+ ],
3123
+ "isUnique": false,
3124
+ "with": {},
3125
+ "method": "btree",
3126
+ "concurrently": false
3127
+ },
3128
+ "junior_snapshots_workspace_profile_status_idx": {
3129
+ "name": "junior_snapshots_workspace_profile_status_idx",
3130
+ "columns": [
3131
+ {
3132
+ "expression": "workspace_id",
3133
+ "isExpression": false,
3134
+ "asc": true,
3135
+ "nulls": "last"
3136
+ },
3137
+ {
3138
+ "expression": "profile_hash",
3139
+ "isExpression": false,
3140
+ "asc": true,
3141
+ "nulls": "last"
3142
+ },
3143
+ {
3144
+ "expression": "status",
3145
+ "isExpression": false,
3146
+ "asc": true,
3147
+ "nulls": "last"
3148
+ }
3149
+ ],
3150
+ "isUnique": false,
3151
+ "with": {},
3152
+ "method": "btree",
3153
+ "concurrently": false
3154
+ },
3155
+ "junior_snapshots_active_build_uidx": {
3156
+ "name": "junior_snapshots_active_build_uidx",
3157
+ "columns": [
3158
+ {
3159
+ "expression": "workspace_id",
3160
+ "isExpression": false,
3161
+ "asc": true,
3162
+ "nulls": "last"
3163
+ },
3164
+ {
3165
+ "expression": "profile_hash",
3166
+ "isExpression": false,
3167
+ "asc": true,
3168
+ "nulls": "last"
3169
+ }
3170
+ ],
3171
+ "isUnique": true,
3172
+ "with": {},
3173
+ "method": "btree",
3174
+ "where": "\"junior_snapshots\".\"status\" = 'building'",
3175
+ "concurrently": false
3176
+ },
3177
+ "junior_snapshots_workspace_status_idx": {
3178
+ "name": "junior_snapshots_workspace_status_idx",
3179
+ "columns": [
3180
+ {
3181
+ "expression": "workspace_id",
3182
+ "isExpression": false,
3183
+ "asc": true,
3184
+ "nulls": "last"
3185
+ },
3186
+ {
3187
+ "expression": "status",
3188
+ "isExpression": false,
3189
+ "asc": true,
3190
+ "nulls": "last"
3191
+ }
3192
+ ],
3193
+ "isUnique": false,
3194
+ "with": {},
3195
+ "method": "btree",
3196
+ "concurrently": false
3197
+ }
3198
+ },
3199
+ "foreignKeys": {
3200
+ "junior_snapshots_workspace_id_junior_workspaces_id_fk": {
3201
+ "name": "junior_snapshots_workspace_id_junior_workspaces_id_fk",
3202
+ "tableFrom": "junior_snapshots",
3203
+ "columnsFrom": ["workspace_id"],
3204
+ "tableTo": "junior_workspaces",
3205
+ "columnsTo": ["id"],
3206
+ "onUpdate": "no action",
3207
+ "onDelete": "cascade"
3208
+ }
3209
+ },
3210
+ "compositePrimaryKeys": {},
3211
+ "uniqueConstraints": {},
3212
+ "policies": {},
3213
+ "checkConstraints": {
3214
+ "junior_snapshots_status_check": {
3215
+ "name": "junior_snapshots_status_check",
3216
+ "value": "\"junior_snapshots\".\"status\" in ('building', 'failed', 'ready')"
3217
+ },
3218
+ "junior_snapshots_build_phase_check": {
3219
+ "name": "junior_snapshots_build_phase_check",
3220
+ "value": "\"junior_snapshots\".\"build_phase\" is null or \"junior_snapshots\".\"build_phase\" in ('created', 'dependencies_installed', 'repositories_prepared')"
3221
+ },
3222
+ "junior_snapshots_ready_fields_check": {
3223
+ "name": "junior_snapshots_ready_fields_check",
3224
+ "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)"
3225
+ },
3226
+ "junior_snapshots_build_fields_check": {
3227
+ "name": "junior_snapshots_build_fields_check",
3228
+ "value": "\"junior_snapshots\".\"status\" = 'ready' or (\"junior_snapshots\".\"build_started_at\" is not null and \"junior_snapshots\".\"build_phase\" is not null)"
3229
+ },
3230
+ "junior_snapshots_build_duration_check": {
3231
+ "name": "junior_snapshots_build_duration_check",
3232
+ "value": "\"junior_snapshots\".\"build_duration_ms\" is null or \"junior_snapshots\".\"build_duration_ms\" >= 0"
3233
+ },
3234
+ "junior_snapshots_size_bytes_check": {
3235
+ "name": "junior_snapshots_size_bytes_check",
3236
+ "value": "\"junior_snapshots\".\"size_bytes\" is null or \"junior_snapshots\".\"size_bytes\" >= 0"
3237
+ }
3238
+ },
3239
+ "isRLSEnabled": false
3240
+ },
3241
+ "public.junior_stats": {
3242
+ "name": "junior_stats",
3243
+ "schema": "",
3244
+ "columns": {
3245
+ "date": {
3246
+ "name": "date",
3247
+ "type": "date",
3248
+ "primaryKey": false,
3249
+ "notNull": true
3250
+ },
3251
+ "namespace": {
3252
+ "name": "namespace",
3253
+ "type": "text",
3254
+ "primaryKey": false,
3255
+ "notNull": true
3256
+ },
3257
+ "metric": {
3258
+ "name": "metric",
3259
+ "type": "text",
3260
+ "primaryKey": false,
3261
+ "notNull": true
3262
+ },
3263
+ "name": {
3264
+ "name": "name",
3265
+ "type": "text",
3266
+ "primaryKey": false,
3267
+ "notNull": true
3268
+ },
3269
+ "count": {
3270
+ "name": "count",
3271
+ "type": "integer",
3272
+ "primaryKey": false,
3273
+ "notNull": true,
3274
+ "default": 0
3275
+ }
3276
+ },
3277
+ "indexes": {},
3278
+ "foreignKeys": {},
3279
+ "compositePrimaryKeys": {
3280
+ "junior_stats_date_namespace_metric_name_pk": {
3281
+ "name": "junior_stats_date_namespace_metric_name_pk",
3282
+ "columns": ["date", "namespace", "metric", "name"]
3283
+ }
3284
+ },
3285
+ "uniqueConstraints": {},
3286
+ "policies": {},
3287
+ "checkConstraints": {},
3288
+ "isRLSEnabled": false
3289
+ },
3290
+ "public.junior_users": {
3291
+ "name": "junior_users",
3292
+ "schema": "",
3293
+ "columns": {
3294
+ "id": {
3295
+ "name": "id",
3296
+ "type": "text",
3297
+ "primaryKey": true,
3298
+ "notNull": true
3299
+ },
3300
+ "primary_email": {
3301
+ "name": "primary_email",
3302
+ "type": "text",
3303
+ "primaryKey": false,
3304
+ "notNull": true
3305
+ },
3306
+ "primary_email_normalized": {
3307
+ "name": "primary_email_normalized",
3308
+ "type": "text",
3309
+ "primaryKey": false,
3310
+ "notNull": true
3311
+ },
3312
+ "display_name": {
3313
+ "name": "display_name",
3314
+ "type": "text",
3315
+ "primaryKey": false,
3316
+ "notNull": false
3317
+ },
3318
+ "created_at": {
3319
+ "name": "created_at",
3320
+ "type": "timestamp with time zone",
3321
+ "primaryKey": false,
3322
+ "notNull": true
3323
+ },
3324
+ "updated_at": {
3325
+ "name": "updated_at",
3326
+ "type": "timestamp with time zone",
3327
+ "primaryKey": false,
3328
+ "notNull": true
3329
+ }
3330
+ },
3331
+ "indexes": {
3332
+ "junior_users_primary_email_normalized_uidx": {
3333
+ "name": "junior_users_primary_email_normalized_uidx",
3334
+ "columns": [
3335
+ {
3336
+ "expression": "primary_email_normalized",
3337
+ "isExpression": false,
3338
+ "asc": true,
3339
+ "nulls": "last"
3340
+ }
3341
+ ],
3342
+ "isUnique": true,
3343
+ "with": {},
3344
+ "method": "btree",
3345
+ "concurrently": false
3346
+ }
3347
+ },
3348
+ "foreignKeys": {},
3349
+ "compositePrimaryKeys": {},
3350
+ "uniqueConstraints": {},
3351
+ "policies": {},
3352
+ "checkConstraints": {},
3353
+ "isRLSEnabled": false
3354
+ },
3355
+ "public.junior_workspace_repos": {
3356
+ "name": "junior_workspace_repos",
3357
+ "schema": "",
3358
+ "columns": {
3359
+ "workspace_id": {
3360
+ "name": "workspace_id",
3361
+ "type": "text",
3362
+ "primaryKey": false,
3363
+ "notNull": true
3364
+ },
3365
+ "provider": {
3366
+ "name": "provider",
3367
+ "type": "text",
3368
+ "primaryKey": false,
3369
+ "notNull": true
3370
+ },
3371
+ "repo": {
3372
+ "name": "repo",
3373
+ "type": "text",
3374
+ "primaryKey": false,
3375
+ "notNull": true
3376
+ }
3377
+ },
3378
+ "indexes": {},
3379
+ "foreignKeys": {
3380
+ "junior_workspace_repos_workspace_id_junior_workspaces_id_fk": {
3381
+ "name": "junior_workspace_repos_workspace_id_junior_workspaces_id_fk",
3382
+ "tableFrom": "junior_workspace_repos",
3383
+ "columnsFrom": ["workspace_id"],
3384
+ "tableTo": "junior_workspaces",
3385
+ "columnsTo": ["id"],
3386
+ "onUpdate": "no action",
3387
+ "onDelete": "cascade"
3388
+ }
3389
+ },
3390
+ "compositePrimaryKeys": {
3391
+ "junior_workspace_repos_workspace_id_provider_repo_pk": {
3392
+ "name": "junior_workspace_repos_workspace_id_provider_repo_pk",
3393
+ "columns": ["workspace_id", "provider", "repo"]
3394
+ }
3395
+ },
3396
+ "uniqueConstraints": {},
3397
+ "policies": {},
3398
+ "checkConstraints": {},
3399
+ "isRLSEnabled": false
3400
+ },
3401
+ "public.junior_workspaces": {
3402
+ "name": "junior_workspaces",
3403
+ "schema": "",
3404
+ "columns": {
3405
+ "id": {
3406
+ "name": "id",
3407
+ "type": "text",
3408
+ "primaryKey": true,
3409
+ "notNull": true
3410
+ },
3411
+ "name": {
3412
+ "name": "name",
3413
+ "type": "text",
3414
+ "primaryKey": false,
3415
+ "notNull": true
3416
+ },
3417
+ "setup_script": {
3418
+ "name": "setup_script",
3419
+ "type": "text",
3420
+ "primaryKey": false,
3421
+ "notNull": true,
3422
+ "default": "''"
3423
+ },
3424
+ "created_at": {
3425
+ "name": "created_at",
3426
+ "type": "timestamp with time zone",
3427
+ "primaryKey": false,
3428
+ "notNull": true
3429
+ },
3430
+ "updated_at": {
3431
+ "name": "updated_at",
3432
+ "type": "timestamp with time zone",
3433
+ "primaryKey": false,
3434
+ "notNull": true
3435
+ }
3436
+ },
3437
+ "indexes": {
3438
+ "junior_workspaces_name_idx": {
3439
+ "name": "junior_workspaces_name_idx",
3440
+ "columns": [
3441
+ {
3442
+ "expression": "name",
3443
+ "isExpression": false,
3444
+ "asc": true,
3445
+ "nulls": "last"
3446
+ }
3447
+ ],
3448
+ "isUnique": true,
3449
+ "with": {},
3450
+ "method": "btree",
3451
+ "concurrently": false
3452
+ }
3453
+ },
3454
+ "foreignKeys": {},
3455
+ "compositePrimaryKeys": {},
3456
+ "uniqueConstraints": {},
3457
+ "policies": {},
3458
+ "checkConstraints": {},
3459
+ "isRLSEnabled": false
3460
+ }
3461
+ },
3462
+ "enums": {},
3463
+ "schemas": {},
3464
+ "views": {},
3465
+ "sequences": {},
3466
+ "roles": {},
3467
+ "policies": {},
3468
+ "_meta": {
3469
+ "columns": {},
3470
+ "schemas": {},
3471
+ "tables": {}
3472
+ }
3473
+ }