@sentry/junior 0.155.0 → 0.156.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 (79) hide show
  1. package/dist/{agent-hooks-AWVTLAV2.js → agent-hooks-CCAR46PQ.js} +10 -10
  2. package/dist/api/locations/detail.d.ts +1 -0
  3. package/dist/api/schema/conversation.d.ts +19 -4
  4. package/dist/api/schema/location.d.ts +1 -0
  5. package/dist/api/schema/person.d.ts +1 -0
  6. package/dist/api/schema.js +1 -1
  7. package/dist/api.js +48 -36
  8. package/dist/app.js +147 -44
  9. package/dist/{catalog-runtime-V6YD6KH5.js → catalog-runtime-3SNKYCBG.js} +5 -5
  10. package/dist/chat/agent/types.d.ts +2 -0
  11. package/dist/chat/attachments/storage.d.ts +12 -0
  12. package/dist/chat/attachments/store.d.ts +52 -0
  13. package/dist/chat/attachments/vercel.d.ts +3 -0
  14. package/dist/chat/conversations/retention.d.ts +4 -0
  15. package/dist/chat/ingress/bot-mention.d.ts +13 -0
  16. package/dist/chat/plugins/unfinished-work.d.ts +6 -0
  17. package/dist/chat/runtime/agent-runner.d.ts +2 -0
  18. package/dist/chat/services/conversation-memory.d.ts +1 -1
  19. package/dist/chat/slack/tools/send-files.d.ts +17 -11
  20. package/dist/chat/state/conversation.d.ts +2 -1
  21. package/dist/chat/tools/types.d.ts +2 -0
  22. package/dist/{chunk-V57LZDHN.js → chunk-3FFUC32L.js} +6 -6
  23. package/dist/{chunk-J2SYI36O.js → chunk-3L2PMOSR.js} +4 -4
  24. package/dist/{chunk-2AHVM3HK.js → chunk-4ZZDTHFC.js} +10 -8
  25. package/dist/{chunk-AENPRXCG.js → chunk-53W3LZEW.js} +381 -55
  26. package/dist/{chunk-ELOTIL5F.js → chunk-6CINHXIL.js} +4 -4
  27. package/dist/{chunk-37G5HJ2X.js → chunk-6JUU7J2B.js} +4 -4
  28. package/dist/{chunk-KBT2I5ER.js → chunk-7RAETIYO.js} +6 -6
  29. package/dist/{chunk-NWSKFYOH.js → chunk-A6WPDFHQ.js} +1 -1
  30. package/dist/{chunk-773XC7P4.js → chunk-AIJRG227.js} +159 -128
  31. package/dist/{chunk-APHDJYN7.js → chunk-CK2H7CFO.js} +1 -1
  32. package/dist/{chunk-Y7ZUBP2K.js → chunk-CN2XSVKF.js} +6 -6
  33. package/dist/{chunk-TVXAN43I.js → chunk-EDJ64P2P.js} +1 -1
  34. package/dist/{chunk-XFZLQANQ.js → chunk-GKC43TLS.js} +2 -2
  35. package/dist/{chunk-UWTXAYBP.js → chunk-GSBPZHLQ.js} +9 -9
  36. package/dist/{chunk-JJX77MB7.js → chunk-IIO5PFZX.js} +3 -3
  37. package/dist/{chunk-RQ62VKM7.js → chunk-IZEBHYI4.js} +1 -1
  38. package/dist/{chunk-J7MWZFFP.js → chunk-JUJR6WTL.js} +4 -4
  39. package/dist/{chunk-JFZBGFNX.js → chunk-KBGMYLSV.js} +2 -1
  40. package/dist/{chunk-LQT3SWFA.js → chunk-KCA5MKHU.js} +5 -5
  41. package/dist/{chunk-SDRJ2LE3.js → chunk-MC57E5U5.js} +1 -1
  42. package/dist/{chunk-2WLJDM23.js → chunk-MJE7XKWP.js} +1 -1
  43. package/dist/{chunk-TKJ7277U.js → chunk-NTNU6T2D.js} +2 -2
  44. package/dist/{chunk-EORR34UB.js → chunk-OGZPRMZA.js} +1 -1
  45. package/dist/{chunk-NKFRRZIT.js → chunk-OMQJB7YN.js} +19 -18
  46. package/dist/{chunk-Y6MVGU7L.js → chunk-PMFGVLDU.js} +10 -10
  47. package/dist/{chunk-KTVHAHUV.js → chunk-SE3D225X.js} +1 -1
  48. package/dist/{chunk-JIC33O5L.js → chunk-SRJA6QLM.js} +2 -2
  49. package/dist/{chunk-4K5N6HTX.js → chunk-TN4LVILT.js} +5 -5
  50. package/dist/{chunk-MLBH7J7J.js → chunk-TNXGMFWV.js} +1 -1
  51. package/dist/{chunk-RN3AWYEP.js → chunk-WD7SEUZO.js} +1 -1
  52. package/dist/{chunk-ZLSFOSDK.js → chunk-X5NZQH5U.js} +2 -1
  53. package/dist/{chunk-7NYEB2TM.js → chunk-X7W45B5G.js} +1 -1
  54. package/dist/{chunk-CPQBTTI6.js → chunk-ZNWRYNCA.js} +5 -5
  55. package/dist/cli/chat.js +30 -30
  56. package/dist/cli/check.js +6 -6
  57. package/dist/cli/plugins.js +13 -13
  58. package/dist/cli/snapshot-create.js +9 -9
  59. package/dist/cli/upgrade.js +7 -7
  60. package/dist/db/schema/attachments.d.ts +178 -0
  61. package/dist/db/schema.d.ts +179 -1
  62. package/dist/{db-WT7P56AH.js → db-TYUUKGJX.js} +7 -7
  63. package/dist/handlers/retention.d.ts +4 -1
  64. package/dist/instrumentation.js +4 -4
  65. package/dist/nitro.js +2 -2
  66. package/dist/{oauth-callback-server-R2PK2MCA.js → oauth-callback-server-AWVDKPR5.js} +23 -23
  67. package/dist/{runner-O7YYUIHT.js → runner-JUQXMACC.js} +13 -13
  68. package/dist/{skills-S6HLQRH7.js → skills-4GZTZX4V.js} +6 -6
  69. package/dist/spawn-32SSRWU4.js +37 -0
  70. package/dist/{validation-46WD2OAR.js → validation-DRLNJRND.js} +6 -6
  71. package/dist/version.js +1 -1
  72. package/dist/{work-YT5QUBS3.js → work-TGIXRRJY.js} +17 -17
  73. package/dist/worker-IFXZOYED.js +24 -0
  74. package/migrations/0027_attachment_storage.sql +16 -0
  75. package/migrations/meta/0027_snapshot.json +2554 -0
  76. package/migrations/meta/_journal.json +8 -1
  77. package/package.json +5 -4
  78. package/dist/spawn-B4SBFFA2.js +0 -37
  79. package/dist/worker-4C5BEDWN.js +0 -24
