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