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