@@ -0,0 +1,2554 @@
1
+ {
2
+ "id": "0027_attachment_storage",
3
+ "prevId": "77d3ed2a-01c0-4abe-9d3b-06409d923793",
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_attachments": {
373
+ "name": "junior_attachments",
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
+ "provider": {
389
+ "name": "provider",
390
+ "type": "text",
391
+ "primaryKey": false,
392
+ "notNull": true
393
+ },
394
+ "storage_key": {
395
+ "name": "storage_key",
396
+ "type": "text",
397
+ "primaryKey": false,
398
+ "notNull": true
399
+ },
400
+ "filename": {
401
+ "name": "filename",
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
+ "sha256": {
419
+ "name": "sha256",
420
+ "type": "text",
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_attachments_conversation_idx": {
439
+ "name": "junior_attachments_conversation_idx",
440
+ "columns": [
441
+ {
442
+ "expression": "conversation_id",
443
+ "isExpression": false,
444
+ "asc": true,
445
+ "nulls": "last"
446
+ }
447
+ ],
448
+ "isUnique": false,
449
+ "concurrently": false,
450
+ "method": "btree",
451
+ "with": {}
452
+ },
453
+ "junior_attachments_gc_idx": {
454
+ "name": "junior_attachments_gc_idx",
455
+ "columns": [
456
+ {
457
+ "expression": "provider",
458
+ "isExpression": false,
459
+ "asc": true,
460
+ "nulls": "last"
461
+ },
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
+ },
481
+ "foreignKeys": {
482
+ "junior_attachments_conversation_id_junior_conversations_conversation_id_fk": {
483
+ "name": "junior_attachments_conversation_id_junior_conversations_conversation_id_fk",
484
+ "tableFrom": "junior_attachments",
485
+ "tableTo": "junior_conversations",
486
+ "columnsFrom": [
487
+ "conversation_id"
488
+ ],
489
+ "columnsTo": [
490
+ "conversation_id"
491
+ ],
492
+ "onDelete": "cascade",
493
+ "onUpdate": "no action"
494
+ }
495
+ },
496
+ "compositePrimaryKeys": {},
497
+ "uniqueConstraints": {},
498
+ "policies": {},
499
+ "checkConstraints": {},
500
+ "isRLSEnabled": false
501
+ },
502
+ "public.junior_conversation_annotations": {
503
+ "name": "junior_conversation_annotations",
504
+ "schema": "",
505
+ "columns": {
506
+ "conversation_id": {
507
+ "name": "conversation_id",
508
+ "type": "text",
509
+ "primaryKey": false,
510
+ "notNull": true
511
+ },
512
+ "plugin": {
513
+ "name": "plugin",
514
+ "type": "text",
515
+ "primaryKey": false,
516
+ "notNull": true
517
+ },
518
+ "kind": {
519
+ "name": "kind",
520
+ "type": "text",
521
+ "primaryKey": false,
522
+ "notNull": true
523
+ },
524
+ "key": {
525
+ "name": "key",
526
+ "type": "text",
527
+ "primaryKey": false,
528
+ "notNull": true
529
+ },
530
+ "annotation_json": {
531
+ "name": "annotation_json",
532
+ "type": "jsonb",
533
+ "primaryKey": false,
534
+ "notNull": true
535
+ },
536
+ "created_at": {
537
+ "name": "created_at",
538
+ "type": "timestamp with time zone",
539
+ "primaryKey": false,
540
+ "notNull": true
541
+ },
542
+ "updated_at": {
543
+ "name": "updated_at",
544
+ "type": "timestamp with time zone",
545
+ "primaryKey": false,
546
+ "notNull": true
547
+ }
548
+ },
549
+ "indexes": {},
550
+ "foreignKeys": {
551
+ "junior_conversation_annotations_conversation_id_fk": {
552
+ "name": "junior_conversation_annotations_conversation_id_fk",
553
+ "tableFrom": "junior_conversation_annotations",
554
+ "tableTo": "junior_conversations",
555
+ "columnsFrom": [
556
+ "conversation_id"
557
+ ],
558
+ "columnsTo": [
559
+ "conversation_id"
560
+ ],
561
+ "onDelete": "cascade",
562
+ "onUpdate": "no action"
563
+ }
564
+ },
565
+ "compositePrimaryKeys": {
566
+ "junior_conversation_annotations_pk": {
567
+ "name": "junior_conversation_annotations_pk",
568
+ "columns": [
569
+ "conversation_id",
570
+ "plugin",
571
+ "kind",
572
+ "key"
573
+ ]
574
+ }
575
+ },
576
+ "uniqueConstraints": {},
577
+ "policies": {},
578
+ "checkConstraints": {},
579
+ "isRLSEnabled": false
580
+ },
581
+ "public.junior_conversation_bindings": {
582
+ "name": "junior_conversation_bindings",
583
+ "schema": "",
584
+ "columns": {
585
+ "conversation_id": {
586
+ "name": "conversation_id",
587
+ "type": "text",
588
+ "primaryKey": false,
589
+ "notNull": true
590
+ },
591
+ "provider": {
592
+ "name": "provider",
593
+ "type": "text",
594
+ "primaryKey": false,
595
+ "notNull": true
596
+ },
597
+ "provider_tenant_id": {
598
+ "name": "provider_tenant_id",
599
+ "type": "text",
600
+ "primaryKey": false,
601
+ "notNull": true,
602
+ "default": "''"
603
+ },
604
+ "provider_destination_id": {
605
+ "name": "provider_destination_id",
606
+ "type": "text",
607
+ "primaryKey": false,
608
+ "notNull": true
609
+ },
610
+ "provider_conversation_id": {
611
+ "name": "provider_conversation_id",
612
+ "type": "text",
613
+ "primaryKey": false,
614
+ "notNull": true
615
+ },
616
+ "created_at": {
617
+ "name": "created_at",
618
+ "type": "timestamp with time zone",
619
+ "primaryKey": false,
620
+ "notNull": true
621
+ }
622
+ },
623
+ "indexes": {
624
+ "junior_conversation_bindings_conversation_idx": {
625
+ "name": "junior_conversation_bindings_conversation_idx",
626
+ "columns": [
627
+ {
628
+ "expression": "conversation_id",
629
+ "isExpression": false,
630
+ "asc": true,
631
+ "nulls": "last"
632
+ }
633
+ ],
634
+ "isUnique": false,
635
+ "concurrently": false,
636
+ "method": "btree",
637
+ "with": {}
638
+ }
639
+ },
640
+ "foreignKeys": {
641
+ "junior_conversation_bindings_conversation_id_junior_conversations_conversation_id_fk": {
642
+ "name": "junior_conversation_bindings_conversation_id_junior_conversations_conversation_id_fk",
643
+ "tableFrom": "junior_conversation_bindings",
644
+ "tableTo": "junior_conversations",
645
+ "columnsFrom": [
646
+ "conversation_id"
647
+ ],
648
+ "columnsTo": [
649
+ "conversation_id"
650
+ ],
651
+ "onDelete": "no action",
652
+ "onUpdate": "no action"
653
+ }
654
+ },
655
+ "compositePrimaryKeys": {
656
+ "junior_conversation_bindings_provider_conversation_pk": {
657
+ "name": "junior_conversation_bindings_provider_conversation_pk",
658
+ "columns": [
659
+ "provider",
660
+ "provider_tenant_id",
661
+ "provider_destination_id",
662
+ "provider_conversation_id"
663
+ ]
664
+ }
665
+ },
666
+ "uniqueConstraints": {},
667
+ "policies": {},
668
+ "checkConstraints": {},
669
+ "isRLSEnabled": false
670
+ },
671
+ "public.junior_conversation_events": {
672
+ "name": "junior_conversation_events",
673
+ "schema": "",
674
+ "columns": {
675
+ "conversation_id": {
676
+ "name": "conversation_id",
677
+ "type": "text",
678
+ "primaryKey": false,
679
+ "notNull": true
680
+ },
681
+ "seq": {
682
+ "name": "seq",
683
+ "type": "integer",
684
+ "primaryKey": false,
685
+ "notNull": true
686
+ },
687
+ "history_version": {
688
+ "name": "history_version",
689
+ "type": "integer",
690
+ "primaryKey": false,
691
+ "notNull": true
692
+ },
693
+ "schema_version": {
694
+ "name": "schema_version",
695
+ "type": "integer",
696
+ "primaryKey": false,
697
+ "notNull": true,
698
+ "default": 1
699
+ },
700
+ "idempotency_key": {
701
+ "name": "idempotency_key",
702
+ "type": "text",
703
+ "primaryKey": false,
704
+ "notNull": false
705
+ },
706
+ "type": {
707
+ "name": "type",
708
+ "type": "text",
709
+ "primaryKey": false,
710
+ "notNull": true
711
+ },
712
+ "payload": {
713
+ "name": "payload",
714
+ "type": "jsonb",
715
+ "primaryKey": false,
716
+ "notNull": true
717
+ },
718
+ "actor_identity_id": {
719
+ "name": "actor_identity_id",
720
+ "type": "text",
721
+ "primaryKey": false,
722
+ "notNull": false
723
+ },
724
+ "created_at": {
725
+ "name": "created_at",
726
+ "type": "timestamp with time zone",
727
+ "primaryKey": false,
728
+ "notNull": true
729
+ }
730
+ },
731
+ "indexes": {
732
+ "junior_conversation_events_history_version_idx": {
733
+ "name": "junior_conversation_events_history_version_idx",
734
+ "columns": [
735
+ {
736
+ "expression": "conversation_id",
737
+ "isExpression": false,
738
+ "asc": true,
739
+ "nulls": "last"
740
+ },
741
+ {
742
+ "expression": "history_version",
743
+ "isExpression": false,
744
+ "asc": true,
745
+ "nulls": "last"
746
+ },
747
+ {
748
+ "expression": "seq",
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_conversation_events_type_idx": {
760
+ "name": "junior_conversation_events_type_idx",
761
+ "columns": [
762
+ {
763
+ "expression": "conversation_id",
764
+ "isExpression": false,
765
+ "asc": true,
766
+ "nulls": "last"
767
+ },
768
+ {
769
+ "expression": "type",
770
+ "isExpression": false,
771
+ "asc": true,
772
+ "nulls": "last"
773
+ },
774
+ {
775
+ "expression": "seq",
776
+ "isExpression": false,
777
+ "asc": true,
778
+ "nulls": "last"
779
+ }
780
+ ],
781
+ "isUnique": false,
782
+ "concurrently": false,
783
+ "method": "btree",
784
+ "with": {}
785
+ },
786
+ "junior_conversation_events_actor_identity_idx": {
787
+ "name": "junior_conversation_events_actor_identity_idx",
788
+ "columns": [
789
+ {
790
+ "expression": "actor_identity_id",
791
+ "isExpression": false,
792
+ "asc": true,
793
+ "nulls": "last"
794
+ },
795
+ {
796
+ "expression": "conversation_id",
797
+ "isExpression": false,
798
+ "asc": true,
799
+ "nulls": "last"
800
+ },
801
+ {
802
+ "expression": "seq",
803
+ "isExpression": false,
804
+ "asc": true,
805
+ "nulls": "last"
806
+ }
807
+ ],
808
+ "isUnique": false,
809
+ "concurrently": false,
810
+ "method": "btree",
811
+ "with": {}
812
+ },
813
+ "junior_conversation_events_message_search_idx": {
814
+ "name": "junior_conversation_events_message_search_idx",
815
+ "columns": [
816
+ {
817
+ "expression": "to_tsvector('english', \"payload\"->>'text')",
818
+ "asc": true,
819
+ "isExpression": true,
820
+ "nulls": "last"
821
+ }
822
+ ],
823
+ "isUnique": false,
824
+ "where": "\"junior_conversation_events\".\"type\" = 'message'",
825
+ "concurrently": false,
826
+ "method": "gin",
827
+ "with": {}
828
+ },
829
+ "junior_conversation_events_idempotency_idx": {
830
+ "name": "junior_conversation_events_idempotency_idx",
831
+ "columns": [
832
+ {
833
+ "expression": "conversation_id",
834
+ "isExpression": false,
835
+ "asc": true,
836
+ "nulls": "last"
837
+ },
838
+ {
839
+ "expression": "idempotency_key",
840
+ "isExpression": false,
841
+ "asc": true,
842
+ "nulls": "last"
843
+ }
844
+ ],
845
+ "isUnique": true,
846
+ "concurrently": false,
847
+ "method": "btree",
848
+ "with": {}
849
+ }
850
+ },
851
+ "foreignKeys": {
852
+ "junior_conversation_events_actor_identity_id_junior_identities_id_fk": {
853
+ "name": "junior_conversation_events_actor_identity_id_junior_identities_id_fk",
854
+ "tableFrom": "junior_conversation_events",
855
+ "tableTo": "junior_identities",
856
+ "columnsFrom": [
857
+ "actor_identity_id"
858
+ ],
859
+ "columnsTo": [
860
+ "id"
861
+ ],
862
+ "onDelete": "no action",
863
+ "onUpdate": "no action"
864
+ },
865
+ "junior_conversation_events_conversation_id_junior_conversations_conversation_id_fk": {
866
+ "name": "junior_conversation_events_conversation_id_junior_conversations_conversation_id_fk",
867
+ "tableFrom": "junior_conversation_events",
868
+ "tableTo": "junior_conversations",
869
+ "columnsFrom": [
870
+ "conversation_id"
871
+ ],
872
+ "columnsTo": [
873
+ "conversation_id"
874
+ ],
875
+ "onDelete": "no action",
876
+ "onUpdate": "no action"
877
+ }
878
+ },
879
+ "compositePrimaryKeys": {
880
+ "junior_conversation_events_conversation_id_seq_pk": {
881
+ "name": "junior_conversation_events_conversation_id_seq_pk",
882
+ "columns": [
883
+ "conversation_id",
884
+ "seq"
885
+ ]
886
+ }
887
+ },
888
+ "uniqueConstraints": {},
889
+ "policies": {},
890
+ "checkConstraints": {},
891
+ "isRLSEnabled": false
892
+ },
893
+ "public.junior_conversation_participants": {
894
+ "name": "junior_conversation_participants",
895
+ "schema": "",
896
+ "columns": {
897
+ "user_id": {
898
+ "name": "user_id",
899
+ "type": "text",
900
+ "primaryKey": false,
901
+ "notNull": true
902
+ },
903
+ "root_conversation_id": {
904
+ "name": "root_conversation_id",
905
+ "type": "text",
906
+ "primaryKey": false,
907
+ "notNull": true
908
+ },
909
+ "last_message_at": {
910
+ "name": "last_message_at",
911
+ "type": "timestamp with time zone",
912
+ "primaryKey": false,
913
+ "notNull": true
914
+ }
915
+ },
916
+ "indexes": {
917
+ "junior_conversation_participants_user_activity_idx": {
918
+ "name": "junior_conversation_participants_user_activity_idx",
919
+ "columns": [
920
+ {
921
+ "expression": "user_id",
922
+ "isExpression": false,
923
+ "asc": true,
924
+ "nulls": "last"
925
+ },
926
+ {
927
+ "expression": "last_message_at",
928
+ "isExpression": false,
929
+ "asc": false,
930
+ "nulls": "last"
931
+ }
932
+ ],
933
+ "isUnique": false,
934
+ "concurrently": false,
935
+ "method": "btree",
936
+ "with": {}
937
+ },
938
+ "junior_conversation_participants_root_idx": {
939
+ "name": "junior_conversation_participants_root_idx",
940
+ "columns": [
941
+ {
942
+ "expression": "root_conversation_id",
943
+ "isExpression": false,
944
+ "asc": true,
945
+ "nulls": "last"
946
+ }
947
+ ],
948
+ "isUnique": false,
949
+ "concurrently": false,
950
+ "method": "btree",
951
+ "with": {}
952
+ }
953
+ },
954
+ "foreignKeys": {
955
+ "junior_conversation_participants_user_id_junior_users_id_fk": {
956
+ "name": "junior_conversation_participants_user_id_junior_users_id_fk",
957
+ "tableFrom": "junior_conversation_participants",
958
+ "tableTo": "junior_users",
959
+ "columnsFrom": [
960
+ "user_id"
961
+ ],
962
+ "columnsTo": [
963
+ "id"
964
+ ],
965
+ "onDelete": "no action",
966
+ "onUpdate": "no action"
967
+ },
968
+ "junior_conversation_participants_root_conversation_id_junior_conversations_conversation_id_fk": {
969
+ "name": "junior_conversation_participants_root_conversation_id_junior_conversations_conversation_id_fk",
970
+ "tableFrom": "junior_conversation_participants",
971
+ "tableTo": "junior_conversations",
972
+ "columnsFrom": [
973
+ "root_conversation_id"
974
+ ],
975
+ "columnsTo": [
976
+ "conversation_id"
977
+ ],
978
+ "onDelete": "no action",
979
+ "onUpdate": "no action"
980
+ }
981
+ },
982
+ "compositePrimaryKeys": {
983
+ "junior_conversation_participants_user_root_pk": {
984
+ "name": "junior_conversation_participants_user_root_pk",
985
+ "columns": [
986
+ "user_id",
987
+ "root_conversation_id"
988
+ ]
989
+ }
990
+ },
991
+ "uniqueConstraints": {},
992
+ "policies": {},
993
+ "checkConstraints": {},
994
+ "isRLSEnabled": false
995
+ },
996
+ "public.junior_conversations": {
997
+ "name": "junior_conversations",
998
+ "schema": "",
999
+ "columns": {
1000
+ "conversation_id": {
1001
+ "name": "conversation_id",
1002
+ "type": "text",
1003
+ "primaryKey": true,
1004
+ "notNull": true
1005
+ },
1006
+ "schema_version": {
1007
+ "name": "schema_version",
1008
+ "type": "integer",
1009
+ "primaryKey": false,
1010
+ "notNull": true,
1011
+ "default": 1
1012
+ },
1013
+ "source": {
1014
+ "name": "source",
1015
+ "type": "text",
1016
+ "primaryKey": false,
1017
+ "notNull": false
1018
+ },
1019
+ "source_json": {
1020
+ "name": "source_json",
1021
+ "type": "jsonb",
1022
+ "primaryKey": false,
1023
+ "notNull": false
1024
+ },
1025
+ "origin_type": {
1026
+ "name": "origin_type",
1027
+ "type": "text",
1028
+ "primaryKey": false,
1029
+ "notNull": false
1030
+ },
1031
+ "origin_id": {
1032
+ "name": "origin_id",
1033
+ "type": "text",
1034
+ "primaryKey": false,
1035
+ "notNull": false
1036
+ },
1037
+ "origin_run_id": {
1038
+ "name": "origin_run_id",
1039
+ "type": "text",
1040
+ "primaryKey": false,
1041
+ "notNull": false
1042
+ },
1043
+ "destination_id": {
1044
+ "name": "destination_id",
1045
+ "type": "text",
1046
+ "primaryKey": false,
1047
+ "notNull": false
1048
+ },
1049
+ "destination_json": {
1050
+ "name": "destination_json",
1051
+ "type": "jsonb",
1052
+ "primaryKey": false,
1053
+ "notNull": false
1054
+ },
1055
+ "actor_identity_id": {
1056
+ "name": "actor_identity_id",
1057
+ "type": "text",
1058
+ "primaryKey": false,
1059
+ "notNull": false
1060
+ },
1061
+ "creator_identity_id": {
1062
+ "name": "creator_identity_id",
1063
+ "type": "text",
1064
+ "primaryKey": false,
1065
+ "notNull": false
1066
+ },
1067
+ "credential_subject_identity_id": {
1068
+ "name": "credential_subject_identity_id",
1069
+ "type": "text",
1070
+ "primaryKey": false,
1071
+ "notNull": false
1072
+ },
1073
+ "actor_json": {
1074
+ "name": "actor_json",
1075
+ "type": "jsonb",
1076
+ "primaryKey": false,
1077
+ "notNull": false
1078
+ },
1079
+ "channel_name": {
1080
+ "name": "channel_name",
1081
+ "type": "text",
1082
+ "primaryKey": false,
1083
+ "notNull": false
1084
+ },
1085
+ "title": {
1086
+ "name": "title",
1087
+ "type": "text",
1088
+ "primaryKey": false,
1089
+ "notNull": false
1090
+ },
1091
+ "created_at": {
1092
+ "name": "created_at",
1093
+ "type": "timestamp with time zone",
1094
+ "primaryKey": false,
1095
+ "notNull": true
1096
+ },
1097
+ "last_activity_at": {
1098
+ "name": "last_activity_at",
1099
+ "type": "timestamp with time zone",
1100
+ "primaryKey": false,
1101
+ "notNull": true
1102
+ },
1103
+ "updated_at": {
1104
+ "name": "updated_at",
1105
+ "type": "timestamp with time zone",
1106
+ "primaryKey": false,
1107
+ "notNull": true
1108
+ },
1109
+ "execution_updated_at": {
1110
+ "name": "execution_updated_at",
1111
+ "type": "timestamp with time zone",
1112
+ "primaryKey": false,
1113
+ "notNull": false
1114
+ },
1115
+ "execution_status": {
1116
+ "name": "execution_status",
1117
+ "type": "text",
1118
+ "primaryKey": false,
1119
+ "notNull": true
1120
+ },
1121
+ "run_id": {
1122
+ "name": "run_id",
1123
+ "type": "text",
1124
+ "primaryKey": false,
1125
+ "notNull": false
1126
+ },
1127
+ "last_checkpoint_at": {
1128
+ "name": "last_checkpoint_at",
1129
+ "type": "timestamp with time zone",
1130
+ "primaryKey": false,
1131
+ "notNull": false
1132
+ },
1133
+ "last_enqueued_at": {
1134
+ "name": "last_enqueued_at",
1135
+ "type": "timestamp with time zone",
1136
+ "primaryKey": false,
1137
+ "notNull": false
1138
+ },
1139
+ "parent_conversation_id": {
1140
+ "name": "parent_conversation_id",
1141
+ "type": "text",
1142
+ "primaryKey": false,
1143
+ "notNull": false
1144
+ },
1145
+ "root_conversation_id": {
1146
+ "name": "root_conversation_id",
1147
+ "type": "text",
1148
+ "primaryKey": false,
1149
+ "notNull": false
1150
+ },
1151
+ "transcript_purged_at": {
1152
+ "name": "transcript_purged_at",
1153
+ "type": "timestamp with time zone",
1154
+ "primaryKey": false,
1155
+ "notNull": false
1156
+ },
1157
+ "duration_ms": {
1158
+ "name": "duration_ms",
1159
+ "type": "integer",
1160
+ "primaryKey": false,
1161
+ "notNull": true,
1162
+ "default": 0
1163
+ },
1164
+ "usage_json": {
1165
+ "name": "usage_json",
1166
+ "type": "jsonb",
1167
+ "primaryKey": false,
1168
+ "notNull": false
1169
+ },
1170
+ "execution_duration_ms": {
1171
+ "name": "execution_duration_ms",
1172
+ "type": "integer",
1173
+ "primaryKey": false,
1174
+ "notNull": true,
1175
+ "default": 0
1176
+ },
1177
+ "execution_usage_json": {
1178
+ "name": "execution_usage_json",
1179
+ "type": "jsonb",
1180
+ "primaryKey": false,
1181
+ "notNull": false
1182
+ },
1183
+ "metric_run_id": {
1184
+ "name": "metric_run_id",
1185
+ "type": "text",
1186
+ "primaryKey": false,
1187
+ "notNull": false
1188
+ },
1189
+ "archived_at": {
1190
+ "name": "archived_at",
1191
+ "type": "timestamp with time zone",
1192
+ "primaryKey": false,
1193
+ "notNull": false
1194
+ }
1195
+ },
1196
+ "indexes": {
1197
+ "junior_conversations_last_activity_idx": {
1198
+ "name": "junior_conversations_last_activity_idx",
1199
+ "columns": [
1200
+ {
1201
+ "expression": "last_activity_at",
1202
+ "isExpression": false,
1203
+ "asc": false,
1204
+ "nulls": "last"
1205
+ },
1206
+ {
1207
+ "expression": "conversation_id",
1208
+ "isExpression": false,
1209
+ "asc": true,
1210
+ "nulls": "last"
1211
+ }
1212
+ ],
1213
+ "isUnique": false,
1214
+ "concurrently": false,
1215
+ "method": "btree",
1216
+ "with": {}
1217
+ },
1218
+ "junior_conversations_active_idx": {
1219
+ "name": "junior_conversations_active_idx",
1220
+ "columns": [
1221
+ {
1222
+ "expression": "coalesce(\"execution_updated_at\", \"updated_at\")",
1223
+ "asc": true,
1224
+ "isExpression": true,
1225
+ "nulls": "last"
1226
+ },
1227
+ {
1228
+ "expression": "conversation_id",
1229
+ "isExpression": false,
1230
+ "asc": true,
1231
+ "nulls": "last"
1232
+ }
1233
+ ],
1234
+ "isUnique": false,
1235
+ "where": "\"junior_conversations\".\"execution_status\" <> 'idle'",
1236
+ "concurrently": false,
1237
+ "method": "btree",
1238
+ "with": {}
1239
+ },
1240
+ "junior_conversations_destination_activity_idx": {
1241
+ "name": "junior_conversations_destination_activity_idx",
1242
+ "columns": [
1243
+ {
1244
+ "expression": "destination_id",
1245
+ "isExpression": false,
1246
+ "asc": true,
1247
+ "nulls": "last"
1248
+ },
1249
+ {
1250
+ "expression": "last_activity_at",
1251
+ "isExpression": false,
1252
+ "asc": false,
1253
+ "nulls": "last"
1254
+ }
1255
+ ],
1256
+ "isUnique": false,
1257
+ "concurrently": false,
1258
+ "method": "btree",
1259
+ "with": {}
1260
+ },
1261
+ "junior_conversations_actor_activity_idx": {
1262
+ "name": "junior_conversations_actor_activity_idx",
1263
+ "columns": [
1264
+ {
1265
+ "expression": "actor_identity_id",
1266
+ "isExpression": false,
1267
+ "asc": true,
1268
+ "nulls": "last"
1269
+ },
1270
+ {
1271
+ "expression": "last_activity_at",
1272
+ "isExpression": false,
1273
+ "asc": false,
1274
+ "nulls": "last"
1275
+ }
1276
+ ],
1277
+ "isUnique": false,
1278
+ "concurrently": false,
1279
+ "method": "btree",
1280
+ "with": {}
1281
+ },
1282
+ "junior_conversations_origin_idx": {
1283
+ "name": "junior_conversations_origin_idx",
1284
+ "columns": [
1285
+ {
1286
+ "expression": "origin_type",
1287
+ "isExpression": false,
1288
+ "asc": true,
1289
+ "nulls": "last"
1290
+ },
1291
+ {
1292
+ "expression": "origin_id",
1293
+ "isExpression": false,
1294
+ "asc": true,
1295
+ "nulls": "last"
1296
+ },
1297
+ {
1298
+ "expression": "last_activity_at",
1299
+ "isExpression": false,
1300
+ "asc": false,
1301
+ "nulls": "last"
1302
+ }
1303
+ ],
1304
+ "isUnique": false,
1305
+ "concurrently": false,
1306
+ "method": "btree",
1307
+ "with": {}
1308
+ },
1309
+ "junior_conversations_parent_idx": {
1310
+ "name": "junior_conversations_parent_idx",
1311
+ "columns": [
1312
+ {
1313
+ "expression": "parent_conversation_id",
1314
+ "isExpression": false,
1315
+ "asc": true,
1316
+ "nulls": "last"
1317
+ }
1318
+ ],
1319
+ "isUnique": false,
1320
+ "concurrently": false,
1321
+ "method": "btree",
1322
+ "with": {}
1323
+ },
1324
+ "junior_conversations_root_idx": {
1325
+ "name": "junior_conversations_root_idx",
1326
+ "columns": [
1327
+ {
1328
+ "expression": "root_conversation_id",
1329
+ "isExpression": false,
1330
+ "asc": true,
1331
+ "nulls": "last"
1332
+ }
1333
+ ],
1334
+ "isUnique": false,
1335
+ "concurrently": false,
1336
+ "method": "btree",
1337
+ "with": {}
1338
+ }
1339
+ },
1340
+ "foreignKeys": {
1341
+ "junior_conversations_destination_id_junior_destinations_id_fk": {
1342
+ "name": "junior_conversations_destination_id_junior_destinations_id_fk",
1343
+ "tableFrom": "junior_conversations",
1344
+ "tableTo": "junior_destinations",
1345
+ "columnsFrom": [
1346
+ "destination_id"
1347
+ ],
1348
+ "columnsTo": [
1349
+ "id"
1350
+ ],
1351
+ "onDelete": "no action",
1352
+ "onUpdate": "no action"
1353
+ },
1354
+ "junior_conversations_actor_identity_id_junior_identities_id_fk": {
1355
+ "name": "junior_conversations_actor_identity_id_junior_identities_id_fk",
1356
+ "tableFrom": "junior_conversations",
1357
+ "tableTo": "junior_identities",
1358
+ "columnsFrom": [
1359
+ "actor_identity_id"
1360
+ ],
1361
+ "columnsTo": [
1362
+ "id"
1363
+ ],
1364
+ "onDelete": "no action",
1365
+ "onUpdate": "no action"
1366
+ },
1367
+ "junior_conversations_creator_identity_id_junior_identities_id_fk": {
1368
+ "name": "junior_conversations_creator_identity_id_junior_identities_id_fk",
1369
+ "tableFrom": "junior_conversations",
1370
+ "tableTo": "junior_identities",
1371
+ "columnsFrom": [
1372
+ "creator_identity_id"
1373
+ ],
1374
+ "columnsTo": [
1375
+ "id"
1376
+ ],
1377
+ "onDelete": "no action",
1378
+ "onUpdate": "no action"
1379
+ },
1380
+ "junior_conversations_credential_subject_identity_id_junior_identities_id_fk": {
1381
+ "name": "junior_conversations_credential_subject_identity_id_junior_identities_id_fk",
1382
+ "tableFrom": "junior_conversations",
1383
+ "tableTo": "junior_identities",
1384
+ "columnsFrom": [
1385
+ "credential_subject_identity_id"
1386
+ ],
1387
+ "columnsTo": [
1388
+ "id"
1389
+ ],
1390
+ "onDelete": "no action",
1391
+ "onUpdate": "no action"
1392
+ },
1393
+ "junior_conversations_parent_conversation_id_junior_conversations_conversation_id_fk": {
1394
+ "name": "junior_conversations_parent_conversation_id_junior_conversations_conversation_id_fk",
1395
+ "tableFrom": "junior_conversations",
1396
+ "tableTo": "junior_conversations",
1397
+ "columnsFrom": [
1398
+ "parent_conversation_id"
1399
+ ],
1400
+ "columnsTo": [
1401
+ "conversation_id"
1402
+ ],
1403
+ "onDelete": "no action",
1404
+ "onUpdate": "no action"
1405
+ },
1406
+ "junior_conversations_root_conversation_id_junior_conversations_conversation_id_fk": {
1407
+ "name": "junior_conversations_root_conversation_id_junior_conversations_conversation_id_fk",
1408
+ "tableFrom": "junior_conversations",
1409
+ "tableTo": "junior_conversations",
1410
+ "columnsFrom": [
1411
+ "root_conversation_id"
1412
+ ],
1413
+ "columnsTo": [
1414
+ "conversation_id"
1415
+ ],
1416
+ "onDelete": "no action",
1417
+ "onUpdate": "no action"
1418
+ }
1419
+ },
1420
+ "compositePrimaryKeys": {},
1421
+ "uniqueConstraints": {},
1422
+ "policies": {},
1423
+ "checkConstraints": {},
1424
+ "isRLSEnabled": false
1425
+ },
1426
+ "public.junior_destinations": {
1427
+ "name": "junior_destinations",
1428
+ "schema": "",
1429
+ "columns": {
1430
+ "id": {
1431
+ "name": "id",
1432
+ "type": "text",
1433
+ "primaryKey": true,
1434
+ "notNull": true
1435
+ },
1436
+ "provider": {
1437
+ "name": "provider",
1438
+ "type": "text",
1439
+ "primaryKey": false,
1440
+ "notNull": true
1441
+ },
1442
+ "provider_tenant_id": {
1443
+ "name": "provider_tenant_id",
1444
+ "type": "text",
1445
+ "primaryKey": false,
1446
+ "notNull": true,
1447
+ "default": "''"
1448
+ },
1449
+ "provider_destination_id": {
1450
+ "name": "provider_destination_id",
1451
+ "type": "text",
1452
+ "primaryKey": false,
1453
+ "notNull": true
1454
+ },
1455
+ "kind": {
1456
+ "name": "kind",
1457
+ "type": "text",
1458
+ "primaryKey": false,
1459
+ "notNull": true
1460
+ },
1461
+ "parent_destination_id": {
1462
+ "name": "parent_destination_id",
1463
+ "type": "text",
1464
+ "primaryKey": false,
1465
+ "notNull": false
1466
+ },
1467
+ "display_name": {
1468
+ "name": "display_name",
1469
+ "type": "text",
1470
+ "primaryKey": false,
1471
+ "notNull": false
1472
+ },
1473
+ "visibility": {
1474
+ "name": "visibility",
1475
+ "type": "text",
1476
+ "primaryKey": false,
1477
+ "notNull": true,
1478
+ "default": "'unknown'"
1479
+ },
1480
+ "metadata_json": {
1481
+ "name": "metadata_json",
1482
+ "type": "jsonb",
1483
+ "primaryKey": false,
1484
+ "notNull": false
1485
+ },
1486
+ "created_at": {
1487
+ "name": "created_at",
1488
+ "type": "timestamp with time zone",
1489
+ "primaryKey": false,
1490
+ "notNull": true
1491
+ },
1492
+ "updated_at": {
1493
+ "name": "updated_at",
1494
+ "type": "timestamp with time zone",
1495
+ "primaryKey": false,
1496
+ "notNull": true
1497
+ }
1498
+ },
1499
+ "indexes": {
1500
+ "junior_destinations_provider_destination_uidx": {
1501
+ "name": "junior_destinations_provider_destination_uidx",
1502
+ "columns": [
1503
+ {
1504
+ "expression": "provider",
1505
+ "isExpression": false,
1506
+ "asc": true,
1507
+ "nulls": "last"
1508
+ },
1509
+ {
1510
+ "expression": "provider_tenant_id",
1511
+ "isExpression": false,
1512
+ "asc": true,
1513
+ "nulls": "last"
1514
+ },
1515
+ {
1516
+ "expression": "provider_destination_id",
1517
+ "isExpression": false,
1518
+ "asc": true,
1519
+ "nulls": "last"
1520
+ }
1521
+ ],
1522
+ "isUnique": true,
1523
+ "concurrently": false,
1524
+ "method": "btree",
1525
+ "with": {}
1526
+ },
1527
+ "junior_destinations_provider_kind_idx": {
1528
+ "name": "junior_destinations_provider_kind_idx",
1529
+ "columns": [
1530
+ {
1531
+ "expression": "provider",
1532
+ "isExpression": false,
1533
+ "asc": true,
1534
+ "nulls": "last"
1535
+ },
1536
+ {
1537
+ "expression": "kind",
1538
+ "isExpression": false,
1539
+ "asc": true,
1540
+ "nulls": "last"
1541
+ }
1542
+ ],
1543
+ "isUnique": false,
1544
+ "concurrently": false,
1545
+ "method": "btree",
1546
+ "with": {}
1547
+ }
1548
+ },
1549
+ "foreignKeys": {},
1550
+ "compositePrimaryKeys": {},
1551
+ "uniqueConstraints": {},
1552
+ "policies": {},
1553
+ "checkConstraints": {},
1554
+ "isRLSEnabled": false
1555
+ },
1556
+ "public.junior_event_tasks": {
1557
+ "name": "junior_event_tasks",
1558
+ "schema": "",
1559
+ "columns": {
1560
+ "id": {
1561
+ "name": "id",
1562
+ "type": "text",
1563
+ "primaryKey": true,
1564
+ "notNull": true
1565
+ },
1566
+ "team_id": {
1567
+ "name": "team_id",
1568
+ "type": "text",
1569
+ "primaryKey": false,
1570
+ "notNull": true
1571
+ },
1572
+ "namespace": {
1573
+ "name": "namespace",
1574
+ "type": "text",
1575
+ "primaryKey": false,
1576
+ "notNull": true
1577
+ },
1578
+ "identifier": {
1579
+ "name": "identifier",
1580
+ "type": "text",
1581
+ "primaryKey": false,
1582
+ "notNull": true
1583
+ },
1584
+ "created_at_ms": {
1585
+ "name": "created_at_ms",
1586
+ "type": "bigint",
1587
+ "primaryKey": false,
1588
+ "notNull": true
1589
+ },
1590
+ "title": {
1591
+ "name": "title",
1592
+ "type": "text",
1593
+ "primaryKey": false,
1594
+ "notNull": false
1595
+ },
1596
+ "task_json": {
1597
+ "name": "task_json",
1598
+ "type": "jsonb",
1599
+ "primaryKey": false,
1600
+ "notNull": true
1601
+ }
1602
+ },
1603
+ "indexes": {
1604
+ "junior_event_tasks_team_idx": {
1605
+ "name": "junior_event_tasks_team_idx",
1606
+ "columns": [
1607
+ {
1608
+ "expression": "team_id",
1609
+ "isExpression": false,
1610
+ "asc": true,
1611
+ "nulls": "last"
1612
+ },
1613
+ {
1614
+ "expression": "created_at_ms",
1615
+ "isExpression": false,
1616
+ "asc": true,
1617
+ "nulls": "last"
1618
+ },
1619
+ {
1620
+ "expression": "id",
1621
+ "isExpression": false,
1622
+ "asc": true,
1623
+ "nulls": "last"
1624
+ }
1625
+ ],
1626
+ "isUnique": false,
1627
+ "concurrently": false,
1628
+ "method": "btree",
1629
+ "with": {}
1630
+ },
1631
+ "junior_event_tasks_match_idx": {
1632
+ "name": "junior_event_tasks_match_idx",
1633
+ "columns": [
1634
+ {
1635
+ "expression": "namespace",
1636
+ "isExpression": false,
1637
+ "asc": true,
1638
+ "nulls": "last"
1639
+ },
1640
+ {
1641
+ "expression": "identifier",
1642
+ "isExpression": false,
1643
+ "asc": true,
1644
+ "nulls": "last"
1645
+ },
1646
+ {
1647
+ "expression": "created_at_ms",
1648
+ "isExpression": false,
1649
+ "asc": true,
1650
+ "nulls": "last"
1651
+ },
1652
+ {
1653
+ "expression": "id",
1654
+ "isExpression": false,
1655
+ "asc": true,
1656
+ "nulls": "last"
1657
+ }
1658
+ ],
1659
+ "isUnique": false,
1660
+ "concurrently": false,
1661
+ "method": "btree",
1662
+ "with": {}
1663
+ }
1664
+ },
1665
+ "foreignKeys": {},
1666
+ "compositePrimaryKeys": {},
1667
+ "uniqueConstraints": {},
1668
+ "policies": {},
1669
+ "checkConstraints": {},
1670
+ "isRLSEnabled": false
1671
+ },
1672
+ "public.junior_identities": {
1673
+ "name": "junior_identities",
1674
+ "schema": "",
1675
+ "columns": {
1676
+ "id": {
1677
+ "name": "id",
1678
+ "type": "text",
1679
+ "primaryKey": true,
1680
+ "notNull": true
1681
+ },
1682
+ "kind": {
1683
+ "name": "kind",
1684
+ "type": "text",
1685
+ "primaryKey": false,
1686
+ "notNull": true
1687
+ },
1688
+ "provider": {
1689
+ "name": "provider",
1690
+ "type": "text",
1691
+ "primaryKey": false,
1692
+ "notNull": true
1693
+ },
1694
+ "provider_tenant_id": {
1695
+ "name": "provider_tenant_id",
1696
+ "type": "text",
1697
+ "primaryKey": false,
1698
+ "notNull": true,
1699
+ "default": "''"
1700
+ },
1701
+ "provider_subject_id": {
1702
+ "name": "provider_subject_id",
1703
+ "type": "text",
1704
+ "primaryKey": false,
1705
+ "notNull": true
1706
+ },
1707
+ "display_name": {
1708
+ "name": "display_name",
1709
+ "type": "text",
1710
+ "primaryKey": false,
1711
+ "notNull": false
1712
+ },
1713
+ "handle": {
1714
+ "name": "handle",
1715
+ "type": "text",
1716
+ "primaryKey": false,
1717
+ "notNull": false
1718
+ },
1719
+ "email": {
1720
+ "name": "email",
1721
+ "type": "text",
1722
+ "primaryKey": false,
1723
+ "notNull": false
1724
+ },
1725
+ "avatar_url": {
1726
+ "name": "avatar_url",
1727
+ "type": "text",
1728
+ "primaryKey": false,
1729
+ "notNull": false
1730
+ },
1731
+ "metadata_json": {
1732
+ "name": "metadata_json",
1733
+ "type": "jsonb",
1734
+ "primaryKey": false,
1735
+ "notNull": false
1736
+ },
1737
+ "created_at": {
1738
+ "name": "created_at",
1739
+ "type": "timestamp with time zone",
1740
+ "primaryKey": false,
1741
+ "notNull": true
1742
+ },
1743
+ "updated_at": {
1744
+ "name": "updated_at",
1745
+ "type": "timestamp with time zone",
1746
+ "primaryKey": false,
1747
+ "notNull": true
1748
+ },
1749
+ "user_id": {
1750
+ "name": "user_id",
1751
+ "type": "text",
1752
+ "primaryKey": false,
1753
+ "notNull": false
1754
+ },
1755
+ "email_normalized": {
1756
+ "name": "email_normalized",
1757
+ "type": "text",
1758
+ "primaryKey": false,
1759
+ "notNull": false
1760
+ },
1761
+ "email_verified": {
1762
+ "name": "email_verified",
1763
+ "type": "boolean",
1764
+ "primaryKey": false,
1765
+ "notNull": true,
1766
+ "default": false
1767
+ }
1768
+ },
1769
+ "indexes": {
1770
+ "junior_identities_provider_subject_uidx": {
1771
+ "name": "junior_identities_provider_subject_uidx",
1772
+ "columns": [
1773
+ {
1774
+ "expression": "provider",
1775
+ "isExpression": false,
1776
+ "asc": true,
1777
+ "nulls": "last"
1778
+ },
1779
+ {
1780
+ "expression": "provider_tenant_id",
1781
+ "isExpression": false,
1782
+ "asc": true,
1783
+ "nulls": "last"
1784
+ },
1785
+ {
1786
+ "expression": "provider_subject_id",
1787
+ "isExpression": false,
1788
+ "asc": true,
1789
+ "nulls": "last"
1790
+ }
1791
+ ],
1792
+ "isUnique": true,
1793
+ "concurrently": false,
1794
+ "method": "btree",
1795
+ "with": {}
1796
+ },
1797
+ "junior_identities_user_idx": {
1798
+ "name": "junior_identities_user_idx",
1799
+ "columns": [
1800
+ {
1801
+ "expression": "user_id",
1802
+ "isExpression": false,
1803
+ "asc": true,
1804
+ "nulls": "last"
1805
+ }
1806
+ ],
1807
+ "isUnique": false,
1808
+ "concurrently": false,
1809
+ "method": "btree",
1810
+ "with": {}
1811
+ },
1812
+ "junior_identities_verified_email_idx": {
1813
+ "name": "junior_identities_verified_email_idx",
1814
+ "columns": [
1815
+ {
1816
+ "expression": "email_normalized",
1817
+ "isExpression": false,
1818
+ "asc": true,
1819
+ "nulls": "last"
1820
+ }
1821
+ ],
1822
+ "isUnique": false,
1823
+ "where": "\"junior_identities\".\"email_verified\" = true AND \"junior_identities\".\"email_normalized\" IS NOT NULL",
1824
+ "concurrently": false,
1825
+ "method": "btree",
1826
+ "with": {}
1827
+ },
1828
+ "junior_identities_kind_provider_idx": {
1829
+ "name": "junior_identities_kind_provider_idx",
1830
+ "columns": [
1831
+ {
1832
+ "expression": "kind",
1833
+ "isExpression": false,
1834
+ "asc": true,
1835
+ "nulls": "last"
1836
+ },
1837
+ {
1838
+ "expression": "provider",
1839
+ "isExpression": false,
1840
+ "asc": true,
1841
+ "nulls": "last"
1842
+ }
1843
+ ],
1844
+ "isUnique": false,
1845
+ "concurrently": false,
1846
+ "method": "btree",
1847
+ "with": {}
1848
+ }
1849
+ },
1850
+ "foreignKeys": {
1851
+ "junior_identities_user_id_junior_users_id_fk": {
1852
+ "name": "junior_identities_user_id_junior_users_id_fk",
1853
+ "tableFrom": "junior_identities",
1854
+ "tableTo": "junior_users",
1855
+ "columnsFrom": [
1856
+ "user_id"
1857
+ ],
1858
+ "columnsTo": [
1859
+ "id"
1860
+ ],
1861
+ "onDelete": "no action",
1862
+ "onUpdate": "no action"
1863
+ }
1864
+ },
1865
+ "compositePrimaryKeys": {},
1866
+ "uniqueConstraints": {},
1867
+ "policies": {},
1868
+ "checkConstraints": {},
1869
+ "isRLSEnabled": false
1870
+ },
1871
+ "public.junior_location_configurations": {
1872
+ "name": "junior_location_configurations",
1873
+ "schema": "",
1874
+ "columns": {
1875
+ "location_id": {
1876
+ "name": "location_id",
1877
+ "type": "text",
1878
+ "primaryKey": false,
1879
+ "notNull": true
1880
+ },
1881
+ "key": {
1882
+ "name": "key",
1883
+ "type": "text",
1884
+ "primaryKey": false,
1885
+ "notNull": true
1886
+ },
1887
+ "value": {
1888
+ "name": "value",
1889
+ "type": "text",
1890
+ "primaryKey": false,
1891
+ "notNull": true
1892
+ },
1893
+ "updated_at": {
1894
+ "name": "updated_at",
1895
+ "type": "timestamp with time zone",
1896
+ "primaryKey": false,
1897
+ "notNull": true
1898
+ },
1899
+ "updated_by": {
1900
+ "name": "updated_by",
1901
+ "type": "text",
1902
+ "primaryKey": false,
1903
+ "notNull": false
1904
+ },
1905
+ "source": {
1906
+ "name": "source",
1907
+ "type": "text",
1908
+ "primaryKey": false,
1909
+ "notNull": false
1910
+ },
1911
+ "expires_at": {
1912
+ "name": "expires_at",
1913
+ "type": "text",
1914
+ "primaryKey": false,
1915
+ "notNull": false
1916
+ }
1917
+ },
1918
+ "indexes": {},
1919
+ "foreignKeys": {
1920
+ "junior_location_configurations_location_id_junior_destinations_id_fk": {
1921
+ "name": "junior_location_configurations_location_id_junior_destinations_id_fk",
1922
+ "tableFrom": "junior_location_configurations",
1923
+ "tableTo": "junior_destinations",
1924
+ "columnsFrom": [
1925
+ "location_id"
1926
+ ],
1927
+ "columnsTo": [
1928
+ "id"
1929
+ ],
1930
+ "onDelete": "cascade",
1931
+ "onUpdate": "no action"
1932
+ }
1933
+ },
1934
+ "compositePrimaryKeys": {
1935
+ "junior_location_configurations_location_id_key_pk": {
1936
+ "name": "junior_location_configurations_location_id_key_pk",
1937
+ "columns": [
1938
+ "location_id",
1939
+ "key"
1940
+ ]
1941
+ }
1942
+ },
1943
+ "uniqueConstraints": {},
1944
+ "policies": {},
1945
+ "checkConstraints": {},
1946
+ "isRLSEnabled": false
1947
+ },
1948
+ "public.junior_scheduler_runs": {
1949
+ "name": "junior_scheduler_runs",
1950
+ "schema": "",
1951
+ "columns": {
1952
+ "id": {
1953
+ "name": "id",
1954
+ "type": "text",
1955
+ "primaryKey": true,
1956
+ "notNull": true
1957
+ },
1958
+ "task_id": {
1959
+ "name": "task_id",
1960
+ "type": "text",
1961
+ "primaryKey": false,
1962
+ "notNull": true
1963
+ },
1964
+ "status": {
1965
+ "name": "status",
1966
+ "type": "text",
1967
+ "primaryKey": false,
1968
+ "notNull": true
1969
+ },
1970
+ "scheduled_for_ms": {
1971
+ "name": "scheduled_for_ms",
1972
+ "type": "bigint",
1973
+ "primaryKey": false,
1974
+ "notNull": true
1975
+ },
1976
+ "record": {
1977
+ "name": "record",
1978
+ "type": "jsonb",
1979
+ "primaryKey": false,
1980
+ "notNull": true
1981
+ }
1982
+ },
1983
+ "indexes": {
1984
+ "junior_scheduler_runs_task_status_idx": {
1985
+ "name": "junior_scheduler_runs_task_status_idx",
1986
+ "columns": [
1987
+ {
1988
+ "expression": "task_id",
1989
+ "isExpression": false,
1990
+ "asc": true,
1991
+ "nulls": "last"
1992
+ },
1993
+ {
1994
+ "expression": "status",
1995
+ "isExpression": false,
1996
+ "asc": true,
1997
+ "nulls": "last"
1998
+ },
1999
+ {
2000
+ "expression": "scheduled_for_ms",
2001
+ "isExpression": false,
2002
+ "asc": true,
2003
+ "nulls": "last"
2004
+ }
2005
+ ],
2006
+ "isUnique": false,
2007
+ "concurrently": false,
2008
+ "method": "btree",
2009
+ "with": {}
2010
+ },
2011
+ "junior_scheduler_runs_status_idx": {
2012
+ "name": "junior_scheduler_runs_status_idx",
2013
+ "columns": [
2014
+ {
2015
+ "expression": "status",
2016
+ "isExpression": false,
2017
+ "asc": true,
2018
+ "nulls": "last"
2019
+ },
2020
+ {
2021
+ "expression": "scheduled_for_ms",
2022
+ "isExpression": false,
2023
+ "asc": true,
2024
+ "nulls": "last"
2025
+ }
2026
+ ],
2027
+ "isUnique": false,
2028
+ "concurrently": false,
2029
+ "method": "btree",
2030
+ "with": {}
2031
+ }
2032
+ },
2033
+ "foreignKeys": {},
2034
+ "compositePrimaryKeys": {},
2035
+ "uniqueConstraints": {},
2036
+ "policies": {},
2037
+ "checkConstraints": {},
2038
+ "isRLSEnabled": false
2039
+ },
2040
+ "public.junior_scheduler_tasks": {
2041
+ "name": "junior_scheduler_tasks",
2042
+ "schema": "",
2043
+ "columns": {
2044
+ "id": {
2045
+ "name": "id",
2046
+ "type": "text",
2047
+ "primaryKey": true,
2048
+ "notNull": true
2049
+ },
2050
+ "team_id": {
2051
+ "name": "team_id",
2052
+ "type": "text",
2053
+ "primaryKey": false,
2054
+ "notNull": true
2055
+ },
2056
+ "creator_slack_user_id": {
2057
+ "name": "creator_slack_user_id",
2058
+ "type": "text",
2059
+ "primaryKey": false,
2060
+ "notNull": false
2061
+ },
2062
+ "creator_identity_id": {
2063
+ "name": "creator_identity_id",
2064
+ "type": "text",
2065
+ "primaryKey": false,
2066
+ "notNull": false
2067
+ },
2068
+ "status": {
2069
+ "name": "status",
2070
+ "type": "text",
2071
+ "primaryKey": false,
2072
+ "notNull": true
2073
+ },
2074
+ "next_run_at_ms": {
2075
+ "name": "next_run_at_ms",
2076
+ "type": "bigint",
2077
+ "primaryKey": false,
2078
+ "notNull": false
2079
+ },
2080
+ "run_now_at_ms": {
2081
+ "name": "run_now_at_ms",
2082
+ "type": "bigint",
2083
+ "primaryKey": false,
2084
+ "notNull": false
2085
+ },
2086
+ "created_at_ms": {
2087
+ "name": "created_at_ms",
2088
+ "type": "bigint",
2089
+ "primaryKey": false,
2090
+ "notNull": true
2091
+ },
2092
+ "title": {
2093
+ "name": "title",
2094
+ "type": "text",
2095
+ "primaryKey": false,
2096
+ "notNull": false
2097
+ },
2098
+ "record": {
2099
+ "name": "record",
2100
+ "type": "jsonb",
2101
+ "primaryKey": false,
2102
+ "notNull": true
2103
+ }
2104
+ },
2105
+ "indexes": {
2106
+ "junior_scheduler_tasks_creator_idx": {
2107
+ "name": "junior_scheduler_tasks_creator_idx",
2108
+ "columns": [
2109
+ {
2110
+ "expression": "team_id",
2111
+ "isExpression": false,
2112
+ "asc": true,
2113
+ "nulls": "last"
2114
+ },
2115
+ {
2116
+ "expression": "creator_slack_user_id",
2117
+ "isExpression": false,
2118
+ "asc": true,
2119
+ "nulls": "last"
2120
+ },
2121
+ {
2122
+ "expression": "created_at_ms",
2123
+ "isExpression": false,
2124
+ "asc": true,
2125
+ "nulls": "last"
2126
+ },
2127
+ {
2128
+ "expression": "id",
2129
+ "isExpression": false,
2130
+ "asc": true,
2131
+ "nulls": "last"
2132
+ }
2133
+ ],
2134
+ "isUnique": false,
2135
+ "where": "\"junior_scheduler_tasks\".\"status\" <> 'deleted'",
2136
+ "concurrently": false,
2137
+ "method": "btree",
2138
+ "with": {}
2139
+ },
2140
+ "junior_scheduler_tasks_creator_identity_idx": {
2141
+ "name": "junior_scheduler_tasks_creator_identity_idx",
2142
+ "columns": [
2143
+ {
2144
+ "expression": "creator_identity_id",
2145
+ "isExpression": false,
2146
+ "asc": true,
2147
+ "nulls": "last"
2148
+ },
2149
+ {
2150
+ "expression": "created_at_ms",
2151
+ "isExpression": false,
2152
+ "asc": true,
2153
+ "nulls": "last"
2154
+ },
2155
+ {
2156
+ "expression": "id",
2157
+ "isExpression": false,
2158
+ "asc": true,
2159
+ "nulls": "last"
2160
+ }
2161
+ ],
2162
+ "isUnique": false,
2163
+ "where": "\"junior_scheduler_tasks\".\"status\" <> 'deleted' AND \"junior_scheduler_tasks\".\"creator_identity_id\" IS NOT NULL",
2164
+ "concurrently": false,
2165
+ "method": "btree",
2166
+ "with": {}
2167
+ },
2168
+ "junior_scheduler_tasks_team_status_idx": {
2169
+ "name": "junior_scheduler_tasks_team_status_idx",
2170
+ "columns": [
2171
+ {
2172
+ "expression": "team_id",
2173
+ "isExpression": false,
2174
+ "asc": true,
2175
+ "nulls": "last"
2176
+ },
2177
+ {
2178
+ "expression": "created_at_ms",
2179
+ "isExpression": false,
2180
+ "asc": true,
2181
+ "nulls": "last"
2182
+ },
2183
+ {
2184
+ "expression": "id",
2185
+ "isExpression": false,
2186
+ "asc": true,
2187
+ "nulls": "last"
2188
+ }
2189
+ ],
2190
+ "isUnique": false,
2191
+ "where": "\"junior_scheduler_tasks\".\"status\" <> 'deleted'",
2192
+ "concurrently": false,
2193
+ "method": "btree",
2194
+ "with": {}
2195
+ },
2196
+ "junior_scheduler_tasks_run_now_due_idx": {
2197
+ "name": "junior_scheduler_tasks_run_now_due_idx",
2198
+ "columns": [
2199
+ {
2200
+ "expression": "run_now_at_ms",
2201
+ "isExpression": false,
2202
+ "asc": true,
2203
+ "nulls": "last"
2204
+ },
2205
+ {
2206
+ "expression": "created_at_ms",
2207
+ "isExpression": false,
2208
+ "asc": true,
2209
+ "nulls": "last"
2210
+ },
2211
+ {
2212
+ "expression": "id",
2213
+ "isExpression": false,
2214
+ "asc": true,
2215
+ "nulls": "last"
2216
+ }
2217
+ ],
2218
+ "isUnique": false,
2219
+ "where": "\"junior_scheduler_tasks\".\"status\" = 'active' AND \"junior_scheduler_tasks\".\"run_now_at_ms\" IS NOT NULL",
2220
+ "concurrently": false,
2221
+ "method": "btree",
2222
+ "with": {}
2223
+ },
2224
+ "junior_scheduler_tasks_next_run_due_idx": {
2225
+ "name": "junior_scheduler_tasks_next_run_due_idx",
2226
+ "columns": [
2227
+ {
2228
+ "expression": "next_run_at_ms",
2229
+ "isExpression": false,
2230
+ "asc": true,
2231
+ "nulls": "last"
2232
+ },
2233
+ {
2234
+ "expression": "created_at_ms",
2235
+ "isExpression": false,
2236
+ "asc": true,
2237
+ "nulls": "last"
2238
+ },
2239
+ {
2240
+ "expression": "id",
2241
+ "isExpression": false,
2242
+ "asc": true,
2243
+ "nulls": "last"
2244
+ }
2245
+ ],
2246
+ "isUnique": false,
2247
+ "where": "\"junior_scheduler_tasks\".\"status\" = 'active' AND \"junior_scheduler_tasks\".\"next_run_at_ms\" IS NOT NULL",
2248
+ "concurrently": false,
2249
+ "method": "btree",
2250
+ "with": {}
2251
+ }
2252
+ },
2253
+ "foreignKeys": {},
2254
+ "compositePrimaryKeys": {},
2255
+ "uniqueConstraints": {},
2256
+ "policies": {},
2257
+ "checkConstraints": {},
2258
+ "isRLSEnabled": false
2259
+ },
2260
+ "public.junior_stats": {
2261
+ "name": "junior_stats",
2262
+ "schema": "",
2263
+ "columns": {
2264
+ "date": {
2265
+ "name": "date",
2266
+ "type": "date",
2267
+ "primaryKey": false,
2268
+ "notNull": true
2269
+ },
2270
+ "namespace": {
2271
+ "name": "namespace",
2272
+ "type": "text",
2273
+ "primaryKey": false,
2274
+ "notNull": true
2275
+ },
2276
+ "metric": {
2277
+ "name": "metric",
2278
+ "type": "text",
2279
+ "primaryKey": false,
2280
+ "notNull": true
2281
+ },
2282
+ "name": {
2283
+ "name": "name",
2284
+ "type": "text",
2285
+ "primaryKey": false,
2286
+ "notNull": true
2287
+ },
2288
+ "count": {
2289
+ "name": "count",
2290
+ "type": "integer",
2291
+ "primaryKey": false,
2292
+ "notNull": true,
2293
+ "default": 0
2294
+ }
2295
+ },
2296
+ "indexes": {},
2297
+ "foreignKeys": {},
2298
+ "compositePrimaryKeys": {
2299
+ "junior_stats_date_namespace_metric_name_pk": {
2300
+ "name": "junior_stats_date_namespace_metric_name_pk",
2301
+ "columns": [
2302
+ "date",
2303
+ "namespace",
2304
+ "metric",
2305
+ "name"
2306
+ ]
2307
+ }
2308
+ },
2309
+ "uniqueConstraints": {},
2310
+ "policies": {},
2311
+ "checkConstraints": {},
2312
+ "isRLSEnabled": false
2313
+ },
2314
+ "public.junior_task_executions": {
2315
+ "name": "junior_task_executions",
2316
+ "schema": "",
2317
+ "columns": {
2318
+ "execution_id": {
2319
+ "name": "execution_id",
2320
+ "type": "text",
2321
+ "primaryKey": false,
2322
+ "notNull": true
2323
+ },
2324
+ "kind": {
2325
+ "name": "kind",
2326
+ "type": "text",
2327
+ "primaryKey": false,
2328
+ "notNull": true
2329
+ },
2330
+ "namespace": {
2331
+ "name": "namespace",
2332
+ "type": "text",
2333
+ "primaryKey": false,
2334
+ "notNull": true
2335
+ },
2336
+ "task_id": {
2337
+ "name": "task_id",
2338
+ "type": "text",
2339
+ "primaryKey": false,
2340
+ "notNull": true
2341
+ },
2342
+ "conversation_id": {
2343
+ "name": "conversation_id",
2344
+ "type": "text",
2345
+ "primaryKey": false,
2346
+ "notNull": false
2347
+ },
2348
+ "executed_at_ms": {
2349
+ "name": "executed_at_ms",
2350
+ "type": "bigint",
2351
+ "primaryKey": false,
2352
+ "notNull": true
2353
+ },
2354
+ "status": {
2355
+ "name": "status",
2356
+ "type": "text",
2357
+ "primaryKey": false,
2358
+ "notNull": true
2359
+ }
2360
+ },
2361
+ "indexes": {
2362
+ "junior_task_executions_task_time_idx": {
2363
+ "name": "junior_task_executions_task_time_idx",
2364
+ "columns": [
2365
+ {
2366
+ "expression": "kind",
2367
+ "isExpression": false,
2368
+ "asc": true,
2369
+ "nulls": "last"
2370
+ },
2371
+ {
2372
+ "expression": "namespace",
2373
+ "isExpression": false,
2374
+ "asc": true,
2375
+ "nulls": "last"
2376
+ },
2377
+ {
2378
+ "expression": "task_id",
2379
+ "isExpression": false,
2380
+ "asc": true,
2381
+ "nulls": "last"
2382
+ },
2383
+ {
2384
+ "expression": "executed_at_ms",
2385
+ "isExpression": false,
2386
+ "asc": true,
2387
+ "nulls": "last"
2388
+ }
2389
+ ],
2390
+ "isUnique": false,
2391
+ "concurrently": false,
2392
+ "method": "btree",
2393
+ "with": {}
2394
+ },
2395
+ "junior_task_executions_time_kind_idx": {
2396
+ "name": "junior_task_executions_time_kind_idx",
2397
+ "columns": [
2398
+ {
2399
+ "expression": "executed_at_ms",
2400
+ "isExpression": false,
2401
+ "asc": true,
2402
+ "nulls": "last"
2403
+ },
2404
+ {
2405
+ "expression": "kind",
2406
+ "isExpression": false,
2407
+ "asc": true,
2408
+ "nulls": "last"
2409
+ }
2410
+ ],
2411
+ "isUnique": false,
2412
+ "concurrently": false,
2413
+ "method": "btree",
2414
+ "with": {}
2415
+ },
2416
+ "junior_task_executions_conversation_time_idx": {
2417
+ "name": "junior_task_executions_conversation_time_idx",
2418
+ "columns": [
2419
+ {
2420
+ "expression": "conversation_id",
2421
+ "isExpression": false,
2422
+ "asc": true,
2423
+ "nulls": "last"
2424
+ },
2425
+ {
2426
+ "expression": "executed_at_ms",
2427
+ "isExpression": false,
2428
+ "asc": true,
2429
+ "nulls": "last"
2430
+ }
2431
+ ],
2432
+ "isUnique": false,
2433
+ "concurrently": false,
2434
+ "method": "btree",
2435
+ "with": {}
2436
+ }
2437
+ },
2438
+ "foreignKeys": {
2439
+ "junior_task_executions_conversation_id_junior_conversations_conversation_id_fk": {
2440
+ "name": "junior_task_executions_conversation_id_junior_conversations_conversation_id_fk",
2441
+ "tableFrom": "junior_task_executions",
2442
+ "tableTo": "junior_conversations",
2443
+ "columnsFrom": [
2444
+ "conversation_id"
2445
+ ],
2446
+ "columnsTo": [
2447
+ "conversation_id"
2448
+ ],
2449
+ "onDelete": "no action",
2450
+ "onUpdate": "no action"
2451
+ }
2452
+ },
2453
+ "compositePrimaryKeys": {
2454
+ "junior_task_executions_kind_namespace_execution_id_pk": {
2455
+ "name": "junior_task_executions_kind_namespace_execution_id_pk",
2456
+ "columns": [
2457
+ "kind",
2458
+ "namespace",
2459
+ "execution_id"
2460
+ ]
2461
+ }
2462
+ },
2463
+ "uniqueConstraints": {},
2464
+ "policies": {},
2465
+ "checkConstraints": {
2466
+ "junior_task_executions_kind_check": {
2467
+ "name": "junior_task_executions_kind_check",
2468
+ "value": "\"junior_task_executions\".\"kind\" in ('scheduled', 'event')"
2469
+ },
2470
+ "junior_task_executions_status_check": {
2471
+ "name": "junior_task_executions_status_check",
2472
+ "value": "\"junior_task_executions\".\"status\" in ('blocked', 'completed', 'failed')"
2473
+ }
2474
+ },
2475
+ "isRLSEnabled": false
2476
+ },
2477
+ "public.junior_users": {
2478
+ "name": "junior_users",
2479
+ "schema": "",
2480
+ "columns": {
2481
+ "id": {
2482
+ "name": "id",
2483
+ "type": "text",
2484
+ "primaryKey": true,
2485
+ "notNull": true
2486
+ },
2487
+ "primary_email": {
2488
+ "name": "primary_email",
2489
+ "type": "text",
2490
+ "primaryKey": false,
2491
+ "notNull": true
2492
+ },
2493
+ "primary_email_normalized": {
2494
+ "name": "primary_email_normalized",
2495
+ "type": "text",
2496
+ "primaryKey": false,
2497
+ "notNull": true
2498
+ },
2499
+ "display_name": {
2500
+ "name": "display_name",
2501
+ "type": "text",
2502
+ "primaryKey": false,
2503
+ "notNull": false
2504
+ },
2505
+ "created_at": {
2506
+ "name": "created_at",
2507
+ "type": "timestamp with time zone",
2508
+ "primaryKey": false,
2509
+ "notNull": true
2510
+ },
2511
+ "updated_at": {
2512
+ "name": "updated_at",
2513
+ "type": "timestamp with time zone",
2514
+ "primaryKey": false,
2515
+ "notNull": true
2516
+ }
2517
+ },
2518
+ "indexes": {
2519
+ "junior_users_primary_email_normalized_uidx": {
2520
+ "name": "junior_users_primary_email_normalized_uidx",
2521
+ "columns": [
2522
+ {
2523
+ "expression": "primary_email_normalized",
2524
+ "isExpression": false,
2525
+ "asc": true,
2526
+ "nulls": "last"
2527
+ }
2528
+ ],
2529
+ "isUnique": true,
2530
+ "concurrently": false,
2531
+ "method": "btree",
2532
+ "with": {}
2533
+ }
2534
+ },
2535
+ "foreignKeys": {},
2536
+ "compositePrimaryKeys": {},
2537
+ "uniqueConstraints": {},
2538
+ "policies": {},
2539
+ "checkConstraints": {},
2540
+ "isRLSEnabled": false
2541
+ }
2542
+ },
2543
+ "enums": {},
2544
+ "schemas": {},
2545
+ "sequences": {},
2546
+ "roles": {},
2547
+ "policies": {},
2548
+ "views": {},
2549
+ "_meta": {
2550
+ "columns": {},
2551
+ "schemas": {},
2552
+ "tables": {}
2553
+ }
2554
+ }