@sentry/junior 0.163.0 → 0.165.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 (71) hide show
  1. package/dist/{agent-hooks-6IX5CV7G.js → agent-hooks-GSNL33UA.js} +9 -9
  2. package/dist/api/schema/workspace.d.ts +51 -0
  3. package/dist/api/schema.d.ts +2 -0
  4. package/dist/api/schema.js +15 -3
  5. package/dist/api/workspaces/routes.d.ts +4 -0
  6. package/dist/api.js +171 -27
  7. package/dist/app.js +36 -34
  8. package/dist/{catalog-runtime-NEPZNTOM.js → catalog-runtime-4ERDVI7V.js} +5 -5
  9. package/dist/chat/repository-instructions.d.ts +12 -1
  10. package/dist/chat/sandbox/sandbox.d.ts +1 -1
  11. package/dist/chat/sandbox/snapshot/resolve.d.ts +12 -0
  12. package/dist/chat/sandbox/snapshot/runtime.d.ts +2 -0
  13. package/dist/chat/workspaces/store.d.ts +27 -0
  14. package/dist/chat/workspaces/types.d.ts +0 -1
  15. package/dist/chat/workspaces/validation.d.ts +20 -0
  16. package/dist/{chunk-TPT6EF7K.js → chunk-32CCG4WP.js} +1 -1
  17. package/dist/{chunk-ICJ3KCA2.js → chunk-3V2EIQLT.js} +1 -1
  18. package/dist/{chunk-ZDKTZG3G.js → chunk-5T6WPPEI.js} +1 -1
  19. package/dist/{chunk-ZF6IC27P.js → chunk-5WDDWMQ7.js} +260 -8
  20. package/dist/{chunk-TPDNZCZU.js → chunk-65B3PDY7.js} +1 -1
  21. package/dist/{chunk-2FBPN2Y4.js → chunk-6OWVPXNO.js} +2 -1
  22. package/dist/{chunk-2HBJQEBE.js → chunk-6RZ6MMEK.js} +1 -1
  23. package/dist/{chunk-IIT23D3M.js → chunk-6YXCG2XL.js} +4 -4
  24. package/dist/{chunk-XY2IVIAY.js → chunk-7J26TW64.js} +5 -5
  25. package/dist/{chunk-RK7KPI6G.js → chunk-7S2JVUWS.js} +1 -1
  26. package/dist/{chunk-NL53P7PS.js → chunk-AEBF6AO2.js} +1 -1
  27. package/dist/{chunk-O5ZZL7IR.js → chunk-AQEBOQUC.js} +9 -9
  28. package/dist/{chunk-SA6BEEAB.js → chunk-BEC542E6.js} +111 -74
  29. package/dist/{chunk-THS4CKN4.js → chunk-BEHPIDVZ.js} +5 -4
  30. package/dist/{chunk-BLZUFHM7.js → chunk-DKO4RRGJ.js} +1 -1
  31. package/dist/{chunk-MXFL7LNZ.js → chunk-EA4UL5H2.js} +73 -14
  32. package/dist/{chunk-YAUQXZVT.js → chunk-FMOFCEAA.js} +2 -2
  33. package/dist/{chunk-SR6WRBJW.js → chunk-FNNQCHOL.js} +4 -4
  34. package/dist/{chunk-3OZNFCPR.js → chunk-FXX4NHOM.js} +6 -6
  35. package/dist/{chunk-GCLHNRMU.js → chunk-G72LBEMZ.js} +1 -1
  36. package/dist/{chunk-IX4XI42N.js → chunk-HPWZ4BJJ.js} +72 -120
  37. package/dist/{chunk-FEIHINKR.js → chunk-HZDLOFO4.js} +9 -5
  38. package/dist/{chunk-ATWHPSMF.js → chunk-IZHR2OES.js} +4 -13
  39. package/dist/{chunk-O4IK4O7C.js → chunk-N2BRRIQZ.js} +1 -1
  40. package/dist/{chunk-MWVQ35U6.js → chunk-NPW6LM2X.js} +12 -12
  41. package/dist/{chunk-JI5EPI3O.js → chunk-RQQTOF3H.js} +3 -3
  42. package/dist/{chunk-WPGYWDJR.js → chunk-SA5FVUWJ.js} +6 -6
  43. package/dist/{chunk-KD3ROG6P.js → chunk-T6BAHCT6.js} +17 -17
  44. package/dist/{chunk-4P2XNVTO.js → chunk-TCWPG5VL.js} +2 -2
  45. package/dist/{chunk-EKGJVUVS.js → chunk-VDNNVTX2.js} +5 -5
  46. package/dist/{chunk-RTPJRLOP.js → chunk-XOINKFDJ.js} +7 -7
  47. package/dist/{chunk-3T7RJVDJ.js → chunk-ZUKU2Y3J.js} +1 -1
  48. package/dist/cli/chat.js +29 -29
  49. package/dist/cli/check.js +6 -6
  50. package/dist/cli/plugins.js +12 -12
  51. package/dist/cli/snapshot-create.js +9 -9
  52. package/dist/cli/upgrade.js +7 -7
  53. package/dist/db/schema/workspaces.d.ts +0 -17
  54. package/dist/db/schema.d.ts +0 -17
  55. package/dist/{db-6VBMHVW2.js → db-5TTEPMTY.js} +7 -7
  56. package/dist/instrumentation.js +4 -4
  57. package/dist/nitro.js +2 -2
  58. package/dist/{oauth-callback-server-5NCCUIM2.js → oauth-callback-server-IVFC5YHY.js} +22 -22
  59. package/dist/{runner-6ONEB6TQ.js → runner-G76TSHWO.js} +31 -33
  60. package/dist/{skills-Y5R36UH4.js → skills-F6PSLVSG.js} +6 -6
  61. package/dist/spawn-WMJPIAZL.js +37 -0
  62. package/dist/{validation-HLHEQDEK.js → validation-56EJI6UQ.js} +6 -6
  63. package/dist/version.js +1 -1
  64. package/dist/{work-VIEFYTFG.js → work-RNRQCP3Y.js} +17 -17
  65. package/dist/worker-FBR2WUI4.js +24 -0
  66. package/migrations/0030_drop_workspace_repo_primary.sql +2 -0
  67. package/migrations/meta/0030_snapshot.json +2799 -0
  68. package/migrations/meta/_journal.json +8 -1
  69. package/package.json +6 -5
  70. package/dist/spawn-RFMBQ6B3.js +0 -37
  71. package/dist/worker-MRSKPKQZ.js +0 -24
