@sentry/junior 0.234.0 → 0.236.0

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