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