@@ -0,0 +1,2799 @@
1
+ {
2
+ "id": "cebfdc3d-f6b6-46e5-b6ec-d4498c7b2519",
3
+ "prevId": "7868d07f-46bb-436d-9a71-dd4a34e40435",
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
+ "provider": {
520
+ "name": "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
+ "filename": {
532
+ "name": "filename",
533
+ "type": "text",
534
+ "primaryKey": false,
535
+ "notNull": true
536
+ },
537
+ "content_type": {
538
+ "name": "content_type",
539
+ "type": "text",
540
+ "primaryKey": false,
541
+ "notNull": true
542
+ },
543
+ "bytes": {
544
+ "name": "bytes",
545
+ "type": "integer",
546
+ "primaryKey": false,
547
+ "notNull": true
548
+ },
549
+ "sha256": {
550
+ "name": "sha256",
551
+ "type": "text",
552
+ "primaryKey": false,
553
+ "notNull": true
554
+ },
555
+ "created_at": {
556
+ "name": "created_at",
557
+ "type": "timestamp with time zone",
558
+ "primaryKey": false,
559
+ "notNull": true
560
+ },
561
+ "delete_requested_at": {
562
+ "name": "delete_requested_at",
563
+ "type": "timestamp with time zone",
564
+ "primaryKey": false,
565
+ "notNull": false
566
+ }
567
+ },
568
+ "indexes": {
569
+ "junior_attachments_conversation_idx": {
570
+ "name": "junior_attachments_conversation_idx",
571
+ "columns": [
572
+ {
573
+ "expression": "conversation_id",
574
+ "isExpression": false,
575
+ "asc": true,
576
+ "nulls": "last"
577
+ }
578
+ ],
579
+ "isUnique": false,
580
+ "concurrently": false,
581
+ "method": "btree",
582
+ "with": {}
583
+ },
584
+ "junior_attachments_gc_idx": {
585
+ "name": "junior_attachments_gc_idx",
586
+ "columns": [
587
+ {
588
+ "expression": "provider",
589
+ "isExpression": false,
590
+ "asc": true,
591
+ "nulls": "last"
592
+ },
593
+ {
594
+ "expression": "delete_requested_at",
595
+ "isExpression": false,
596
+ "asc": true,
597
+ "nulls": "last"
598
+ },
599
+ {
600
+ "expression": "created_at",
601
+ "isExpression": false,
602
+ "asc": true,
603
+ "nulls": "last"
604
+ }
605
+ ],
606
+ "isUnique": false,
607
+ "concurrently": false,
608
+ "method": "btree",
609
+ "with": {}
610
+ }
611
+ },
612
+ "foreignKeys": {
613
+ "junior_attachments_conversation_id_junior_conversations_conversation_id_fk": {
614
+ "name": "junior_attachments_conversation_id_junior_conversations_conversation_id_fk",
615
+ "tableFrom": "junior_attachments",
616
+ "tableTo": "junior_conversations",
617
+ "columnsFrom": [
618
+ "conversation_id"
619
+ ],
620
+ "columnsTo": [
621
+ "conversation_id"
622
+ ],
623
+ "onDelete": "cascade",
624
+ "onUpdate": "no action"
625
+ }
626
+ },
627
+ "compositePrimaryKeys": {},
628
+ "uniqueConstraints": {},
629
+ "policies": {},
630
+ "checkConstraints": {},
631
+ "isRLSEnabled": false
632
+ },
633
+ "public.junior_conversation_annotations": {
634
+ "name": "junior_conversation_annotations",
635
+ "schema": "",
636
+ "columns": {
637
+ "conversation_id": {
638
+ "name": "conversation_id",
639
+ "type": "text",
640
+ "primaryKey": false,
641
+ "notNull": true
642
+ },
643
+ "plugin": {
644
+ "name": "plugin",
645
+ "type": "text",
646
+ "primaryKey": false,
647
+ "notNull": true
648
+ },
649
+ "kind": {
650
+ "name": "kind",
651
+ "type": "text",
652
+ "primaryKey": false,
653
+ "notNull": true
654
+ },
655
+ "key": {
656
+ "name": "key",
657
+ "type": "text",
658
+ "primaryKey": false,
659
+ "notNull": true
660
+ },
661
+ "annotation_json": {
662
+ "name": "annotation_json",
663
+ "type": "jsonb",
664
+ "primaryKey": false,
665
+ "notNull": true
666
+ },
667
+ "created_at": {
668
+ "name": "created_at",
669
+ "type": "timestamp with time zone",
670
+ "primaryKey": false,
671
+ "notNull": true
672
+ },
673
+ "updated_at": {
674
+ "name": "updated_at",
675
+ "type": "timestamp with time zone",
676
+ "primaryKey": false,
677
+ "notNull": true
678
+ }
679
+ },
680
+ "indexes": {},
681
+ "foreignKeys": {
682
+ "junior_conversation_annotations_conversation_id_fk": {
683
+ "name": "junior_conversation_annotations_conversation_id_fk",
684
+ "tableFrom": "junior_conversation_annotations",
685
+ "tableTo": "junior_conversations",
686
+ "columnsFrom": [
687
+ "conversation_id"
688
+ ],
689
+ "columnsTo": [
690
+ "conversation_id"
691
+ ],
692
+ "onDelete": "cascade",
693
+ "onUpdate": "no action"
694
+ }
695
+ },
696
+ "compositePrimaryKeys": {
697
+ "junior_conversation_annotations_pk": {
698
+ "name": "junior_conversation_annotations_pk",
699
+ "columns": [
700
+ "conversation_id",
701
+ "plugin",
702
+ "kind",
703
+ "key"
704
+ ]
705
+ }
706
+ },
707
+ "uniqueConstraints": {},
708
+ "policies": {},
709
+ "checkConstraints": {},
710
+ "isRLSEnabled": false
711
+ },
712
+ "public.junior_conversation_bindings": {
713
+ "name": "junior_conversation_bindings",
714
+ "schema": "",
715
+ "columns": {
716
+ "conversation_id": {
717
+ "name": "conversation_id",
718
+ "type": "text",
719
+ "primaryKey": false,
720
+ "notNull": true
721
+ },
722
+ "provider": {
723
+ "name": "provider",
724
+ "type": "text",
725
+ "primaryKey": false,
726
+ "notNull": true
727
+ },
728
+ "provider_tenant_id": {
729
+ "name": "provider_tenant_id",
730
+ "type": "text",
731
+ "primaryKey": false,
732
+ "notNull": true,
733
+ "default": "''"
734
+ },
735
+ "provider_destination_id": {
736
+ "name": "provider_destination_id",
737
+ "type": "text",
738
+ "primaryKey": false,
739
+ "notNull": true
740
+ },
741
+ "provider_conversation_id": {
742
+ "name": "provider_conversation_id",
743
+ "type": "text",
744
+ "primaryKey": false,
745
+ "notNull": true
746
+ },
747
+ "created_at": {
748
+ "name": "created_at",
749
+ "type": "timestamp with time zone",
750
+ "primaryKey": false,
751
+ "notNull": true
752
+ }
753
+ },
754
+ "indexes": {
755
+ "junior_conversation_bindings_conversation_idx": {
756
+ "name": "junior_conversation_bindings_conversation_idx",
757
+ "columns": [
758
+ {
759
+ "expression": "conversation_id",
760
+ "isExpression": false,
761
+ "asc": true,
762
+ "nulls": "last"
763
+ }
764
+ ],
765
+ "isUnique": false,
766
+ "concurrently": false,
767
+ "method": "btree",
768
+ "with": {}
769
+ }
770
+ },
771
+ "foreignKeys": {
772
+ "junior_conversation_bindings_conversation_id_junior_conversations_conversation_id_fk": {
773
+ "name": "junior_conversation_bindings_conversation_id_junior_conversations_conversation_id_fk",
774
+ "tableFrom": "junior_conversation_bindings",
775
+ "tableTo": "junior_conversations",
776
+ "columnsFrom": [
777
+ "conversation_id"
778
+ ],
779
+ "columnsTo": [
780
+ "conversation_id"
781
+ ],
782
+ "onDelete": "no action",
783
+ "onUpdate": "no action"
784
+ }
785
+ },
786
+ "compositePrimaryKeys": {
787
+ "junior_conversation_bindings_provider_conversation_pk": {
788
+ "name": "junior_conversation_bindings_provider_conversation_pk",
789
+ "columns": [
790
+ "provider",
791
+ "provider_tenant_id",
792
+ "provider_destination_id",
793
+ "provider_conversation_id"
794
+ ]
795
+ }
796
+ },
797
+ "uniqueConstraints": {},
798
+ "policies": {},
799
+ "checkConstraints": {},
800
+ "isRLSEnabled": false
801
+ },
802
+ "public.junior_conversation_events": {
803
+ "name": "junior_conversation_events",
804
+ "schema": "",
805
+ "columns": {
806
+ "conversation_id": {
807
+ "name": "conversation_id",
808
+ "type": "text",
809
+ "primaryKey": false,
810
+ "notNull": true
811
+ },
812
+ "seq": {
813
+ "name": "seq",
814
+ "type": "integer",
815
+ "primaryKey": false,
816
+ "notNull": true
817
+ },
818
+ "history_version": {
819
+ "name": "history_version",
820
+ "type": "integer",
821
+ "primaryKey": false,
822
+ "notNull": true
823
+ },
824
+ "schema_version": {
825
+ "name": "schema_version",
826
+ "type": "integer",
827
+ "primaryKey": false,
828
+ "notNull": true,
829
+ "default": 1
830
+ },
831
+ "idempotency_key": {
832
+ "name": "idempotency_key",
833
+ "type": "text",
834
+ "primaryKey": false,
835
+ "notNull": false
836
+ },
837
+ "type": {
838
+ "name": "type",
839
+ "type": "text",
840
+ "primaryKey": false,
841
+ "notNull": true
842
+ },
843
+ "payload": {
844
+ "name": "payload",
845
+ "type": "jsonb",
846
+ "primaryKey": false,
847
+ "notNull": true
848
+ },
849
+ "actor_identity_id": {
850
+ "name": "actor_identity_id",
851
+ "type": "text",
852
+ "primaryKey": false,
853
+ "notNull": false
854
+ },
855
+ "created_at": {
856
+ "name": "created_at",
857
+ "type": "timestamp with time zone",
858
+ "primaryKey": false,
859
+ "notNull": true
860
+ }
861
+ },
862
+ "indexes": {
863
+ "junior_conversation_events_history_version_idx": {
864
+ "name": "junior_conversation_events_history_version_idx",
865
+ "columns": [
866
+ {
867
+ "expression": "conversation_id",
868
+ "isExpression": false,
869
+ "asc": true,
870
+ "nulls": "last"
871
+ },
872
+ {
873
+ "expression": "history_version",
874
+ "isExpression": false,
875
+ "asc": true,
876
+ "nulls": "last"
877
+ },
878
+ {
879
+ "expression": "seq",
880
+ "isExpression": false,
881
+ "asc": true,
882
+ "nulls": "last"
883
+ }
884
+ ],
885
+ "isUnique": false,
886
+ "concurrently": false,
887
+ "method": "btree",
888
+ "with": {}
889
+ },
890
+ "junior_conversation_events_type_idx": {
891
+ "name": "junior_conversation_events_type_idx",
892
+ "columns": [
893
+ {
894
+ "expression": "conversation_id",
895
+ "isExpression": false,
896
+ "asc": true,
897
+ "nulls": "last"
898
+ },
899
+ {
900
+ "expression": "type",
901
+ "isExpression": false,
902
+ "asc": true,
903
+ "nulls": "last"
904
+ },
905
+ {
906
+ "expression": "seq",
907
+ "isExpression": false,
908
+ "asc": true,
909
+ "nulls": "last"
910
+ }
911
+ ],
912
+ "isUnique": false,
913
+ "concurrently": false,
914
+ "method": "btree",
915
+ "with": {}
916
+ },
917
+ "junior_conversation_events_actor_identity_idx": {
918
+ "name": "junior_conversation_events_actor_identity_idx",
919
+ "columns": [
920
+ {
921
+ "expression": "actor_identity_id",
922
+ "isExpression": false,
923
+ "asc": true,
924
+ "nulls": "last"
925
+ },
926
+ {
927
+ "expression": "conversation_id",
928
+ "isExpression": false,
929
+ "asc": true,
930
+ "nulls": "last"
931
+ },
932
+ {
933
+ "expression": "seq",
934
+ "isExpression": false,
935
+ "asc": true,
936
+ "nulls": "last"
937
+ }
938
+ ],
939
+ "isUnique": false,
940
+ "concurrently": false,
941
+ "method": "btree",
942
+ "with": {}
943
+ },
944
+ "junior_conversation_events_message_search_idx": {
945
+ "name": "junior_conversation_events_message_search_idx",
946
+ "columns": [
947
+ {
948
+ "expression": "to_tsvector('english', \"payload\"->>'text')",
949
+ "asc": true,
950
+ "isExpression": true,
951
+ "nulls": "last"
952
+ }
953
+ ],
954
+ "isUnique": false,
955
+ "where": "\"junior_conversation_events\".\"type\" = 'message'",
956
+ "concurrently": false,
957
+ "method": "gin",
958
+ "with": {}
959
+ },
960
+ "junior_conversation_events_idempotency_idx": {
961
+ "name": "junior_conversation_events_idempotency_idx",
962
+ "columns": [
963
+ {
964
+ "expression": "conversation_id",
965
+ "isExpression": false,
966
+ "asc": true,
967
+ "nulls": "last"
968
+ },
969
+ {
970
+ "expression": "idempotency_key",
971
+ "isExpression": false,
972
+ "asc": true,
973
+ "nulls": "last"
974
+ }
975
+ ],
976
+ "isUnique": true,
977
+ "concurrently": false,
978
+ "method": "btree",
979
+ "with": {}
980
+ }
981
+ },
982
+ "foreignKeys": {
983
+ "junior_conversation_events_actor_identity_id_junior_identities_id_fk": {
984
+ "name": "junior_conversation_events_actor_identity_id_junior_identities_id_fk",
985
+ "tableFrom": "junior_conversation_events",
986
+ "tableTo": "junior_identities",
987
+ "columnsFrom": [
988
+ "actor_identity_id"
989
+ ],
990
+ "columnsTo": [
991
+ "id"
992
+ ],
993
+ "onDelete": "no action",
994
+ "onUpdate": "no action"
995
+ },
996
+ "junior_conversation_events_conversation_id_junior_conversations_conversation_id_fk": {
997
+ "name": "junior_conversation_events_conversation_id_junior_conversations_conversation_id_fk",
998
+ "tableFrom": "junior_conversation_events",
999
+ "tableTo": "junior_conversations",
1000
+ "columnsFrom": [
1001
+ "conversation_id"
1002
+ ],
1003
+ "columnsTo": [
1004
+ "conversation_id"
1005
+ ],
1006
+ "onDelete": "no action",
1007
+ "onUpdate": "no action"
1008
+ }
1009
+ },
1010
+ "compositePrimaryKeys": {
1011
+ "junior_conversation_events_conversation_id_seq_pk": {
1012
+ "name": "junior_conversation_events_conversation_id_seq_pk",
1013
+ "columns": [
1014
+ "conversation_id",
1015
+ "seq"
1016
+ ]
1017
+ }
1018
+ },
1019
+ "uniqueConstraints": {},
1020
+ "policies": {},
1021
+ "checkConstraints": {},
1022
+ "isRLSEnabled": false
1023
+ },
1024
+ "public.junior_conversation_participants": {
1025
+ "name": "junior_conversation_participants",
1026
+ "schema": "",
1027
+ "columns": {
1028
+ "user_id": {
1029
+ "name": "user_id",
1030
+ "type": "text",
1031
+ "primaryKey": false,
1032
+ "notNull": true
1033
+ },
1034
+ "root_conversation_id": {
1035
+ "name": "root_conversation_id",
1036
+ "type": "text",
1037
+ "primaryKey": false,
1038
+ "notNull": true
1039
+ },
1040
+ "last_message_at": {
1041
+ "name": "last_message_at",
1042
+ "type": "timestamp with time zone",
1043
+ "primaryKey": false,
1044
+ "notNull": true
1045
+ }
1046
+ },
1047
+ "indexes": {
1048
+ "junior_conversation_participants_user_activity_idx": {
1049
+ "name": "junior_conversation_participants_user_activity_idx",
1050
+ "columns": [
1051
+ {
1052
+ "expression": "user_id",
1053
+ "isExpression": false,
1054
+ "asc": true,
1055
+ "nulls": "last"
1056
+ },
1057
+ {
1058
+ "expression": "last_message_at",
1059
+ "isExpression": false,
1060
+ "asc": false,
1061
+ "nulls": "last"
1062
+ }
1063
+ ],
1064
+ "isUnique": false,
1065
+ "concurrently": false,
1066
+ "method": "btree",
1067
+ "with": {}
1068
+ },
1069
+ "junior_conversation_participants_root_idx": {
1070
+ "name": "junior_conversation_participants_root_idx",
1071
+ "columns": [
1072
+ {
1073
+ "expression": "root_conversation_id",
1074
+ "isExpression": false,
1075
+ "asc": true,
1076
+ "nulls": "last"
1077
+ }
1078
+ ],
1079
+ "isUnique": false,
1080
+ "concurrently": false,
1081
+ "method": "btree",
1082
+ "with": {}
1083
+ }
1084
+ },
1085
+ "foreignKeys": {
1086
+ "junior_conversation_participants_user_id_junior_users_id_fk": {
1087
+ "name": "junior_conversation_participants_user_id_junior_users_id_fk",
1088
+ "tableFrom": "junior_conversation_participants",
1089
+ "tableTo": "junior_users",
1090
+ "columnsFrom": [
1091
+ "user_id"
1092
+ ],
1093
+ "columnsTo": [
1094
+ "id"
1095
+ ],
1096
+ "onDelete": "no action",
1097
+ "onUpdate": "no action"
1098
+ },
1099
+ "junior_conversation_participants_root_conversation_id_junior_conversations_conversation_id_fk": {
1100
+ "name": "junior_conversation_participants_root_conversation_id_junior_conversations_conversation_id_fk",
1101
+ "tableFrom": "junior_conversation_participants",
1102
+ "tableTo": "junior_conversations",
1103
+ "columnsFrom": [
1104
+ "root_conversation_id"
1105
+ ],
1106
+ "columnsTo": [
1107
+ "conversation_id"
1108
+ ],
1109
+ "onDelete": "no action",
1110
+ "onUpdate": "no action"
1111
+ }
1112
+ },
1113
+ "compositePrimaryKeys": {
1114
+ "junior_conversation_participants_user_root_pk": {
1115
+ "name": "junior_conversation_participants_user_root_pk",
1116
+ "columns": [
1117
+ "user_id",
1118
+ "root_conversation_id"
1119
+ ]
1120
+ }
1121
+ },
1122
+ "uniqueConstraints": {},
1123
+ "policies": {},
1124
+ "checkConstraints": {},
1125
+ "isRLSEnabled": false
1126
+ },
1127
+ "public.junior_conversations": {
1128
+ "name": "junior_conversations",
1129
+ "schema": "",
1130
+ "columns": {
1131
+ "conversation_id": {
1132
+ "name": "conversation_id",
1133
+ "type": "text",
1134
+ "primaryKey": true,
1135
+ "notNull": true
1136
+ },
1137
+ "schema_version": {
1138
+ "name": "schema_version",
1139
+ "type": "integer",
1140
+ "primaryKey": false,
1141
+ "notNull": true,
1142
+ "default": 1
1143
+ },
1144
+ "source": {
1145
+ "name": "source",
1146
+ "type": "text",
1147
+ "primaryKey": false,
1148
+ "notNull": false
1149
+ },
1150
+ "source_json": {
1151
+ "name": "source_json",
1152
+ "type": "jsonb",
1153
+ "primaryKey": false,
1154
+ "notNull": false
1155
+ },
1156
+ "origin_type": {
1157
+ "name": "origin_type",
1158
+ "type": "text",
1159
+ "primaryKey": false,
1160
+ "notNull": false
1161
+ },
1162
+ "origin_id": {
1163
+ "name": "origin_id",
1164
+ "type": "text",
1165
+ "primaryKey": false,
1166
+ "notNull": false
1167
+ },
1168
+ "origin_run_id": {
1169
+ "name": "origin_run_id",
1170
+ "type": "text",
1171
+ "primaryKey": false,
1172
+ "notNull": false
1173
+ },
1174
+ "destination_id": {
1175
+ "name": "destination_id",
1176
+ "type": "text",
1177
+ "primaryKey": false,
1178
+ "notNull": false
1179
+ },
1180
+ "destination_json": {
1181
+ "name": "destination_json",
1182
+ "type": "jsonb",
1183
+ "primaryKey": false,
1184
+ "notNull": false
1185
+ },
1186
+ "actor_identity_id": {
1187
+ "name": "actor_identity_id",
1188
+ "type": "text",
1189
+ "primaryKey": false,
1190
+ "notNull": false
1191
+ },
1192
+ "creator_identity_id": {
1193
+ "name": "creator_identity_id",
1194
+ "type": "text",
1195
+ "primaryKey": false,
1196
+ "notNull": false
1197
+ },
1198
+ "credential_subject_identity_id": {
1199
+ "name": "credential_subject_identity_id",
1200
+ "type": "text",
1201
+ "primaryKey": false,
1202
+ "notNull": false
1203
+ },
1204
+ "actor_json": {
1205
+ "name": "actor_json",
1206
+ "type": "jsonb",
1207
+ "primaryKey": false,
1208
+ "notNull": false
1209
+ },
1210
+ "channel_name": {
1211
+ "name": "channel_name",
1212
+ "type": "text",
1213
+ "primaryKey": false,
1214
+ "notNull": false
1215
+ },
1216
+ "title": {
1217
+ "name": "title",
1218
+ "type": "text",
1219
+ "primaryKey": false,
1220
+ "notNull": false
1221
+ },
1222
+ "created_at": {
1223
+ "name": "created_at",
1224
+ "type": "timestamp with time zone",
1225
+ "primaryKey": false,
1226
+ "notNull": true
1227
+ },
1228
+ "last_activity_at": {
1229
+ "name": "last_activity_at",
1230
+ "type": "timestamp with time zone",
1231
+ "primaryKey": false,
1232
+ "notNull": true
1233
+ },
1234
+ "updated_at": {
1235
+ "name": "updated_at",
1236
+ "type": "timestamp with time zone",
1237
+ "primaryKey": false,
1238
+ "notNull": true
1239
+ },
1240
+ "execution_updated_at": {
1241
+ "name": "execution_updated_at",
1242
+ "type": "timestamp with time zone",
1243
+ "primaryKey": false,
1244
+ "notNull": false
1245
+ },
1246
+ "execution_status": {
1247
+ "name": "execution_status",
1248
+ "type": "text",
1249
+ "primaryKey": false,
1250
+ "notNull": true
1251
+ },
1252
+ "run_id": {
1253
+ "name": "run_id",
1254
+ "type": "text",
1255
+ "primaryKey": false,
1256
+ "notNull": false
1257
+ },
1258
+ "last_checkpoint_at": {
1259
+ "name": "last_checkpoint_at",
1260
+ "type": "timestamp with time zone",
1261
+ "primaryKey": false,
1262
+ "notNull": false
1263
+ },
1264
+ "last_enqueued_at": {
1265
+ "name": "last_enqueued_at",
1266
+ "type": "timestamp with time zone",
1267
+ "primaryKey": false,
1268
+ "notNull": false
1269
+ },
1270
+ "parent_conversation_id": {
1271
+ "name": "parent_conversation_id",
1272
+ "type": "text",
1273
+ "primaryKey": false,
1274
+ "notNull": false
1275
+ },
1276
+ "root_conversation_id": {
1277
+ "name": "root_conversation_id",
1278
+ "type": "text",
1279
+ "primaryKey": false,
1280
+ "notNull": false
1281
+ },
1282
+ "transcript_purged_at": {
1283
+ "name": "transcript_purged_at",
1284
+ "type": "timestamp with time zone",
1285
+ "primaryKey": false,
1286
+ "notNull": false
1287
+ },
1288
+ "duration_ms": {
1289
+ "name": "duration_ms",
1290
+ "type": "integer",
1291
+ "primaryKey": false,
1292
+ "notNull": true,
1293
+ "default": 0
1294
+ },
1295
+ "usage_json": {
1296
+ "name": "usage_json",
1297
+ "type": "jsonb",
1298
+ "primaryKey": false,
1299
+ "notNull": false
1300
+ },
1301
+ "execution_duration_ms": {
1302
+ "name": "execution_duration_ms",
1303
+ "type": "integer",
1304
+ "primaryKey": false,
1305
+ "notNull": true,
1306
+ "default": 0
1307
+ },
1308
+ "execution_usage_json": {
1309
+ "name": "execution_usage_json",
1310
+ "type": "jsonb",
1311
+ "primaryKey": false,
1312
+ "notNull": false
1313
+ },
1314
+ "metric_run_id": {
1315
+ "name": "metric_run_id",
1316
+ "type": "text",
1317
+ "primaryKey": false,
1318
+ "notNull": false
1319
+ },
1320
+ "archived_at": {
1321
+ "name": "archived_at",
1322
+ "type": "timestamp with time zone",
1323
+ "primaryKey": false,
1324
+ "notNull": false
1325
+ }
1326
+ },
1327
+ "indexes": {
1328
+ "junior_conversations_last_activity_idx": {
1329
+ "name": "junior_conversations_last_activity_idx",
1330
+ "columns": [
1331
+ {
1332
+ "expression": "last_activity_at",
1333
+ "isExpression": false,
1334
+ "asc": false,
1335
+ "nulls": "last"
1336
+ },
1337
+ {
1338
+ "expression": "conversation_id",
1339
+ "isExpression": false,
1340
+ "asc": true,
1341
+ "nulls": "last"
1342
+ }
1343
+ ],
1344
+ "isUnique": false,
1345
+ "concurrently": false,
1346
+ "method": "btree",
1347
+ "with": {}
1348
+ },
1349
+ "junior_conversations_active_idx": {
1350
+ "name": "junior_conversations_active_idx",
1351
+ "columns": [
1352
+ {
1353
+ "expression": "coalesce(\"execution_updated_at\", \"updated_at\")",
1354
+ "asc": true,
1355
+ "isExpression": true,
1356
+ "nulls": "last"
1357
+ },
1358
+ {
1359
+ "expression": "conversation_id",
1360
+ "isExpression": false,
1361
+ "asc": true,
1362
+ "nulls": "last"
1363
+ }
1364
+ ],
1365
+ "isUnique": false,
1366
+ "where": "\"junior_conversations\".\"execution_status\" <> 'idle'",
1367
+ "concurrently": false,
1368
+ "method": "btree",
1369
+ "with": {}
1370
+ },
1371
+ "junior_conversations_destination_activity_idx": {
1372
+ "name": "junior_conversations_destination_activity_idx",
1373
+ "columns": [
1374
+ {
1375
+ "expression": "destination_id",
1376
+ "isExpression": false,
1377
+ "asc": true,
1378
+ "nulls": "last"
1379
+ },
1380
+ {
1381
+ "expression": "last_activity_at",
1382
+ "isExpression": false,
1383
+ "asc": false,
1384
+ "nulls": "last"
1385
+ }
1386
+ ],
1387
+ "isUnique": false,
1388
+ "concurrently": false,
1389
+ "method": "btree",
1390
+ "with": {}
1391
+ },
1392
+ "junior_conversations_actor_activity_idx": {
1393
+ "name": "junior_conversations_actor_activity_idx",
1394
+ "columns": [
1395
+ {
1396
+ "expression": "actor_identity_id",
1397
+ "isExpression": false,
1398
+ "asc": true,
1399
+ "nulls": "last"
1400
+ },
1401
+ {
1402
+ "expression": "last_activity_at",
1403
+ "isExpression": false,
1404
+ "asc": false,
1405
+ "nulls": "last"
1406
+ }
1407
+ ],
1408
+ "isUnique": false,
1409
+ "concurrently": false,
1410
+ "method": "btree",
1411
+ "with": {}
1412
+ },
1413
+ "junior_conversations_origin_idx": {
1414
+ "name": "junior_conversations_origin_idx",
1415
+ "columns": [
1416
+ {
1417
+ "expression": "origin_type",
1418
+ "isExpression": false,
1419
+ "asc": true,
1420
+ "nulls": "last"
1421
+ },
1422
+ {
1423
+ "expression": "origin_id",
1424
+ "isExpression": false,
1425
+ "asc": true,
1426
+ "nulls": "last"
1427
+ },
1428
+ {
1429
+ "expression": "last_activity_at",
1430
+ "isExpression": false,
1431
+ "asc": false,
1432
+ "nulls": "last"
1433
+ }
1434
+ ],
1435
+ "isUnique": false,
1436
+ "concurrently": false,
1437
+ "method": "btree",
1438
+ "with": {}
1439
+ },
1440
+ "junior_conversations_parent_idx": {
1441
+ "name": "junior_conversations_parent_idx",
1442
+ "columns": [
1443
+ {
1444
+ "expression": "parent_conversation_id",
1445
+ "isExpression": false,
1446
+ "asc": true,
1447
+ "nulls": "last"
1448
+ }
1449
+ ],
1450
+ "isUnique": false,
1451
+ "concurrently": false,
1452
+ "method": "btree",
1453
+ "with": {}
1454
+ },
1455
+ "junior_conversations_root_idx": {
1456
+ "name": "junior_conversations_root_idx",
1457
+ "columns": [
1458
+ {
1459
+ "expression": "root_conversation_id",
1460
+ "isExpression": false,
1461
+ "asc": true,
1462
+ "nulls": "last"
1463
+ }
1464
+ ],
1465
+ "isUnique": false,
1466
+ "concurrently": false,
1467
+ "method": "btree",
1468
+ "with": {}
1469
+ }
1470
+ },
1471
+ "foreignKeys": {
1472
+ "junior_conversations_destination_id_junior_destinations_id_fk": {
1473
+ "name": "junior_conversations_destination_id_junior_destinations_id_fk",
1474
+ "tableFrom": "junior_conversations",
1475
+ "tableTo": "junior_destinations",
1476
+ "columnsFrom": [
1477
+ "destination_id"
1478
+ ],
1479
+ "columnsTo": [
1480
+ "id"
1481
+ ],
1482
+ "onDelete": "no action",
1483
+ "onUpdate": "no action"
1484
+ },
1485
+ "junior_conversations_actor_identity_id_junior_identities_id_fk": {
1486
+ "name": "junior_conversations_actor_identity_id_junior_identities_id_fk",
1487
+ "tableFrom": "junior_conversations",
1488
+ "tableTo": "junior_identities",
1489
+ "columnsFrom": [
1490
+ "actor_identity_id"
1491
+ ],
1492
+ "columnsTo": [
1493
+ "id"
1494
+ ],
1495
+ "onDelete": "no action",
1496
+ "onUpdate": "no action"
1497
+ },
1498
+ "junior_conversations_creator_identity_id_junior_identities_id_fk": {
1499
+ "name": "junior_conversations_creator_identity_id_junior_identities_id_fk",
1500
+ "tableFrom": "junior_conversations",
1501
+ "tableTo": "junior_identities",
1502
+ "columnsFrom": [
1503
+ "creator_identity_id"
1504
+ ],
1505
+ "columnsTo": [
1506
+ "id"
1507
+ ],
1508
+ "onDelete": "no action",
1509
+ "onUpdate": "no action"
1510
+ },
1511
+ "junior_conversations_credential_subject_identity_id_junior_identities_id_fk": {
1512
+ "name": "junior_conversations_credential_subject_identity_id_junior_identities_id_fk",
1513
+ "tableFrom": "junior_conversations",
1514
+ "tableTo": "junior_identities",
1515
+ "columnsFrom": [
1516
+ "credential_subject_identity_id"
1517
+ ],
1518
+ "columnsTo": [
1519
+ "id"
1520
+ ],
1521
+ "onDelete": "no action",
1522
+ "onUpdate": "no action"
1523
+ },
1524
+ "junior_conversations_parent_conversation_id_junior_conversations_conversation_id_fk": {
1525
+ "name": "junior_conversations_parent_conversation_id_junior_conversations_conversation_id_fk",
1526
+ "tableFrom": "junior_conversations",
1527
+ "tableTo": "junior_conversations",
1528
+ "columnsFrom": [
1529
+ "parent_conversation_id"
1530
+ ],
1531
+ "columnsTo": [
1532
+ "conversation_id"
1533
+ ],
1534
+ "onDelete": "no action",
1535
+ "onUpdate": "no action"
1536
+ },
1537
+ "junior_conversations_root_conversation_id_junior_conversations_conversation_id_fk": {
1538
+ "name": "junior_conversations_root_conversation_id_junior_conversations_conversation_id_fk",
1539
+ "tableFrom": "junior_conversations",
1540
+ "tableTo": "junior_conversations",
1541
+ "columnsFrom": [
1542
+ "root_conversation_id"
1543
+ ],
1544
+ "columnsTo": [
1545
+ "conversation_id"
1546
+ ],
1547
+ "onDelete": "no action",
1548
+ "onUpdate": "no action"
1549
+ }
1550
+ },
1551
+ "compositePrimaryKeys": {},
1552
+ "uniqueConstraints": {},
1553
+ "policies": {},
1554
+ "checkConstraints": {},
1555
+ "isRLSEnabled": false
1556
+ },
1557
+ "public.junior_destinations": {
1558
+ "name": "junior_destinations",
1559
+ "schema": "",
1560
+ "columns": {
1561
+ "id": {
1562
+ "name": "id",
1563
+ "type": "text",
1564
+ "primaryKey": true,
1565
+ "notNull": true
1566
+ },
1567
+ "provider": {
1568
+ "name": "provider",
1569
+ "type": "text",
1570
+ "primaryKey": false,
1571
+ "notNull": true
1572
+ },
1573
+ "provider_tenant_id": {
1574
+ "name": "provider_tenant_id",
1575
+ "type": "text",
1576
+ "primaryKey": false,
1577
+ "notNull": true,
1578
+ "default": "''"
1579
+ },
1580
+ "provider_destination_id": {
1581
+ "name": "provider_destination_id",
1582
+ "type": "text",
1583
+ "primaryKey": false,
1584
+ "notNull": true
1585
+ },
1586
+ "kind": {
1587
+ "name": "kind",
1588
+ "type": "text",
1589
+ "primaryKey": false,
1590
+ "notNull": true
1591
+ },
1592
+ "parent_destination_id": {
1593
+ "name": "parent_destination_id",
1594
+ "type": "text",
1595
+ "primaryKey": false,
1596
+ "notNull": false
1597
+ },
1598
+ "display_name": {
1599
+ "name": "display_name",
1600
+ "type": "text",
1601
+ "primaryKey": false,
1602
+ "notNull": false
1603
+ },
1604
+ "visibility": {
1605
+ "name": "visibility",
1606
+ "type": "text",
1607
+ "primaryKey": false,
1608
+ "notNull": true,
1609
+ "default": "'unknown'"
1610
+ },
1611
+ "metadata_json": {
1612
+ "name": "metadata_json",
1613
+ "type": "jsonb",
1614
+ "primaryKey": false,
1615
+ "notNull": false
1616
+ },
1617
+ "created_at": {
1618
+ "name": "created_at",
1619
+ "type": "timestamp with time zone",
1620
+ "primaryKey": false,
1621
+ "notNull": true
1622
+ },
1623
+ "updated_at": {
1624
+ "name": "updated_at",
1625
+ "type": "timestamp with time zone",
1626
+ "primaryKey": false,
1627
+ "notNull": true
1628
+ }
1629
+ },
1630
+ "indexes": {
1631
+ "junior_destinations_provider_destination_uidx": {
1632
+ "name": "junior_destinations_provider_destination_uidx",
1633
+ "columns": [
1634
+ {
1635
+ "expression": "provider",
1636
+ "isExpression": false,
1637
+ "asc": true,
1638
+ "nulls": "last"
1639
+ },
1640
+ {
1641
+ "expression": "provider_tenant_id",
1642
+ "isExpression": false,
1643
+ "asc": true,
1644
+ "nulls": "last"
1645
+ },
1646
+ {
1647
+ "expression": "provider_destination_id",
1648
+ "isExpression": false,
1649
+ "asc": true,
1650
+ "nulls": "last"
1651
+ }
1652
+ ],
1653
+ "isUnique": true,
1654
+ "concurrently": false,
1655
+ "method": "btree",
1656
+ "with": {}
1657
+ },
1658
+ "junior_destinations_provider_kind_idx": {
1659
+ "name": "junior_destinations_provider_kind_idx",
1660
+ "columns": [
1661
+ {
1662
+ "expression": "provider",
1663
+ "isExpression": false,
1664
+ "asc": true,
1665
+ "nulls": "last"
1666
+ },
1667
+ {
1668
+ "expression": "kind",
1669
+ "isExpression": false,
1670
+ "asc": true,
1671
+ "nulls": "last"
1672
+ }
1673
+ ],
1674
+ "isUnique": false,
1675
+ "concurrently": false,
1676
+ "method": "btree",
1677
+ "with": {}
1678
+ }
1679
+ },
1680
+ "foreignKeys": {},
1681
+ "compositePrimaryKeys": {},
1682
+ "uniqueConstraints": {},
1683
+ "policies": {},
1684
+ "checkConstraints": {},
1685
+ "isRLSEnabled": false
1686
+ },
1687
+ "public.junior_event_tasks": {
1688
+ "name": "junior_event_tasks",
1689
+ "schema": "",
1690
+ "columns": {
1691
+ "id": {
1692
+ "name": "id",
1693
+ "type": "text",
1694
+ "primaryKey": true,
1695
+ "notNull": true
1696
+ },
1697
+ "team_id": {
1698
+ "name": "team_id",
1699
+ "type": "text",
1700
+ "primaryKey": false,
1701
+ "notNull": true
1702
+ },
1703
+ "namespace": {
1704
+ "name": "namespace",
1705
+ "type": "text",
1706
+ "primaryKey": false,
1707
+ "notNull": true
1708
+ },
1709
+ "identifier": {
1710
+ "name": "identifier",
1711
+ "type": "text",
1712
+ "primaryKey": false,
1713
+ "notNull": true
1714
+ },
1715
+ "created_at_ms": {
1716
+ "name": "created_at_ms",
1717
+ "type": "bigint",
1718
+ "primaryKey": false,
1719
+ "notNull": true
1720
+ },
1721
+ "title": {
1722
+ "name": "title",
1723
+ "type": "text",
1724
+ "primaryKey": false,
1725
+ "notNull": false
1726
+ },
1727
+ "task_json": {
1728
+ "name": "task_json",
1729
+ "type": "jsonb",
1730
+ "primaryKey": false,
1731
+ "notNull": true
1732
+ }
1733
+ },
1734
+ "indexes": {
1735
+ "junior_event_tasks_team_idx": {
1736
+ "name": "junior_event_tasks_team_idx",
1737
+ "columns": [
1738
+ {
1739
+ "expression": "team_id",
1740
+ "isExpression": false,
1741
+ "asc": true,
1742
+ "nulls": "last"
1743
+ },
1744
+ {
1745
+ "expression": "created_at_ms",
1746
+ "isExpression": false,
1747
+ "asc": true,
1748
+ "nulls": "last"
1749
+ },
1750
+ {
1751
+ "expression": "id",
1752
+ "isExpression": false,
1753
+ "asc": true,
1754
+ "nulls": "last"
1755
+ }
1756
+ ],
1757
+ "isUnique": false,
1758
+ "concurrently": false,
1759
+ "method": "btree",
1760
+ "with": {}
1761
+ },
1762
+ "junior_event_tasks_match_idx": {
1763
+ "name": "junior_event_tasks_match_idx",
1764
+ "columns": [
1765
+ {
1766
+ "expression": "namespace",
1767
+ "isExpression": false,
1768
+ "asc": true,
1769
+ "nulls": "last"
1770
+ },
1771
+ {
1772
+ "expression": "identifier",
1773
+ "isExpression": false,
1774
+ "asc": true,
1775
+ "nulls": "last"
1776
+ },
1777
+ {
1778
+ "expression": "created_at_ms",
1779
+ "isExpression": false,
1780
+ "asc": true,
1781
+ "nulls": "last"
1782
+ },
1783
+ {
1784
+ "expression": "id",
1785
+ "isExpression": false,
1786
+ "asc": true,
1787
+ "nulls": "last"
1788
+ }
1789
+ ],
1790
+ "isUnique": false,
1791
+ "concurrently": false,
1792
+ "method": "btree",
1793
+ "with": {}
1794
+ }
1795
+ },
1796
+ "foreignKeys": {},
1797
+ "compositePrimaryKeys": {},
1798
+ "uniqueConstraints": {},
1799
+ "policies": {},
1800
+ "checkConstraints": {},
1801
+ "isRLSEnabled": false
1802
+ },
1803
+ "public.junior_identities": {
1804
+ "name": "junior_identities",
1805
+ "schema": "",
1806
+ "columns": {
1807
+ "id": {
1808
+ "name": "id",
1809
+ "type": "text",
1810
+ "primaryKey": true,
1811
+ "notNull": true
1812
+ },
1813
+ "kind": {
1814
+ "name": "kind",
1815
+ "type": "text",
1816
+ "primaryKey": false,
1817
+ "notNull": true
1818
+ },
1819
+ "provider": {
1820
+ "name": "provider",
1821
+ "type": "text",
1822
+ "primaryKey": false,
1823
+ "notNull": true
1824
+ },
1825
+ "provider_tenant_id": {
1826
+ "name": "provider_tenant_id",
1827
+ "type": "text",
1828
+ "primaryKey": false,
1829
+ "notNull": true,
1830
+ "default": "''"
1831
+ },
1832
+ "provider_subject_id": {
1833
+ "name": "provider_subject_id",
1834
+ "type": "text",
1835
+ "primaryKey": false,
1836
+ "notNull": true
1837
+ },
1838
+ "display_name": {
1839
+ "name": "display_name",
1840
+ "type": "text",
1841
+ "primaryKey": false,
1842
+ "notNull": false
1843
+ },
1844
+ "handle": {
1845
+ "name": "handle",
1846
+ "type": "text",
1847
+ "primaryKey": false,
1848
+ "notNull": false
1849
+ },
1850
+ "email": {
1851
+ "name": "email",
1852
+ "type": "text",
1853
+ "primaryKey": false,
1854
+ "notNull": false
1855
+ },
1856
+ "avatar_url": {
1857
+ "name": "avatar_url",
1858
+ "type": "text",
1859
+ "primaryKey": false,
1860
+ "notNull": false
1861
+ },
1862
+ "metadata_json": {
1863
+ "name": "metadata_json",
1864
+ "type": "jsonb",
1865
+ "primaryKey": false,
1866
+ "notNull": false
1867
+ },
1868
+ "created_at": {
1869
+ "name": "created_at",
1870
+ "type": "timestamp with time zone",
1871
+ "primaryKey": false,
1872
+ "notNull": true
1873
+ },
1874
+ "updated_at": {
1875
+ "name": "updated_at",
1876
+ "type": "timestamp with time zone",
1877
+ "primaryKey": false,
1878
+ "notNull": true
1879
+ },
1880
+ "user_id": {
1881
+ "name": "user_id",
1882
+ "type": "text",
1883
+ "primaryKey": false,
1884
+ "notNull": false
1885
+ },
1886
+ "email_normalized": {
1887
+ "name": "email_normalized",
1888
+ "type": "text",
1889
+ "primaryKey": false,
1890
+ "notNull": false
1891
+ },
1892
+ "email_verified": {
1893
+ "name": "email_verified",
1894
+ "type": "boolean",
1895
+ "primaryKey": false,
1896
+ "notNull": true,
1897
+ "default": false
1898
+ }
1899
+ },
1900
+ "indexes": {
1901
+ "junior_identities_provider_subject_uidx": {
1902
+ "name": "junior_identities_provider_subject_uidx",
1903
+ "columns": [
1904
+ {
1905
+ "expression": "provider",
1906
+ "isExpression": false,
1907
+ "asc": true,
1908
+ "nulls": "last"
1909
+ },
1910
+ {
1911
+ "expression": "provider_tenant_id",
1912
+ "isExpression": false,
1913
+ "asc": true,
1914
+ "nulls": "last"
1915
+ },
1916
+ {
1917
+ "expression": "provider_subject_id",
1918
+ "isExpression": false,
1919
+ "asc": true,
1920
+ "nulls": "last"
1921
+ }
1922
+ ],
1923
+ "isUnique": true,
1924
+ "concurrently": false,
1925
+ "method": "btree",
1926
+ "with": {}
1927
+ },
1928
+ "junior_identities_user_idx": {
1929
+ "name": "junior_identities_user_idx",
1930
+ "columns": [
1931
+ {
1932
+ "expression": "user_id",
1933
+ "isExpression": false,
1934
+ "asc": true,
1935
+ "nulls": "last"
1936
+ }
1937
+ ],
1938
+ "isUnique": false,
1939
+ "concurrently": false,
1940
+ "method": "btree",
1941
+ "with": {}
1942
+ },
1943
+ "junior_identities_verified_email_idx": {
1944
+ "name": "junior_identities_verified_email_idx",
1945
+ "columns": [
1946
+ {
1947
+ "expression": "email_normalized",
1948
+ "isExpression": false,
1949
+ "asc": true,
1950
+ "nulls": "last"
1951
+ }
1952
+ ],
1953
+ "isUnique": false,
1954
+ "where": "\"junior_identities\".\"email_verified\" = true AND \"junior_identities\".\"email_normalized\" IS NOT NULL",
1955
+ "concurrently": false,
1956
+ "method": "btree",
1957
+ "with": {}
1958
+ },
1959
+ "junior_identities_kind_provider_idx": {
1960
+ "name": "junior_identities_kind_provider_idx",
1961
+ "columns": [
1962
+ {
1963
+ "expression": "kind",
1964
+ "isExpression": false,
1965
+ "asc": true,
1966
+ "nulls": "last"
1967
+ },
1968
+ {
1969
+ "expression": "provider",
1970
+ "isExpression": false,
1971
+ "asc": true,
1972
+ "nulls": "last"
1973
+ }
1974
+ ],
1975
+ "isUnique": false,
1976
+ "concurrently": false,
1977
+ "method": "btree",
1978
+ "with": {}
1979
+ }
1980
+ },
1981
+ "foreignKeys": {
1982
+ "junior_identities_user_id_junior_users_id_fk": {
1983
+ "name": "junior_identities_user_id_junior_users_id_fk",
1984
+ "tableFrom": "junior_identities",
1985
+ "tableTo": "junior_users",
1986
+ "columnsFrom": [
1987
+ "user_id"
1988
+ ],
1989
+ "columnsTo": [
1990
+ "id"
1991
+ ],
1992
+ "onDelete": "no action",
1993
+ "onUpdate": "no action"
1994
+ }
1995
+ },
1996
+ "compositePrimaryKeys": {},
1997
+ "uniqueConstraints": {},
1998
+ "policies": {},
1999
+ "checkConstraints": {},
2000
+ "isRLSEnabled": false
2001
+ },
2002
+ "public.junior_location_configurations": {
2003
+ "name": "junior_location_configurations",
2004
+ "schema": "",
2005
+ "columns": {
2006
+ "location_id": {
2007
+ "name": "location_id",
2008
+ "type": "text",
2009
+ "primaryKey": false,
2010
+ "notNull": true
2011
+ },
2012
+ "key": {
2013
+ "name": "key",
2014
+ "type": "text",
2015
+ "primaryKey": false,
2016
+ "notNull": true
2017
+ },
2018
+ "value": {
2019
+ "name": "value",
2020
+ "type": "text",
2021
+ "primaryKey": false,
2022
+ "notNull": true
2023
+ },
2024
+ "updated_at": {
2025
+ "name": "updated_at",
2026
+ "type": "timestamp with time zone",
2027
+ "primaryKey": false,
2028
+ "notNull": true
2029
+ },
2030
+ "updated_by": {
2031
+ "name": "updated_by",
2032
+ "type": "text",
2033
+ "primaryKey": false,
2034
+ "notNull": false
2035
+ },
2036
+ "source": {
2037
+ "name": "source",
2038
+ "type": "text",
2039
+ "primaryKey": false,
2040
+ "notNull": false
2041
+ },
2042
+ "expires_at": {
2043
+ "name": "expires_at",
2044
+ "type": "text",
2045
+ "primaryKey": false,
2046
+ "notNull": false
2047
+ }
2048
+ },
2049
+ "indexes": {},
2050
+ "foreignKeys": {
2051
+ "junior_location_configurations_location_id_junior_destinations_id_fk": {
2052
+ "name": "junior_location_configurations_location_id_junior_destinations_id_fk",
2053
+ "tableFrom": "junior_location_configurations",
2054
+ "tableTo": "junior_destinations",
2055
+ "columnsFrom": [
2056
+ "location_id"
2057
+ ],
2058
+ "columnsTo": [
2059
+ "id"
2060
+ ],
2061
+ "onDelete": "cascade",
2062
+ "onUpdate": "no action"
2063
+ }
2064
+ },
2065
+ "compositePrimaryKeys": {
2066
+ "junior_location_configurations_location_id_key_pk": {
2067
+ "name": "junior_location_configurations_location_id_key_pk",
2068
+ "columns": [
2069
+ "location_id",
2070
+ "key"
2071
+ ]
2072
+ }
2073
+ },
2074
+ "uniqueConstraints": {},
2075
+ "policies": {},
2076
+ "checkConstraints": {},
2077
+ "isRLSEnabled": false
2078
+ },
2079
+ "public.junior_scheduler_runs": {
2080
+ "name": "junior_scheduler_runs",
2081
+ "schema": "",
2082
+ "columns": {
2083
+ "id": {
2084
+ "name": "id",
2085
+ "type": "text",
2086
+ "primaryKey": true,
2087
+ "notNull": true
2088
+ },
2089
+ "task_id": {
2090
+ "name": "task_id",
2091
+ "type": "text",
2092
+ "primaryKey": false,
2093
+ "notNull": true
2094
+ },
2095
+ "status": {
2096
+ "name": "status",
2097
+ "type": "text",
2098
+ "primaryKey": false,
2099
+ "notNull": true
2100
+ },
2101
+ "scheduled_for_ms": {
2102
+ "name": "scheduled_for_ms",
2103
+ "type": "bigint",
2104
+ "primaryKey": false,
2105
+ "notNull": true
2106
+ },
2107
+ "record": {
2108
+ "name": "record",
2109
+ "type": "jsonb",
2110
+ "primaryKey": false,
2111
+ "notNull": true
2112
+ }
2113
+ },
2114
+ "indexes": {
2115
+ "junior_scheduler_runs_task_status_idx": {
2116
+ "name": "junior_scheduler_runs_task_status_idx",
2117
+ "columns": [
2118
+ {
2119
+ "expression": "task_id",
2120
+ "isExpression": false,
2121
+ "asc": true,
2122
+ "nulls": "last"
2123
+ },
2124
+ {
2125
+ "expression": "status",
2126
+ "isExpression": false,
2127
+ "asc": true,
2128
+ "nulls": "last"
2129
+ },
2130
+ {
2131
+ "expression": "scheduled_for_ms",
2132
+ "isExpression": false,
2133
+ "asc": true,
2134
+ "nulls": "last"
2135
+ }
2136
+ ],
2137
+ "isUnique": false,
2138
+ "concurrently": false,
2139
+ "method": "btree",
2140
+ "with": {}
2141
+ },
2142
+ "junior_scheduler_runs_status_idx": {
2143
+ "name": "junior_scheduler_runs_status_idx",
2144
+ "columns": [
2145
+ {
2146
+ "expression": "status",
2147
+ "isExpression": false,
2148
+ "asc": true,
2149
+ "nulls": "last"
2150
+ },
2151
+ {
2152
+ "expression": "scheduled_for_ms",
2153
+ "isExpression": false,
2154
+ "asc": true,
2155
+ "nulls": "last"
2156
+ }
2157
+ ],
2158
+ "isUnique": false,
2159
+ "concurrently": false,
2160
+ "method": "btree",
2161
+ "with": {}
2162
+ }
2163
+ },
2164
+ "foreignKeys": {},
2165
+ "compositePrimaryKeys": {},
2166
+ "uniqueConstraints": {},
2167
+ "policies": {},
2168
+ "checkConstraints": {},
2169
+ "isRLSEnabled": false
2170
+ },
2171
+ "public.junior_scheduler_tasks": {
2172
+ "name": "junior_scheduler_tasks",
2173
+ "schema": "",
2174
+ "columns": {
2175
+ "id": {
2176
+ "name": "id",
2177
+ "type": "text",
2178
+ "primaryKey": true,
2179
+ "notNull": true
2180
+ },
2181
+ "team_id": {
2182
+ "name": "team_id",
2183
+ "type": "text",
2184
+ "primaryKey": false,
2185
+ "notNull": true
2186
+ },
2187
+ "creator_slack_user_id": {
2188
+ "name": "creator_slack_user_id",
2189
+ "type": "text",
2190
+ "primaryKey": false,
2191
+ "notNull": false
2192
+ },
2193
+ "creator_identity_id": {
2194
+ "name": "creator_identity_id",
2195
+ "type": "text",
2196
+ "primaryKey": false,
2197
+ "notNull": false
2198
+ },
2199
+ "status": {
2200
+ "name": "status",
2201
+ "type": "text",
2202
+ "primaryKey": false,
2203
+ "notNull": true
2204
+ },
2205
+ "next_run_at_ms": {
2206
+ "name": "next_run_at_ms",
2207
+ "type": "bigint",
2208
+ "primaryKey": false,
2209
+ "notNull": false
2210
+ },
2211
+ "run_now_at_ms": {
2212
+ "name": "run_now_at_ms",
2213
+ "type": "bigint",
2214
+ "primaryKey": false,
2215
+ "notNull": false
2216
+ },
2217
+ "created_at_ms": {
2218
+ "name": "created_at_ms",
2219
+ "type": "bigint",
2220
+ "primaryKey": false,
2221
+ "notNull": true
2222
+ },
2223
+ "title": {
2224
+ "name": "title",
2225
+ "type": "text",
2226
+ "primaryKey": false,
2227
+ "notNull": false
2228
+ },
2229
+ "record": {
2230
+ "name": "record",
2231
+ "type": "jsonb",
2232
+ "primaryKey": false,
2233
+ "notNull": true
2234
+ }
2235
+ },
2236
+ "indexes": {
2237
+ "junior_scheduler_tasks_creator_idx": {
2238
+ "name": "junior_scheduler_tasks_creator_idx",
2239
+ "columns": [
2240
+ {
2241
+ "expression": "team_id",
2242
+ "isExpression": false,
2243
+ "asc": true,
2244
+ "nulls": "last"
2245
+ },
2246
+ {
2247
+ "expression": "creator_slack_user_id",
2248
+ "isExpression": false,
2249
+ "asc": true,
2250
+ "nulls": "last"
2251
+ },
2252
+ {
2253
+ "expression": "created_at_ms",
2254
+ "isExpression": false,
2255
+ "asc": true,
2256
+ "nulls": "last"
2257
+ },
2258
+ {
2259
+ "expression": "id",
2260
+ "isExpression": false,
2261
+ "asc": true,
2262
+ "nulls": "last"
2263
+ }
2264
+ ],
2265
+ "isUnique": false,
2266
+ "where": "\"junior_scheduler_tasks\".\"status\" <> 'deleted'",
2267
+ "concurrently": false,
2268
+ "method": "btree",
2269
+ "with": {}
2270
+ },
2271
+ "junior_scheduler_tasks_creator_identity_idx": {
2272
+ "name": "junior_scheduler_tasks_creator_identity_idx",
2273
+ "columns": [
2274
+ {
2275
+ "expression": "creator_identity_id",
2276
+ "isExpression": false,
2277
+ "asc": true,
2278
+ "nulls": "last"
2279
+ },
2280
+ {
2281
+ "expression": "created_at_ms",
2282
+ "isExpression": false,
2283
+ "asc": true,
2284
+ "nulls": "last"
2285
+ },
2286
+ {
2287
+ "expression": "id",
2288
+ "isExpression": false,
2289
+ "asc": true,
2290
+ "nulls": "last"
2291
+ }
2292
+ ],
2293
+ "isUnique": false,
2294
+ "where": "\"junior_scheduler_tasks\".\"status\" <> 'deleted' AND \"junior_scheduler_tasks\".\"creator_identity_id\" IS NOT NULL",
2295
+ "concurrently": false,
2296
+ "method": "btree",
2297
+ "with": {}
2298
+ },
2299
+ "junior_scheduler_tasks_team_status_idx": {
2300
+ "name": "junior_scheduler_tasks_team_status_idx",
2301
+ "columns": [
2302
+ {
2303
+ "expression": "team_id",
2304
+ "isExpression": false,
2305
+ "asc": true,
2306
+ "nulls": "last"
2307
+ },
2308
+ {
2309
+ "expression": "created_at_ms",
2310
+ "isExpression": false,
2311
+ "asc": true,
2312
+ "nulls": "last"
2313
+ },
2314
+ {
2315
+ "expression": "id",
2316
+ "isExpression": false,
2317
+ "asc": true,
2318
+ "nulls": "last"
2319
+ }
2320
+ ],
2321
+ "isUnique": false,
2322
+ "where": "\"junior_scheduler_tasks\".\"status\" <> 'deleted'",
2323
+ "concurrently": false,
2324
+ "method": "btree",
2325
+ "with": {}
2326
+ },
2327
+ "junior_scheduler_tasks_run_now_due_idx": {
2328
+ "name": "junior_scheduler_tasks_run_now_due_idx",
2329
+ "columns": [
2330
+ {
2331
+ "expression": "run_now_at_ms",
2332
+ "isExpression": false,
2333
+ "asc": true,
2334
+ "nulls": "last"
2335
+ },
2336
+ {
2337
+ "expression": "created_at_ms",
2338
+ "isExpression": false,
2339
+ "asc": true,
2340
+ "nulls": "last"
2341
+ },
2342
+ {
2343
+ "expression": "id",
2344
+ "isExpression": false,
2345
+ "asc": true,
2346
+ "nulls": "last"
2347
+ }
2348
+ ],
2349
+ "isUnique": false,
2350
+ "where": "\"junior_scheduler_tasks\".\"status\" = 'active' AND \"junior_scheduler_tasks\".\"run_now_at_ms\" IS NOT NULL",
2351
+ "concurrently": false,
2352
+ "method": "btree",
2353
+ "with": {}
2354
+ },
2355
+ "junior_scheduler_tasks_next_run_due_idx": {
2356
+ "name": "junior_scheduler_tasks_next_run_due_idx",
2357
+ "columns": [
2358
+ {
2359
+ "expression": "next_run_at_ms",
2360
+ "isExpression": false,
2361
+ "asc": true,
2362
+ "nulls": "last"
2363
+ },
2364
+ {
2365
+ "expression": "created_at_ms",
2366
+ "isExpression": false,
2367
+ "asc": true,
2368
+ "nulls": "last"
2369
+ },
2370
+ {
2371
+ "expression": "id",
2372
+ "isExpression": false,
2373
+ "asc": true,
2374
+ "nulls": "last"
2375
+ }
2376
+ ],
2377
+ "isUnique": false,
2378
+ "where": "\"junior_scheduler_tasks\".\"status\" = 'active' AND \"junior_scheduler_tasks\".\"next_run_at_ms\" IS NOT NULL",
2379
+ "concurrently": false,
2380
+ "method": "btree",
2381
+ "with": {}
2382
+ }
2383
+ },
2384
+ "foreignKeys": {},
2385
+ "compositePrimaryKeys": {},
2386
+ "uniqueConstraints": {},
2387
+ "policies": {},
2388
+ "checkConstraints": {},
2389
+ "isRLSEnabled": false
2390
+ },
2391
+ "public.junior_stats": {
2392
+ "name": "junior_stats",
2393
+ "schema": "",
2394
+ "columns": {
2395
+ "date": {
2396
+ "name": "date",
2397
+ "type": "date",
2398
+ "primaryKey": false,
2399
+ "notNull": true
2400
+ },
2401
+ "namespace": {
2402
+ "name": "namespace",
2403
+ "type": "text",
2404
+ "primaryKey": false,
2405
+ "notNull": true
2406
+ },
2407
+ "metric": {
2408
+ "name": "metric",
2409
+ "type": "text",
2410
+ "primaryKey": false,
2411
+ "notNull": true
2412
+ },
2413
+ "name": {
2414
+ "name": "name",
2415
+ "type": "text",
2416
+ "primaryKey": false,
2417
+ "notNull": true
2418
+ },
2419
+ "count": {
2420
+ "name": "count",
2421
+ "type": "integer",
2422
+ "primaryKey": false,
2423
+ "notNull": true,
2424
+ "default": 0
2425
+ }
2426
+ },
2427
+ "indexes": {},
2428
+ "foreignKeys": {},
2429
+ "compositePrimaryKeys": {
2430
+ "junior_stats_date_namespace_metric_name_pk": {
2431
+ "name": "junior_stats_date_namespace_metric_name_pk",
2432
+ "columns": [
2433
+ "date",
2434
+ "namespace",
2435
+ "metric",
2436
+ "name"
2437
+ ]
2438
+ }
2439
+ },
2440
+ "uniqueConstraints": {},
2441
+ "policies": {},
2442
+ "checkConstraints": {},
2443
+ "isRLSEnabled": false
2444
+ },
2445
+ "public.junior_task_executions": {
2446
+ "name": "junior_task_executions",
2447
+ "schema": "",
2448
+ "columns": {
2449
+ "execution_id": {
2450
+ "name": "execution_id",
2451
+ "type": "text",
2452
+ "primaryKey": false,
2453
+ "notNull": true
2454
+ },
2455
+ "kind": {
2456
+ "name": "kind",
2457
+ "type": "text",
2458
+ "primaryKey": false,
2459
+ "notNull": true
2460
+ },
2461
+ "namespace": {
2462
+ "name": "namespace",
2463
+ "type": "text",
2464
+ "primaryKey": false,
2465
+ "notNull": true
2466
+ },
2467
+ "task_id": {
2468
+ "name": "task_id",
2469
+ "type": "text",
2470
+ "primaryKey": false,
2471
+ "notNull": true
2472
+ },
2473
+ "conversation_id": {
2474
+ "name": "conversation_id",
2475
+ "type": "text",
2476
+ "primaryKey": false,
2477
+ "notNull": false
2478
+ },
2479
+ "executed_at_ms": {
2480
+ "name": "executed_at_ms",
2481
+ "type": "bigint",
2482
+ "primaryKey": false,
2483
+ "notNull": true
2484
+ },
2485
+ "status": {
2486
+ "name": "status",
2487
+ "type": "text",
2488
+ "primaryKey": false,
2489
+ "notNull": true
2490
+ }
2491
+ },
2492
+ "indexes": {
2493
+ "junior_task_executions_task_time_idx": {
2494
+ "name": "junior_task_executions_task_time_idx",
2495
+ "columns": [
2496
+ {
2497
+ "expression": "kind",
2498
+ "isExpression": false,
2499
+ "asc": true,
2500
+ "nulls": "last"
2501
+ },
2502
+ {
2503
+ "expression": "namespace",
2504
+ "isExpression": false,
2505
+ "asc": true,
2506
+ "nulls": "last"
2507
+ },
2508
+ {
2509
+ "expression": "task_id",
2510
+ "isExpression": false,
2511
+ "asc": true,
2512
+ "nulls": "last"
2513
+ },
2514
+ {
2515
+ "expression": "executed_at_ms",
2516
+ "isExpression": false,
2517
+ "asc": true,
2518
+ "nulls": "last"
2519
+ }
2520
+ ],
2521
+ "isUnique": false,
2522
+ "concurrently": false,
2523
+ "method": "btree",
2524
+ "with": {}
2525
+ },
2526
+ "junior_task_executions_time_kind_idx": {
2527
+ "name": "junior_task_executions_time_kind_idx",
2528
+ "columns": [
2529
+ {
2530
+ "expression": "executed_at_ms",
2531
+ "isExpression": false,
2532
+ "asc": true,
2533
+ "nulls": "last"
2534
+ },
2535
+ {
2536
+ "expression": "kind",
2537
+ "isExpression": false,
2538
+ "asc": true,
2539
+ "nulls": "last"
2540
+ }
2541
+ ],
2542
+ "isUnique": false,
2543
+ "concurrently": false,
2544
+ "method": "btree",
2545
+ "with": {}
2546
+ },
2547
+ "junior_task_executions_conversation_time_idx": {
2548
+ "name": "junior_task_executions_conversation_time_idx",
2549
+ "columns": [
2550
+ {
2551
+ "expression": "conversation_id",
2552
+ "isExpression": false,
2553
+ "asc": true,
2554
+ "nulls": "last"
2555
+ },
2556
+ {
2557
+ "expression": "executed_at_ms",
2558
+ "isExpression": false,
2559
+ "asc": true,
2560
+ "nulls": "last"
2561
+ }
2562
+ ],
2563
+ "isUnique": false,
2564
+ "concurrently": false,
2565
+ "method": "btree",
2566
+ "with": {}
2567
+ }
2568
+ },
2569
+ "foreignKeys": {
2570
+ "junior_task_executions_conversation_id_junior_conversations_conversation_id_fk": {
2571
+ "name": "junior_task_executions_conversation_id_junior_conversations_conversation_id_fk",
2572
+ "tableFrom": "junior_task_executions",
2573
+ "tableTo": "junior_conversations",
2574
+ "columnsFrom": [
2575
+ "conversation_id"
2576
+ ],
2577
+ "columnsTo": [
2578
+ "conversation_id"
2579
+ ],
2580
+ "onDelete": "no action",
2581
+ "onUpdate": "no action"
2582
+ }
2583
+ },
2584
+ "compositePrimaryKeys": {
2585
+ "junior_task_executions_kind_namespace_execution_id_pk": {
2586
+ "name": "junior_task_executions_kind_namespace_execution_id_pk",
2587
+ "columns": [
2588
+ "kind",
2589
+ "namespace",
2590
+ "execution_id"
2591
+ ]
2592
+ }
2593
+ },
2594
+ "uniqueConstraints": {},
2595
+ "policies": {},
2596
+ "checkConstraints": {
2597
+ "junior_task_executions_kind_check": {
2598
+ "name": "junior_task_executions_kind_check",
2599
+ "value": "\"junior_task_executions\".\"kind\" in ('scheduled', 'event')"
2600
+ },
2601
+ "junior_task_executions_status_check": {
2602
+ "name": "junior_task_executions_status_check",
2603
+ "value": "\"junior_task_executions\".\"status\" in ('blocked', 'completed', 'failed')"
2604
+ }
2605
+ },
2606
+ "isRLSEnabled": false
2607
+ },
2608
+ "public.junior_users": {
2609
+ "name": "junior_users",
2610
+ "schema": "",
2611
+ "columns": {
2612
+ "id": {
2613
+ "name": "id",
2614
+ "type": "text",
2615
+ "primaryKey": true,
2616
+ "notNull": true
2617
+ },
2618
+ "primary_email": {
2619
+ "name": "primary_email",
2620
+ "type": "text",
2621
+ "primaryKey": false,
2622
+ "notNull": true
2623
+ },
2624
+ "primary_email_normalized": {
2625
+ "name": "primary_email_normalized",
2626
+ "type": "text",
2627
+ "primaryKey": false,
2628
+ "notNull": true
2629
+ },
2630
+ "display_name": {
2631
+ "name": "display_name",
2632
+ "type": "text",
2633
+ "primaryKey": false,
2634
+ "notNull": false
2635
+ },
2636
+ "created_at": {
2637
+ "name": "created_at",
2638
+ "type": "timestamp with time zone",
2639
+ "primaryKey": false,
2640
+ "notNull": true
2641
+ },
2642
+ "updated_at": {
2643
+ "name": "updated_at",
2644
+ "type": "timestamp with time zone",
2645
+ "primaryKey": false,
2646
+ "notNull": true
2647
+ }
2648
+ },
2649
+ "indexes": {
2650
+ "junior_users_primary_email_normalized_uidx": {
2651
+ "name": "junior_users_primary_email_normalized_uidx",
2652
+ "columns": [
2653
+ {
2654
+ "expression": "primary_email_normalized",
2655
+ "isExpression": false,
2656
+ "asc": true,
2657
+ "nulls": "last"
2658
+ }
2659
+ ],
2660
+ "isUnique": true,
2661
+ "concurrently": false,
2662
+ "method": "btree",
2663
+ "with": {}
2664
+ }
2665
+ },
2666
+ "foreignKeys": {},
2667
+ "compositePrimaryKeys": {},
2668
+ "uniqueConstraints": {},
2669
+ "policies": {},
2670
+ "checkConstraints": {},
2671
+ "isRLSEnabled": false
2672
+ },
2673
+ "public.junior_workspace_repos": {
2674
+ "name": "junior_workspace_repos",
2675
+ "schema": "",
2676
+ "columns": {
2677
+ "workspace_id": {
2678
+ "name": "workspace_id",
2679
+ "type": "text",
2680
+ "primaryKey": false,
2681
+ "notNull": true
2682
+ },
2683
+ "provider": {
2684
+ "name": "provider",
2685
+ "type": "text",
2686
+ "primaryKey": false,
2687
+ "notNull": true
2688
+ },
2689
+ "repo": {
2690
+ "name": "repo",
2691
+ "type": "text",
2692
+ "primaryKey": false,
2693
+ "notNull": true
2694
+ }
2695
+ },
2696
+ "indexes": {},
2697
+ "foreignKeys": {
2698
+ "junior_workspace_repos_workspace_id_junior_workspaces_id_fk": {
2699
+ "name": "junior_workspace_repos_workspace_id_junior_workspaces_id_fk",
2700
+ "tableFrom": "junior_workspace_repos",
2701
+ "tableTo": "junior_workspaces",
2702
+ "columnsFrom": [
2703
+ "workspace_id"
2704
+ ],
2705
+ "columnsTo": [
2706
+ "id"
2707
+ ],
2708
+ "onDelete": "cascade",
2709
+ "onUpdate": "no action"
2710
+ }
2711
+ },
2712
+ "compositePrimaryKeys": {
2713
+ "junior_workspace_repos_workspace_id_provider_repo_pk": {
2714
+ "name": "junior_workspace_repos_workspace_id_provider_repo_pk",
2715
+ "columns": [
2716
+ "workspace_id",
2717
+ "provider",
2718
+ "repo"
2719
+ ]
2720
+ }
2721
+ },
2722
+ "uniqueConstraints": {},
2723
+ "policies": {},
2724
+ "checkConstraints": {},
2725
+ "isRLSEnabled": false
2726
+ },
2727
+ "public.junior_workspaces": {
2728
+ "name": "junior_workspaces",
2729
+ "schema": "",
2730
+ "columns": {
2731
+ "id": {
2732
+ "name": "id",
2733
+ "type": "text",
2734
+ "primaryKey": true,
2735
+ "notNull": true
2736
+ },
2737
+ "name": {
2738
+ "name": "name",
2739
+ "type": "text",
2740
+ "primaryKey": false,
2741
+ "notNull": true
2742
+ },
2743
+ "setup_script": {
2744
+ "name": "setup_script",
2745
+ "type": "text",
2746
+ "primaryKey": false,
2747
+ "notNull": true,
2748
+ "default": "''"
2749
+ },
2750
+ "created_at": {
2751
+ "name": "created_at",
2752
+ "type": "timestamp with time zone",
2753
+ "primaryKey": false,
2754
+ "notNull": true
2755
+ },
2756
+ "updated_at": {
2757
+ "name": "updated_at",
2758
+ "type": "timestamp with time zone",
2759
+ "primaryKey": false,
2760
+ "notNull": true
2761
+ }
2762
+ },
2763
+ "indexes": {
2764
+ "junior_workspaces_name_idx": {
2765
+ "name": "junior_workspaces_name_idx",
2766
+ "columns": [
2767
+ {
2768
+ "expression": "name",
2769
+ "isExpression": false,
2770
+ "asc": true,
2771
+ "nulls": "last"
2772
+ }
2773
+ ],
2774
+ "isUnique": true,
2775
+ "concurrently": false,
2776
+ "method": "btree",
2777
+ "with": {}
2778
+ }
2779
+ },
2780
+ "foreignKeys": {},
2781
+ "compositePrimaryKeys": {},
2782
+ "uniqueConstraints": {},
2783
+ "policies": {},
2784
+ "checkConstraints": {},
2785
+ "isRLSEnabled": false
2786
+ }
2787
+ },
2788
+ "enums": {},
2789
+ "schemas": {},
2790
+ "sequences": {},
2791
+ "roles": {},
2792
+ "policies": {},
2793
+ "views": {},
2794
+ "_meta": {
2795
+ "columns": {},
2796
+ "schemas": {},
2797
+ "tables": {}
2798
+ }
2799
+ }