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