@sentry/junior 0.206.0 → 0.208.0

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