@sentry/junior 0.285.0 → 0.286.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 (73) hide show
  1. package/dist/{adapter-DN5AB4VU.js → adapter-JQZaJ-B_.js} +1 -1
  2. package/dist/{admin-DOITMKnn.js → admin-Dm2bimJ-.js} +1 -1
  3. package/dist/{agent-runner-BsWhHe4N.js → agent-runner-DGCwOEyL.js} +1567 -1048
  4. package/dist/api/schema.d.ts +1 -1
  5. package/dist/api/schema.js +5 -5
  6. package/dist/api.d.ts +1 -1
  7. package/dist/api.js +70 -92
  8. package/dist/{app-DyMs9330.d.ts → app-BKq0JzWx.d.ts} +2 -3
  9. package/dist/app.d.ts +1 -1
  10. package/dist/app.js +37 -40
  11. package/dist/{assistant-reply-9Jip5bsr.js → assistant-reply-CAPafcUY.js} +1 -1
  12. package/dist/{automation-Mk8aaHzy.js → automation-B-jJN_gM.js} +1 -1
  13. package/dist/{background-compaction-queue-DXkLsWoH.js → background-compaction-queue-Btu2oab_.js} +137 -3
  14. package/dist/{briefs-Cl8-nK9B.js → briefs-UMeYehUe.js} +4 -4
  15. package/dist/{catalog-runtime-Bte6jRB2.js → catalog-runtime-Bym8GVdh.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 +5 -6
  21. package/dist/cli/upgrade.d.ts +1 -1
  22. package/dist/cli/upgrade.js +3 -3
  23. package/dist/{client-DDbBucBw.js → client-B0aAs7wC.js} +2 -2
  24. package/dist/{config-DqFnykQT.js → config-B9f9Lqo5.js} +1 -1
  25. package/dist/{connections-DA4LT9LL.js → connections-CQ7p0aNJ.js} +16 -50
  26. package/dist/{conversation-D8kVoCrP.js → conversation-BusI2uzj.js} +15 -6
  27. package/dist/{conversation-pending-messages-BvROq1bq.js → conversation-pending-messages-DwehU0Fd.js} +1 -1
  28. package/dist/{conversation-privacy-D0j_h70R.js → conversation-privacy-Cd_nZZBM.js} +1 -1
  29. package/dist/{credential-sync-hcsYatw-.js → credential-sync-DmiJi_At.js} +13 -13
  30. package/dist/{db-BhHZSuFw.d.ts → db-C5zi4ecs.d.ts} +4 -4
  31. package/dist/{executor-BLEMIgIZ.js → executor-Dipi2Ixl.js} +11 -17
  32. package/dist/instrumentation.js +2 -2
  33. package/dist/{logging-BfORLKoq.js → logging-CMFhLLj4.js} +1 -1
  34. package/dist/{media-Bu9C6lz0.js → media-B-BpXo41.js} +14 -2
  35. package/dist/{message-DqjuKzUx.js → message-D1xLljUF.js} +9 -9
  36. package/dist/nitro.d.ts +1 -1
  37. package/dist/nitro.js +2 -3
  38. package/dist/{oauth-callback-server-CFSRzu1n.js → oauth-callback-server-DCAFIUQr.js} +2 -2
  39. package/dist/{projection-DliWYrnT.js → projection-CoeMNxJ4.js} +286 -212
  40. package/dist/{prompt-BvIUzY4y.js → prompt-C9OQEfan.js} +1 -1
  41. package/dist/{registry-rC7MCxu8.js → registry-u-sFYtx_.js} +1 -1
  42. package/dist/{resolve-Biu8Qw3u.js → resolve-DYqgL3Eo.js} +3 -3
  43. package/dist/{result-DxJMCX47.js → result-CescSwAw.js} +8 -8
  44. package/dist/{runner-BQJSFLKg.js → runner-Cr67a8TB.js} +16 -12
  45. package/dist/{sandbox-egress-signals-6aMxJSDn.js → sandbox-egress-signals-DLOazy5W.js} +1 -1
  46. package/dist/{schema-BasXTvi2.js → schema-BUSi3sgv.js} +5 -5
  47. package/dist/{schema-BUviRAs8.d.ts → schema-Ih60j59-.d.ts} +44 -7
  48. package/dist/{service-account-BI5Wgx22.js → service-account-CGEqz9wG.js} +3 -3
  49. package/dist/{service-account-CAE-_1dR.js → service-account-CsKxktLk.js} +3 -3
  50. package/dist/{session-stop-CA-jOJ84.js → session-stop-CGz5DByb.js} +22 -20
  51. package/dist/{skills-B22duVJU.js → skills-COCqf61f.js} +2 -2
  52. package/dist/{spawn-BB2_4VYn.js → spawn-C8F_iXWO.js} +13 -2
  53. package/dist/{stop-DioIcEAu.js → stop-GyFZkHuQ.js} +242 -952
  54. package/dist/{store-Dn4W7qgH.js → store-D0-8plWp.js} +3 -3
  55. package/dist/{turn-session-routing-CGMKrYOj.js → task-runner-xPuQmEot.js} +1439 -993
  56. package/dist/{store-B26LV6UP.js → turn-failure-response-BOviBdT-.js} +331 -5
  57. package/dist/{validation-TzhfQABF.js → validation-DZDKorGz.js} +1 -1
  58. package/dist/{version-DSk8CFvA.js → version-BTIz7fGi.js} +1 -1
  59. package/dist/version.js +1 -1
  60. package/dist/{viewer-1Ea81s0b.js → viewer-CH-ASQzh.js} +39 -36
  61. package/dist/{work-ybG4_q5C.js → work-C75_IM5e.js} +92 -87
  62. package/dist/{worker-ccSyZRNz.js → worker-Dl47I729.js} +6 -6
  63. package/migrations/0086_shared_archive.sql +31 -0
  64. package/migrations/0087_child_location.sql +64 -0
  65. package/migrations/meta/0086_snapshot.json +4366 -0
  66. package/migrations/meta/0087_snapshot.json +4366 -0
  67. package/migrations/meta/_journal.json +14 -0
  68. package/package.json +5 -4
  69. package/dist/task-queue-Bt0IoR2i.js +0 -139
  70. package/dist/task-runner-D8lddjzp.js +0 -290
  71. package/dist/thread-state-CrFk3K_7.js +0 -173
  72. package/dist/turn-failure-response-DaJ04qVj.js +0 -224
  73. package/dist/turn-lifecycle-C2mXS7AZ.js +0 -58
@@ -0,0 +1,4366 @@
1
+ {
2
+ "id": "b6c17b84-b3b9-4da9-a15c-866625ef4635",
3
+ "prevId": "ff567d34-57b2-44b8-adf8-c88d68e35eeb",
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_plugin_conversation_idx": {
1926
+ "name": "junior_conversation_events_plugin_conversation_idx",
1927
+ "columns": [
1928
+ {
1929
+ "expression": "conversation_id",
1930
+ "isExpression": false,
1931
+ "asc": true,
1932
+ "nulls": "last"
1933
+ },
1934
+ {
1935
+ "expression": "(\"payload\"->>'namespace')",
1936
+ "asc": true,
1937
+ "isExpression": true,
1938
+ "nulls": "last"
1939
+ },
1940
+ {
1941
+ "expression": "(\"payload\"->>'name')",
1942
+ "asc": true,
1943
+ "isExpression": true,
1944
+ "nulls": "last"
1945
+ },
1946
+ {
1947
+ "expression": "seq",
1948
+ "isExpression": false,
1949
+ "asc": true,
1950
+ "nulls": "last"
1951
+ }
1952
+ ],
1953
+ "isUnique": false,
1954
+ "where": "\"junior_conversation_events\".\"type\" = 'structured_event'",
1955
+ "concurrently": false,
1956
+ "method": "btree",
1957
+ "with": {}
1958
+ },
1959
+ "junior_conversation_events_actor_identity_idx": {
1960
+ "name": "junior_conversation_events_actor_identity_idx",
1961
+ "columns": [
1962
+ {
1963
+ "expression": "actor_identity_id",
1964
+ "isExpression": false,
1965
+ "asc": true,
1966
+ "nulls": "last"
1967
+ },
1968
+ {
1969
+ "expression": "conversation_id",
1970
+ "isExpression": false,
1971
+ "asc": true,
1972
+ "nulls": "last"
1973
+ },
1974
+ {
1975
+ "expression": "seq",
1976
+ "isExpression": false,
1977
+ "asc": true,
1978
+ "nulls": "last"
1979
+ }
1980
+ ],
1981
+ "isUnique": false,
1982
+ "concurrently": false,
1983
+ "method": "btree",
1984
+ "with": {}
1985
+ },
1986
+ "junior_conversation_events_author_idx": {
1987
+ "name": "junior_conversation_events_author_idx",
1988
+ "columns": [
1989
+ {
1990
+ "expression": "conversation_id",
1991
+ "isExpression": false,
1992
+ "asc": true,
1993
+ "nulls": "last"
1994
+ },
1995
+ {
1996
+ "expression": "actor_identity_id",
1997
+ "isExpression": false,
1998
+ "asc": true,
1999
+ "nulls": "last"
2000
+ },
2001
+ {
2002
+ "expression": "seq",
2003
+ "isExpression": false,
2004
+ "asc": true,
2005
+ "nulls": "last"
2006
+ }
2007
+ ],
2008
+ "isUnique": false,
2009
+ "where": "\"junior_conversation_events\".\"actor_identity_id\" is not null",
2010
+ "concurrently": false,
2011
+ "method": "btree",
2012
+ "with": {}
2013
+ },
2014
+ "junior_conversation_events_message_role_idx": {
2015
+ "name": "junior_conversation_events_message_role_idx",
2016
+ "columns": [
2017
+ {
2018
+ "expression": "conversation_id",
2019
+ "isExpression": false,
2020
+ "asc": true,
2021
+ "nulls": "last"
2022
+ },
2023
+ {
2024
+ "expression": "(\"payload\"->>'role')",
2025
+ "asc": true,
2026
+ "isExpression": true,
2027
+ "nulls": "last"
2028
+ },
2029
+ {
2030
+ "expression": "created_at",
2031
+ "isExpression": false,
2032
+ "asc": true,
2033
+ "nulls": "last"
2034
+ },
2035
+ {
2036
+ "expression": "seq",
2037
+ "isExpression": false,
2038
+ "asc": true,
2039
+ "nulls": "last"
2040
+ }
2041
+ ],
2042
+ "isUnique": false,
2043
+ "where": "\"junior_conversation_events\".\"type\" = 'message'",
2044
+ "concurrently": false,
2045
+ "method": "btree",
2046
+ "with": {}
2047
+ },
2048
+ "junior_conversation_events_user_message_time_idx": {
2049
+ "name": "junior_conversation_events_user_message_time_idx",
2050
+ "columns": [
2051
+ {
2052
+ "expression": "conversation_id",
2053
+ "isExpression": false,
2054
+ "asc": true,
2055
+ "nulls": "last"
2056
+ },
2057
+ {
2058
+ "expression": "created_at",
2059
+ "isExpression": false,
2060
+ "asc": true,
2061
+ "nulls": "last"
2062
+ },
2063
+ {
2064
+ "expression": "seq",
2065
+ "isExpression": false,
2066
+ "asc": true,
2067
+ "nulls": "last"
2068
+ }
2069
+ ],
2070
+ "isUnique": false,
2071
+ "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')",
2072
+ "concurrently": false,
2073
+ "method": "btree",
2074
+ "with": {}
2075
+ },
2076
+ "junior_conversation_events_message_search_idx": {
2077
+ "name": "junior_conversation_events_message_search_idx",
2078
+ "columns": [
2079
+ {
2080
+ "expression": "to_tsvector('english', \"payload\"->>'text')",
2081
+ "asc": true,
2082
+ "isExpression": true,
2083
+ "nulls": "last"
2084
+ }
2085
+ ],
2086
+ "isUnique": false,
2087
+ "where": "\"junior_conversation_events\".\"type\" = 'message'",
2088
+ "concurrently": false,
2089
+ "method": "gin",
2090
+ "with": {}
2091
+ },
2092
+ "junior_conversation_events_idempotency_idx": {
2093
+ "name": "junior_conversation_events_idempotency_idx",
2094
+ "columns": [
2095
+ {
2096
+ "expression": "conversation_id",
2097
+ "isExpression": false,
2098
+ "asc": true,
2099
+ "nulls": "last"
2100
+ },
2101
+ {
2102
+ "expression": "idempotency_key",
2103
+ "isExpression": false,
2104
+ "asc": true,
2105
+ "nulls": "last"
2106
+ }
2107
+ ],
2108
+ "isUnique": true,
2109
+ "concurrently": false,
2110
+ "method": "btree",
2111
+ "with": {}
2112
+ }
2113
+ },
2114
+ "foreignKeys": {
2115
+ "junior_conversation_events_actor_identity_id_junior_identities_id_fk": {
2116
+ "name": "junior_conversation_events_actor_identity_id_junior_identities_id_fk",
2117
+ "tableFrom": "junior_conversation_events",
2118
+ "tableTo": "junior_identities",
2119
+ "columnsFrom": ["actor_identity_id"],
2120
+ "columnsTo": ["id"],
2121
+ "onDelete": "no action",
2122
+ "onUpdate": "no action"
2123
+ },
2124
+ "junior_conversation_events_conversation_id_junior_conversations_conversation_id_fk": {
2125
+ "name": "junior_conversation_events_conversation_id_junior_conversations_conversation_id_fk",
2126
+ "tableFrom": "junior_conversation_events",
2127
+ "tableTo": "junior_conversations",
2128
+ "columnsFrom": ["conversation_id"],
2129
+ "columnsTo": ["conversation_id"],
2130
+ "onDelete": "no action",
2131
+ "onUpdate": "no action"
2132
+ }
2133
+ },
2134
+ "compositePrimaryKeys": {
2135
+ "junior_conversation_events_conversation_id_seq_pk": {
2136
+ "name": "junior_conversation_events_conversation_id_seq_pk",
2137
+ "columns": ["conversation_id", "seq"]
2138
+ }
2139
+ },
2140
+ "uniqueConstraints": {},
2141
+ "policies": {},
2142
+ "checkConstraints": {},
2143
+ "isRLSEnabled": false
2144
+ },
2145
+ "public.junior_conversation_metrics": {
2146
+ "name": "junior_conversation_metrics",
2147
+ "schema": "",
2148
+ "columns": {
2149
+ "conversation_id": {
2150
+ "name": "conversation_id",
2151
+ "type": "text",
2152
+ "primaryKey": false,
2153
+ "notNull": true
2154
+ },
2155
+ "run_id": {
2156
+ "name": "run_id",
2157
+ "type": "text",
2158
+ "primaryKey": false,
2159
+ "notNull": true
2160
+ },
2161
+ "metric": {
2162
+ "name": "metric",
2163
+ "type": "text",
2164
+ "primaryKey": false,
2165
+ "notNull": true
2166
+ },
2167
+ "value": {
2168
+ "name": "value",
2169
+ "type": "double precision",
2170
+ "primaryKey": false,
2171
+ "notNull": true
2172
+ },
2173
+ "occurred_at": {
2174
+ "name": "occurred_at",
2175
+ "type": "timestamp with time zone",
2176
+ "primaryKey": false,
2177
+ "notNull": true
2178
+ },
2179
+ "updated_at": {
2180
+ "name": "updated_at",
2181
+ "type": "timestamp with time zone",
2182
+ "primaryKey": false,
2183
+ "notNull": true
2184
+ }
2185
+ },
2186
+ "indexes": {
2187
+ "junior_conversation_metrics_occurred_at_metric_idx": {
2188
+ "name": "junior_conversation_metrics_occurred_at_metric_idx",
2189
+ "columns": [
2190
+ {
2191
+ "expression": "occurred_at",
2192
+ "isExpression": false,
2193
+ "asc": true,
2194
+ "nulls": "last"
2195
+ },
2196
+ {
2197
+ "expression": "metric",
2198
+ "isExpression": false,
2199
+ "asc": true,
2200
+ "nulls": "last"
2201
+ }
2202
+ ],
2203
+ "isUnique": false,
2204
+ "concurrently": false,
2205
+ "method": "btree",
2206
+ "with": {}
2207
+ }
2208
+ },
2209
+ "foreignKeys": {
2210
+ "junior_conversation_metrics_conversation_id_junior_conversations_conversation_id_fk": {
2211
+ "name": "junior_conversation_metrics_conversation_id_junior_conversations_conversation_id_fk",
2212
+ "tableFrom": "junior_conversation_metrics",
2213
+ "tableTo": "junior_conversations",
2214
+ "columnsFrom": ["conversation_id"],
2215
+ "columnsTo": ["conversation_id"],
2216
+ "onDelete": "no action",
2217
+ "onUpdate": "no action"
2218
+ }
2219
+ },
2220
+ "compositePrimaryKeys": {
2221
+ "junior_conversation_metrics_conversation_id_run_id_metric_pk": {
2222
+ "name": "junior_conversation_metrics_conversation_id_run_id_metric_pk",
2223
+ "columns": ["conversation_id", "run_id", "metric"]
2224
+ }
2225
+ },
2226
+ "uniqueConstraints": {},
2227
+ "policies": {},
2228
+ "checkConstraints": {},
2229
+ "isRLSEnabled": false
2230
+ },
2231
+ "public.junior_conversation_participants": {
2232
+ "name": "junior_conversation_participants",
2233
+ "schema": "",
2234
+ "columns": {
2235
+ "user_id": {
2236
+ "name": "user_id",
2237
+ "type": "text",
2238
+ "primaryKey": false,
2239
+ "notNull": true
2240
+ },
2241
+ "root_conversation_id": {
2242
+ "name": "root_conversation_id",
2243
+ "type": "text",
2244
+ "primaryKey": false,
2245
+ "notNull": true
2246
+ },
2247
+ "last_message_at": {
2248
+ "name": "last_message_at",
2249
+ "type": "timestamp with time zone",
2250
+ "primaryKey": false,
2251
+ "notNull": true
2252
+ },
2253
+ "archived_at": {
2254
+ "name": "archived_at",
2255
+ "type": "timestamp with time zone",
2256
+ "primaryKey": false,
2257
+ "notNull": false
2258
+ },
2259
+ "pinned_at": {
2260
+ "name": "pinned_at",
2261
+ "type": "timestamp with time zone",
2262
+ "primaryKey": false,
2263
+ "notNull": false
2264
+ },
2265
+ "pin_position": {
2266
+ "name": "pin_position",
2267
+ "type": "integer",
2268
+ "primaryKey": false,
2269
+ "notNull": false
2270
+ },
2271
+ "auto_archive": {
2272
+ "name": "auto_archive",
2273
+ "type": "boolean",
2274
+ "primaryKey": false,
2275
+ "notNull": false
2276
+ }
2277
+ },
2278
+ "indexes": {
2279
+ "junior_conversation_participants_user_activity_idx": {
2280
+ "name": "junior_conversation_participants_user_activity_idx",
2281
+ "columns": [
2282
+ {
2283
+ "expression": "user_id",
2284
+ "isExpression": false,
2285
+ "asc": true,
2286
+ "nulls": "last"
2287
+ },
2288
+ {
2289
+ "expression": "last_message_at",
2290
+ "isExpression": false,
2291
+ "asc": false,
2292
+ "nulls": "last"
2293
+ }
2294
+ ],
2295
+ "isUnique": false,
2296
+ "concurrently": false,
2297
+ "method": "btree",
2298
+ "with": {}
2299
+ },
2300
+ "junior_conversation_participants_root_idx": {
2301
+ "name": "junior_conversation_participants_root_idx",
2302
+ "columns": [
2303
+ {
2304
+ "expression": "root_conversation_id",
2305
+ "isExpression": false,
2306
+ "asc": true,
2307
+ "nulls": "last"
2308
+ }
2309
+ ],
2310
+ "isUnique": false,
2311
+ "concurrently": false,
2312
+ "method": "btree",
2313
+ "with": {}
2314
+ },
2315
+ "junior_conversation_participants_auto_archive_idx": {
2316
+ "name": "junior_conversation_participants_auto_archive_idx",
2317
+ "columns": [
2318
+ {
2319
+ "expression": "user_id",
2320
+ "isExpression": false,
2321
+ "asc": true,
2322
+ "nulls": "last"
2323
+ }
2324
+ ],
2325
+ "isUnique": false,
2326
+ "where": "\"junior_conversation_participants\".\"auto_archive\"",
2327
+ "concurrently": false,
2328
+ "method": "btree",
2329
+ "with": {}
2330
+ }
2331
+ },
2332
+ "foreignKeys": {
2333
+ "junior_conversation_participants_user_id_junior_users_id_fk": {
2334
+ "name": "junior_conversation_participants_user_id_junior_users_id_fk",
2335
+ "tableFrom": "junior_conversation_participants",
2336
+ "tableTo": "junior_users",
2337
+ "columnsFrom": ["user_id"],
2338
+ "columnsTo": ["id"],
2339
+ "onDelete": "no action",
2340
+ "onUpdate": "no action"
2341
+ },
2342
+ "junior_conversation_participants_root_conversation_id_junior_conversations_conversation_id_fk": {
2343
+ "name": "junior_conversation_participants_root_conversation_id_junior_conversations_conversation_id_fk",
2344
+ "tableFrom": "junior_conversation_participants",
2345
+ "tableTo": "junior_conversations",
2346
+ "columnsFrom": ["root_conversation_id"],
2347
+ "columnsTo": ["conversation_id"],
2348
+ "onDelete": "no action",
2349
+ "onUpdate": "no action"
2350
+ }
2351
+ },
2352
+ "compositePrimaryKeys": {
2353
+ "junior_conversation_participants_user_root_pk": {
2354
+ "name": "junior_conversation_participants_user_root_pk",
2355
+ "columns": ["user_id", "root_conversation_id"]
2356
+ }
2357
+ },
2358
+ "uniqueConstraints": {},
2359
+ "policies": {},
2360
+ "checkConstraints": {},
2361
+ "isRLSEnabled": false
2362
+ },
2363
+ "public.junior_conversation_read_positions": {
2364
+ "name": "junior_conversation_read_positions",
2365
+ "schema": "",
2366
+ "columns": {
2367
+ "user_id": {
2368
+ "name": "user_id",
2369
+ "type": "text",
2370
+ "primaryKey": false,
2371
+ "notNull": true
2372
+ },
2373
+ "conversation_id": {
2374
+ "name": "conversation_id",
2375
+ "type": "text",
2376
+ "primaryKey": false,
2377
+ "notNull": true
2378
+ },
2379
+ "last_read_seq": {
2380
+ "name": "last_read_seq",
2381
+ "type": "integer",
2382
+ "primaryKey": false,
2383
+ "notNull": true
2384
+ },
2385
+ "updated_at": {
2386
+ "name": "updated_at",
2387
+ "type": "timestamp with time zone",
2388
+ "primaryKey": false,
2389
+ "notNull": true
2390
+ }
2391
+ },
2392
+ "indexes": {},
2393
+ "foreignKeys": {
2394
+ "junior_conversation_read_positions_user_id_junior_users_id_fk": {
2395
+ "name": "junior_conversation_read_positions_user_id_junior_users_id_fk",
2396
+ "tableFrom": "junior_conversation_read_positions",
2397
+ "tableTo": "junior_users",
2398
+ "columnsFrom": ["user_id"],
2399
+ "columnsTo": ["id"],
2400
+ "onDelete": "no action",
2401
+ "onUpdate": "no action"
2402
+ },
2403
+ "junior_conversation_read_positions_conversation_id_junior_conversations_conversation_id_fk": {
2404
+ "name": "junior_conversation_read_positions_conversation_id_junior_conversations_conversation_id_fk",
2405
+ "tableFrom": "junior_conversation_read_positions",
2406
+ "tableTo": "junior_conversations",
2407
+ "columnsFrom": ["conversation_id"],
2408
+ "columnsTo": ["conversation_id"],
2409
+ "onDelete": "no action",
2410
+ "onUpdate": "no action"
2411
+ }
2412
+ },
2413
+ "compositePrimaryKeys": {
2414
+ "junior_conversation_read_positions_user_conversation_pk": {
2415
+ "name": "junior_conversation_read_positions_user_conversation_pk",
2416
+ "columns": ["user_id", "conversation_id"]
2417
+ }
2418
+ },
2419
+ "uniqueConstraints": {},
2420
+ "policies": {},
2421
+ "checkConstraints": {},
2422
+ "isRLSEnabled": false
2423
+ },
2424
+ "public.junior_conversations": {
2425
+ "name": "junior_conversations",
2426
+ "schema": "",
2427
+ "columns": {
2428
+ "conversation_id": {
2429
+ "name": "conversation_id",
2430
+ "type": "text",
2431
+ "primaryKey": true,
2432
+ "notNull": true
2433
+ },
2434
+ "schema_version": {
2435
+ "name": "schema_version",
2436
+ "type": "integer",
2437
+ "primaryKey": false,
2438
+ "notNull": true,
2439
+ "default": 1
2440
+ },
2441
+ "source": {
2442
+ "name": "source",
2443
+ "type": "text",
2444
+ "primaryKey": false,
2445
+ "notNull": false
2446
+ },
2447
+ "source_json": {
2448
+ "name": "source_json",
2449
+ "type": "jsonb",
2450
+ "primaryKey": false,
2451
+ "notNull": false
2452
+ },
2453
+ "location_json": {
2454
+ "name": "location_json",
2455
+ "type": "jsonb",
2456
+ "primaryKey": false,
2457
+ "notNull": false
2458
+ },
2459
+ "destination_id": {
2460
+ "name": "destination_id",
2461
+ "type": "text",
2462
+ "primaryKey": false,
2463
+ "notNull": false
2464
+ },
2465
+ "destination_json": {
2466
+ "name": "destination_json",
2467
+ "type": "jsonb",
2468
+ "primaryKey": false,
2469
+ "notNull": false
2470
+ },
2471
+ "actor_identity_id": {
2472
+ "name": "actor_identity_id",
2473
+ "type": "text",
2474
+ "primaryKey": false,
2475
+ "notNull": false
2476
+ },
2477
+ "creator_identity_id": {
2478
+ "name": "creator_identity_id",
2479
+ "type": "text",
2480
+ "primaryKey": false,
2481
+ "notNull": false
2482
+ },
2483
+ "credential_subject_identity_id": {
2484
+ "name": "credential_subject_identity_id",
2485
+ "type": "text",
2486
+ "primaryKey": false,
2487
+ "notNull": false
2488
+ },
2489
+ "actor_json": {
2490
+ "name": "actor_json",
2491
+ "type": "jsonb",
2492
+ "primaryKey": false,
2493
+ "notNull": false
2494
+ },
2495
+ "channel_name": {
2496
+ "name": "channel_name",
2497
+ "type": "text",
2498
+ "primaryKey": false,
2499
+ "notNull": false
2500
+ },
2501
+ "title": {
2502
+ "name": "title",
2503
+ "type": "text",
2504
+ "primaryKey": false,
2505
+ "notNull": false
2506
+ },
2507
+ "created_at": {
2508
+ "name": "created_at",
2509
+ "type": "timestamp with time zone",
2510
+ "primaryKey": false,
2511
+ "notNull": true
2512
+ },
2513
+ "last_activity_at": {
2514
+ "name": "last_activity_at",
2515
+ "type": "timestamp with time zone",
2516
+ "primaryKey": false,
2517
+ "notNull": true
2518
+ },
2519
+ "updated_at": {
2520
+ "name": "updated_at",
2521
+ "type": "timestamp with time zone",
2522
+ "primaryKey": false,
2523
+ "notNull": true
2524
+ },
2525
+ "execution_updated_at": {
2526
+ "name": "execution_updated_at",
2527
+ "type": "timestamp with time zone",
2528
+ "primaryKey": false,
2529
+ "notNull": false
2530
+ },
2531
+ "execution_status": {
2532
+ "name": "execution_status",
2533
+ "type": "text",
2534
+ "primaryKey": false,
2535
+ "notNull": true
2536
+ },
2537
+ "run_id": {
2538
+ "name": "run_id",
2539
+ "type": "text",
2540
+ "primaryKey": false,
2541
+ "notNull": false
2542
+ },
2543
+ "last_checkpoint_at": {
2544
+ "name": "last_checkpoint_at",
2545
+ "type": "timestamp with time zone",
2546
+ "primaryKey": false,
2547
+ "notNull": false
2548
+ },
2549
+ "last_enqueued_at": {
2550
+ "name": "last_enqueued_at",
2551
+ "type": "timestamp with time zone",
2552
+ "primaryKey": false,
2553
+ "notNull": false
2554
+ },
2555
+ "parent_conversation_id": {
2556
+ "name": "parent_conversation_id",
2557
+ "type": "text",
2558
+ "primaryKey": false,
2559
+ "notNull": false
2560
+ },
2561
+ "kind": {
2562
+ "name": "kind",
2563
+ "type": "text",
2564
+ "primaryKey": false,
2565
+ "notNull": false
2566
+ },
2567
+ "child_archived_at": {
2568
+ "name": "child_archived_at",
2569
+ "type": "timestamp with time zone",
2570
+ "primaryKey": false,
2571
+ "notNull": false
2572
+ },
2573
+ "forked_from_conversation_id": {
2574
+ "name": "forked_from_conversation_id",
2575
+ "type": "text",
2576
+ "primaryKey": false,
2577
+ "notNull": false
2578
+ },
2579
+ "quick_question_at": {
2580
+ "name": "quick_question_at",
2581
+ "type": "timestamp with time zone",
2582
+ "primaryKey": false,
2583
+ "notNull": false
2584
+ },
2585
+ "root_conversation_id": {
2586
+ "name": "root_conversation_id",
2587
+ "type": "text",
2588
+ "primaryKey": false,
2589
+ "notNull": false
2590
+ },
2591
+ "transcript_purged_at": {
2592
+ "name": "transcript_purged_at",
2593
+ "type": "timestamp with time zone",
2594
+ "primaryKey": false,
2595
+ "notNull": false
2596
+ },
2597
+ "stopped_at": {
2598
+ "name": "stopped_at",
2599
+ "type": "timestamp with time zone",
2600
+ "primaryKey": false,
2601
+ "notNull": false
2602
+ },
2603
+ "duration_ms": {
2604
+ "name": "duration_ms",
2605
+ "type": "integer",
2606
+ "primaryKey": false,
2607
+ "notNull": true,
2608
+ "default": 0
2609
+ },
2610
+ "usage_json": {
2611
+ "name": "usage_json",
2612
+ "type": "jsonb",
2613
+ "primaryKey": false,
2614
+ "notNull": false
2615
+ },
2616
+ "execution_duration_ms": {
2617
+ "name": "execution_duration_ms",
2618
+ "type": "integer",
2619
+ "primaryKey": false,
2620
+ "notNull": true,
2621
+ "default": 0
2622
+ },
2623
+ "execution_usage_json": {
2624
+ "name": "execution_usage_json",
2625
+ "type": "jsonb",
2626
+ "primaryKey": false,
2627
+ "notNull": false
2628
+ },
2629
+ "metric_run_id": {
2630
+ "name": "metric_run_id",
2631
+ "type": "text",
2632
+ "primaryKey": false,
2633
+ "notNull": false
2634
+ },
2635
+ "detail_version": {
2636
+ "name": "detail_version",
2637
+ "type": "integer",
2638
+ "primaryKey": false,
2639
+ "notNull": true,
2640
+ "default": 0
2641
+ },
2642
+ "archived_at": {
2643
+ "name": "archived_at",
2644
+ "type": "timestamp with time zone",
2645
+ "primaryKey": false,
2646
+ "notNull": false
2647
+ }
2648
+ },
2649
+ "indexes": {
2650
+ "junior_conversations_last_activity_idx": {
2651
+ "name": "junior_conversations_last_activity_idx",
2652
+ "columns": [
2653
+ {
2654
+ "expression": "last_activity_at",
2655
+ "isExpression": false,
2656
+ "asc": false,
2657
+ "nulls": "last"
2658
+ },
2659
+ {
2660
+ "expression": "conversation_id",
2661
+ "isExpression": false,
2662
+ "asc": true,
2663
+ "nulls": "last"
2664
+ }
2665
+ ],
2666
+ "isUnique": false,
2667
+ "concurrently": false,
2668
+ "method": "btree",
2669
+ "with": {}
2670
+ },
2671
+ "junior_conversations_active_idx": {
2672
+ "name": "junior_conversations_active_idx",
2673
+ "columns": [
2674
+ {
2675
+ "expression": "coalesce(\"execution_updated_at\", \"updated_at\")",
2676
+ "asc": true,
2677
+ "isExpression": true,
2678
+ "nulls": "last"
2679
+ },
2680
+ {
2681
+ "expression": "conversation_id",
2682
+ "isExpression": false,
2683
+ "asc": true,
2684
+ "nulls": "last"
2685
+ }
2686
+ ],
2687
+ "isUnique": false,
2688
+ "where": "\"junior_conversations\".\"execution_status\" <> 'idle'",
2689
+ "concurrently": false,
2690
+ "method": "btree",
2691
+ "with": {}
2692
+ },
2693
+ "junior_conversations_destination_activity_idx": {
2694
+ "name": "junior_conversations_destination_activity_idx",
2695
+ "columns": [
2696
+ {
2697
+ "expression": "destination_id",
2698
+ "isExpression": false,
2699
+ "asc": true,
2700
+ "nulls": "last"
2701
+ },
2702
+ {
2703
+ "expression": "last_activity_at",
2704
+ "isExpression": false,
2705
+ "asc": false,
2706
+ "nulls": "last"
2707
+ }
2708
+ ],
2709
+ "isUnique": false,
2710
+ "concurrently": false,
2711
+ "method": "btree",
2712
+ "with": {}
2713
+ },
2714
+ "junior_conversations_actor_activity_idx": {
2715
+ "name": "junior_conversations_actor_activity_idx",
2716
+ "columns": [
2717
+ {
2718
+ "expression": "actor_identity_id",
2719
+ "isExpression": false,
2720
+ "asc": true,
2721
+ "nulls": "last"
2722
+ },
2723
+ {
2724
+ "expression": "last_activity_at",
2725
+ "isExpression": false,
2726
+ "asc": false,
2727
+ "nulls": "last"
2728
+ }
2729
+ ],
2730
+ "isUnique": false,
2731
+ "concurrently": false,
2732
+ "method": "btree",
2733
+ "with": {}
2734
+ },
2735
+ "junior_conversations_parent_idx": {
2736
+ "name": "junior_conversations_parent_idx",
2737
+ "columns": [
2738
+ {
2739
+ "expression": "parent_conversation_id",
2740
+ "isExpression": false,
2741
+ "asc": true,
2742
+ "nulls": "last"
2743
+ }
2744
+ ],
2745
+ "isUnique": false,
2746
+ "concurrently": false,
2747
+ "method": "btree",
2748
+ "with": {}
2749
+ },
2750
+ "junior_conversations_forked_from_idx": {
2751
+ "name": "junior_conversations_forked_from_idx",
2752
+ "columns": [
2753
+ {
2754
+ "expression": "forked_from_conversation_id",
2755
+ "isExpression": false,
2756
+ "asc": true,
2757
+ "nulls": "last"
2758
+ }
2759
+ ],
2760
+ "isUnique": false,
2761
+ "concurrently": false,
2762
+ "method": "btree",
2763
+ "with": {}
2764
+ },
2765
+ "junior_conversations_root_idx": {
2766
+ "name": "junior_conversations_root_idx",
2767
+ "columns": [
2768
+ {
2769
+ "expression": "root_conversation_id",
2770
+ "isExpression": false,
2771
+ "asc": true,
2772
+ "nulls": "last"
2773
+ }
2774
+ ],
2775
+ "isUnique": false,
2776
+ "concurrently": false,
2777
+ "method": "btree",
2778
+ "with": {}
2779
+ }
2780
+ },
2781
+ "foreignKeys": {
2782
+ "junior_conversations_destination_id_junior_destinations_id_fk": {
2783
+ "name": "junior_conversations_destination_id_junior_destinations_id_fk",
2784
+ "tableFrom": "junior_conversations",
2785
+ "tableTo": "junior_destinations",
2786
+ "columnsFrom": ["destination_id"],
2787
+ "columnsTo": ["id"],
2788
+ "onDelete": "no action",
2789
+ "onUpdate": "no action"
2790
+ },
2791
+ "junior_conversations_actor_identity_id_junior_identities_id_fk": {
2792
+ "name": "junior_conversations_actor_identity_id_junior_identities_id_fk",
2793
+ "tableFrom": "junior_conversations",
2794
+ "tableTo": "junior_identities",
2795
+ "columnsFrom": ["actor_identity_id"],
2796
+ "columnsTo": ["id"],
2797
+ "onDelete": "no action",
2798
+ "onUpdate": "no action"
2799
+ },
2800
+ "junior_conversations_creator_identity_id_junior_identities_id_fk": {
2801
+ "name": "junior_conversations_creator_identity_id_junior_identities_id_fk",
2802
+ "tableFrom": "junior_conversations",
2803
+ "tableTo": "junior_identities",
2804
+ "columnsFrom": ["creator_identity_id"],
2805
+ "columnsTo": ["id"],
2806
+ "onDelete": "no action",
2807
+ "onUpdate": "no action"
2808
+ },
2809
+ "junior_conversations_credential_subject_identity_id_junior_identities_id_fk": {
2810
+ "name": "junior_conversations_credential_subject_identity_id_junior_identities_id_fk",
2811
+ "tableFrom": "junior_conversations",
2812
+ "tableTo": "junior_identities",
2813
+ "columnsFrom": ["credential_subject_identity_id"],
2814
+ "columnsTo": ["id"],
2815
+ "onDelete": "no action",
2816
+ "onUpdate": "no action"
2817
+ },
2818
+ "junior_conversations_parent_conversation_id_junior_conversations_conversation_id_fk": {
2819
+ "name": "junior_conversations_parent_conversation_id_junior_conversations_conversation_id_fk",
2820
+ "tableFrom": "junior_conversations",
2821
+ "tableTo": "junior_conversations",
2822
+ "columnsFrom": ["parent_conversation_id"],
2823
+ "columnsTo": ["conversation_id"],
2824
+ "onDelete": "no action",
2825
+ "onUpdate": "no action"
2826
+ },
2827
+ "junior_conversations_forked_from_conversation_id_junior_conversations_conversation_id_fk": {
2828
+ "name": "junior_conversations_forked_from_conversation_id_junior_conversations_conversation_id_fk",
2829
+ "tableFrom": "junior_conversations",
2830
+ "tableTo": "junior_conversations",
2831
+ "columnsFrom": ["forked_from_conversation_id"],
2832
+ "columnsTo": ["conversation_id"],
2833
+ "onDelete": "set null",
2834
+ "onUpdate": "no action"
2835
+ },
2836
+ "junior_conversations_root_conversation_id_junior_conversations_conversation_id_fk": {
2837
+ "name": "junior_conversations_root_conversation_id_junior_conversations_conversation_id_fk",
2838
+ "tableFrom": "junior_conversations",
2839
+ "tableTo": "junior_conversations",
2840
+ "columnsFrom": ["root_conversation_id"],
2841
+ "columnsTo": ["conversation_id"],
2842
+ "onDelete": "no action",
2843
+ "onUpdate": "no action"
2844
+ }
2845
+ },
2846
+ "compositePrimaryKeys": {},
2847
+ "uniqueConstraints": {},
2848
+ "policies": {},
2849
+ "checkConstraints": {
2850
+ "junior_conversations_kind_check": {
2851
+ "name": "junior_conversations_kind_check",
2852
+ "value": "\"junior_conversations\".\"kind\" in ('root', 'thread', 'task')"
2853
+ },
2854
+ "junior_conversations_kind_parent_check": {
2855
+ "name": "junior_conversations_kind_parent_check",
2856
+ "value": "\"junior_conversations\".\"kind\" is null or ((\"junior_conversations\".\"kind\" = 'root') = (\"junior_conversations\".\"parent_conversation_id\" is null))"
2857
+ }
2858
+ },
2859
+ "isRLSEnabled": false
2860
+ },
2861
+ "public.junior_destinations": {
2862
+ "name": "junior_destinations",
2863
+ "schema": "",
2864
+ "columns": {
2865
+ "id": {
2866
+ "name": "id",
2867
+ "type": "text",
2868
+ "primaryKey": true,
2869
+ "notNull": true
2870
+ },
2871
+ "provider": {
2872
+ "name": "provider",
2873
+ "type": "text",
2874
+ "primaryKey": false,
2875
+ "notNull": true
2876
+ },
2877
+ "provider_tenant_id": {
2878
+ "name": "provider_tenant_id",
2879
+ "type": "text",
2880
+ "primaryKey": false,
2881
+ "notNull": true,
2882
+ "default": "''"
2883
+ },
2884
+ "provider_destination_id": {
2885
+ "name": "provider_destination_id",
2886
+ "type": "text",
2887
+ "primaryKey": false,
2888
+ "notNull": true
2889
+ },
2890
+ "kind": {
2891
+ "name": "kind",
2892
+ "type": "text",
2893
+ "primaryKey": false,
2894
+ "notNull": true
2895
+ },
2896
+ "parent_destination_id": {
2897
+ "name": "parent_destination_id",
2898
+ "type": "text",
2899
+ "primaryKey": false,
2900
+ "notNull": false
2901
+ },
2902
+ "display_name": {
2903
+ "name": "display_name",
2904
+ "type": "text",
2905
+ "primaryKey": false,
2906
+ "notNull": false
2907
+ },
2908
+ "visibility": {
2909
+ "name": "visibility",
2910
+ "type": "text",
2911
+ "primaryKey": false,
2912
+ "notNull": true,
2913
+ "default": "'unknown'"
2914
+ },
2915
+ "metadata_json": {
2916
+ "name": "metadata_json",
2917
+ "type": "jsonb",
2918
+ "primaryKey": false,
2919
+ "notNull": false
2920
+ },
2921
+ "created_at": {
2922
+ "name": "created_at",
2923
+ "type": "timestamp with time zone",
2924
+ "primaryKey": false,
2925
+ "notNull": true
2926
+ },
2927
+ "updated_at": {
2928
+ "name": "updated_at",
2929
+ "type": "timestamp with time zone",
2930
+ "primaryKey": false,
2931
+ "notNull": true
2932
+ }
2933
+ },
2934
+ "indexes": {
2935
+ "junior_destinations_provider_destination_uidx": {
2936
+ "name": "junior_destinations_provider_destination_uidx",
2937
+ "columns": [
2938
+ {
2939
+ "expression": "provider",
2940
+ "isExpression": false,
2941
+ "asc": true,
2942
+ "nulls": "last"
2943
+ },
2944
+ {
2945
+ "expression": "provider_tenant_id",
2946
+ "isExpression": false,
2947
+ "asc": true,
2948
+ "nulls": "last"
2949
+ },
2950
+ {
2951
+ "expression": "provider_destination_id",
2952
+ "isExpression": false,
2953
+ "asc": true,
2954
+ "nulls": "last"
2955
+ }
2956
+ ],
2957
+ "isUnique": true,
2958
+ "concurrently": false,
2959
+ "method": "btree",
2960
+ "with": {}
2961
+ },
2962
+ "junior_destinations_provider_kind_idx": {
2963
+ "name": "junior_destinations_provider_kind_idx",
2964
+ "columns": [
2965
+ {
2966
+ "expression": "provider",
2967
+ "isExpression": false,
2968
+ "asc": true,
2969
+ "nulls": "last"
2970
+ },
2971
+ {
2972
+ "expression": "kind",
2973
+ "isExpression": false,
2974
+ "asc": true,
2975
+ "nulls": "last"
2976
+ }
2977
+ ],
2978
+ "isUnique": false,
2979
+ "concurrently": false,
2980
+ "method": "btree",
2981
+ "with": {}
2982
+ }
2983
+ },
2984
+ "foreignKeys": {},
2985
+ "compositePrimaryKeys": {},
2986
+ "uniqueConstraints": {},
2987
+ "policies": {},
2988
+ "checkConstraints": {},
2989
+ "isRLSEnabled": false
2990
+ },
2991
+ "public.junior_identities": {
2992
+ "name": "junior_identities",
2993
+ "schema": "",
2994
+ "columns": {
2995
+ "id": {
2996
+ "name": "id",
2997
+ "type": "text",
2998
+ "primaryKey": true,
2999
+ "notNull": true
3000
+ },
3001
+ "kind": {
3002
+ "name": "kind",
3003
+ "type": "text",
3004
+ "primaryKey": false,
3005
+ "notNull": true
3006
+ },
3007
+ "provider": {
3008
+ "name": "provider",
3009
+ "type": "text",
3010
+ "primaryKey": false,
3011
+ "notNull": true
3012
+ },
3013
+ "provider_tenant_id": {
3014
+ "name": "provider_tenant_id",
3015
+ "type": "text",
3016
+ "primaryKey": false,
3017
+ "notNull": true,
3018
+ "default": "''"
3019
+ },
3020
+ "provider_subject_id": {
3021
+ "name": "provider_subject_id",
3022
+ "type": "text",
3023
+ "primaryKey": false,
3024
+ "notNull": true
3025
+ },
3026
+ "display_name": {
3027
+ "name": "display_name",
3028
+ "type": "text",
3029
+ "primaryKey": false,
3030
+ "notNull": false
3031
+ },
3032
+ "handle": {
3033
+ "name": "handle",
3034
+ "type": "text",
3035
+ "primaryKey": false,
3036
+ "notNull": false
3037
+ },
3038
+ "email": {
3039
+ "name": "email",
3040
+ "type": "text",
3041
+ "primaryKey": false,
3042
+ "notNull": false
3043
+ },
3044
+ "avatar_url": {
3045
+ "name": "avatar_url",
3046
+ "type": "text",
3047
+ "primaryKey": false,
3048
+ "notNull": false
3049
+ },
3050
+ "metadata_json": {
3051
+ "name": "metadata_json",
3052
+ "type": "jsonb",
3053
+ "primaryKey": false,
3054
+ "notNull": false
3055
+ },
3056
+ "created_at": {
3057
+ "name": "created_at",
3058
+ "type": "timestamp with time zone",
3059
+ "primaryKey": false,
3060
+ "notNull": true
3061
+ },
3062
+ "updated_at": {
3063
+ "name": "updated_at",
3064
+ "type": "timestamp with time zone",
3065
+ "primaryKey": false,
3066
+ "notNull": true
3067
+ },
3068
+ "user_id": {
3069
+ "name": "user_id",
3070
+ "type": "text",
3071
+ "primaryKey": false,
3072
+ "notNull": false
3073
+ },
3074
+ "email_normalized": {
3075
+ "name": "email_normalized",
3076
+ "type": "text",
3077
+ "primaryKey": false,
3078
+ "notNull": false
3079
+ },
3080
+ "email_verified": {
3081
+ "name": "email_verified",
3082
+ "type": "boolean",
3083
+ "primaryKey": false,
3084
+ "notNull": true,
3085
+ "default": false
3086
+ },
3087
+ "signed_in_at": {
3088
+ "name": "signed_in_at",
3089
+ "type": "timestamp with time zone",
3090
+ "primaryKey": false,
3091
+ "notNull": false
3092
+ }
3093
+ },
3094
+ "indexes": {
3095
+ "junior_identities_provider_subject_uidx": {
3096
+ "name": "junior_identities_provider_subject_uidx",
3097
+ "columns": [
3098
+ {
3099
+ "expression": "provider",
3100
+ "isExpression": false,
3101
+ "asc": true,
3102
+ "nulls": "last"
3103
+ },
3104
+ {
3105
+ "expression": "provider_tenant_id",
3106
+ "isExpression": false,
3107
+ "asc": true,
3108
+ "nulls": "last"
3109
+ },
3110
+ {
3111
+ "expression": "provider_subject_id",
3112
+ "isExpression": false,
3113
+ "asc": true,
3114
+ "nulls": "last"
3115
+ }
3116
+ ],
3117
+ "isUnique": true,
3118
+ "concurrently": false,
3119
+ "method": "btree",
3120
+ "with": {}
3121
+ },
3122
+ "junior_identities_user_idx": {
3123
+ "name": "junior_identities_user_idx",
3124
+ "columns": [
3125
+ {
3126
+ "expression": "user_id",
3127
+ "isExpression": false,
3128
+ "asc": true,
3129
+ "nulls": "last"
3130
+ }
3131
+ ],
3132
+ "isUnique": false,
3133
+ "concurrently": false,
3134
+ "method": "btree",
3135
+ "with": {}
3136
+ },
3137
+ "junior_identities_verified_email_idx": {
3138
+ "name": "junior_identities_verified_email_idx",
3139
+ "columns": [
3140
+ {
3141
+ "expression": "email_normalized",
3142
+ "isExpression": false,
3143
+ "asc": true,
3144
+ "nulls": "last"
3145
+ }
3146
+ ],
3147
+ "isUnique": false,
3148
+ "where": "\"junior_identities\".\"email_verified\" = true AND \"junior_identities\".\"email_normalized\" IS NOT NULL",
3149
+ "concurrently": false,
3150
+ "method": "btree",
3151
+ "with": {}
3152
+ },
3153
+ "junior_identities_kind_provider_idx": {
3154
+ "name": "junior_identities_kind_provider_idx",
3155
+ "columns": [
3156
+ {
3157
+ "expression": "kind",
3158
+ "isExpression": false,
3159
+ "asc": true,
3160
+ "nulls": "last"
3161
+ },
3162
+ {
3163
+ "expression": "provider",
3164
+ "isExpression": false,
3165
+ "asc": true,
3166
+ "nulls": "last"
3167
+ }
3168
+ ],
3169
+ "isUnique": false,
3170
+ "concurrently": false,
3171
+ "method": "btree",
3172
+ "with": {}
3173
+ }
3174
+ },
3175
+ "foreignKeys": {
3176
+ "junior_identities_user_id_junior_users_id_fk": {
3177
+ "name": "junior_identities_user_id_junior_users_id_fk",
3178
+ "tableFrom": "junior_identities",
3179
+ "tableTo": "junior_users",
3180
+ "columnsFrom": ["user_id"],
3181
+ "columnsTo": ["id"],
3182
+ "onDelete": "no action",
3183
+ "onUpdate": "no action"
3184
+ }
3185
+ },
3186
+ "compositePrimaryKeys": {},
3187
+ "uniqueConstraints": {},
3188
+ "policies": {},
3189
+ "checkConstraints": {},
3190
+ "isRLSEnabled": false
3191
+ },
3192
+ "public.junior_location_configurations": {
3193
+ "name": "junior_location_configurations",
3194
+ "schema": "",
3195
+ "columns": {
3196
+ "location_id": {
3197
+ "name": "location_id",
3198
+ "type": "text",
3199
+ "primaryKey": false,
3200
+ "notNull": true
3201
+ },
3202
+ "key": {
3203
+ "name": "key",
3204
+ "type": "text",
3205
+ "primaryKey": false,
3206
+ "notNull": true
3207
+ },
3208
+ "value": {
3209
+ "name": "value",
3210
+ "type": "text",
3211
+ "primaryKey": false,
3212
+ "notNull": true
3213
+ },
3214
+ "updated_at": {
3215
+ "name": "updated_at",
3216
+ "type": "timestamp with time zone",
3217
+ "primaryKey": false,
3218
+ "notNull": true
3219
+ },
3220
+ "updated_by": {
3221
+ "name": "updated_by",
3222
+ "type": "text",
3223
+ "primaryKey": false,
3224
+ "notNull": false
3225
+ },
3226
+ "source": {
3227
+ "name": "source",
3228
+ "type": "text",
3229
+ "primaryKey": false,
3230
+ "notNull": false
3231
+ },
3232
+ "expires_at": {
3233
+ "name": "expires_at",
3234
+ "type": "text",
3235
+ "primaryKey": false,
3236
+ "notNull": false
3237
+ }
3238
+ },
3239
+ "indexes": {},
3240
+ "foreignKeys": {
3241
+ "junior_location_configurations_location_id_junior_destinations_id_fk": {
3242
+ "name": "junior_location_configurations_location_id_junior_destinations_id_fk",
3243
+ "tableFrom": "junior_location_configurations",
3244
+ "tableTo": "junior_destinations",
3245
+ "columnsFrom": ["location_id"],
3246
+ "columnsTo": ["id"],
3247
+ "onDelete": "cascade",
3248
+ "onUpdate": "no action"
3249
+ }
3250
+ },
3251
+ "compositePrimaryKeys": {
3252
+ "junior_location_configurations_location_id_key_pk": {
3253
+ "name": "junior_location_configurations_location_id_key_pk",
3254
+ "columns": ["location_id", "key"]
3255
+ }
3256
+ },
3257
+ "uniqueConstraints": {},
3258
+ "policies": {},
3259
+ "checkConstraints": {},
3260
+ "isRLSEnabled": false
3261
+ },
3262
+ "public.junior_push_subscriptions": {
3263
+ "name": "junior_push_subscriptions",
3264
+ "schema": "",
3265
+ "columns": {
3266
+ "id": {
3267
+ "name": "id",
3268
+ "type": "text",
3269
+ "primaryKey": true,
3270
+ "notNull": true
3271
+ },
3272
+ "user_id": {
3273
+ "name": "user_id",
3274
+ "type": "text",
3275
+ "primaryKey": false,
3276
+ "notNull": true
3277
+ },
3278
+ "endpoint": {
3279
+ "name": "endpoint",
3280
+ "type": "text",
3281
+ "primaryKey": false,
3282
+ "notNull": true
3283
+ },
3284
+ "p256dh": {
3285
+ "name": "p256dh",
3286
+ "type": "text",
3287
+ "primaryKey": false,
3288
+ "notNull": true
3289
+ },
3290
+ "auth": {
3291
+ "name": "auth",
3292
+ "type": "text",
3293
+ "primaryKey": false,
3294
+ "notNull": true
3295
+ },
3296
+ "created_at": {
3297
+ "name": "created_at",
3298
+ "type": "timestamp with time zone",
3299
+ "primaryKey": false,
3300
+ "notNull": true
3301
+ },
3302
+ "updated_at": {
3303
+ "name": "updated_at",
3304
+ "type": "timestamp with time zone",
3305
+ "primaryKey": false,
3306
+ "notNull": true
3307
+ }
3308
+ },
3309
+ "indexes": {
3310
+ "junior_push_subscriptions_endpoint_uidx": {
3311
+ "name": "junior_push_subscriptions_endpoint_uidx",
3312
+ "columns": [
3313
+ {
3314
+ "expression": "endpoint",
3315
+ "isExpression": false,
3316
+ "asc": true,
3317
+ "nulls": "last"
3318
+ }
3319
+ ],
3320
+ "isUnique": true,
3321
+ "concurrently": false,
3322
+ "method": "btree",
3323
+ "with": {}
3324
+ },
3325
+ "junior_push_subscriptions_user_idx": {
3326
+ "name": "junior_push_subscriptions_user_idx",
3327
+ "columns": [
3328
+ {
3329
+ "expression": "user_id",
3330
+ "isExpression": false,
3331
+ "asc": true,
3332
+ "nulls": "last"
3333
+ }
3334
+ ],
3335
+ "isUnique": false,
3336
+ "concurrently": false,
3337
+ "method": "btree",
3338
+ "with": {}
3339
+ }
3340
+ },
3341
+ "foreignKeys": {
3342
+ "junior_push_subscriptions_user_id_junior_users_id_fk": {
3343
+ "name": "junior_push_subscriptions_user_id_junior_users_id_fk",
3344
+ "tableFrom": "junior_push_subscriptions",
3345
+ "tableTo": "junior_users",
3346
+ "columnsFrom": ["user_id"],
3347
+ "columnsTo": ["id"],
3348
+ "onDelete": "cascade",
3349
+ "onUpdate": "no action"
3350
+ }
3351
+ },
3352
+ "compositePrimaryKeys": {},
3353
+ "uniqueConstraints": {},
3354
+ "policies": {},
3355
+ "checkConstraints": {},
3356
+ "isRLSEnabled": false
3357
+ },
3358
+ "public.junior_review_item_assignees": {
3359
+ "name": "junior_review_item_assignees",
3360
+ "schema": "",
3361
+ "columns": {
3362
+ "item_id": {
3363
+ "name": "item_id",
3364
+ "type": "text",
3365
+ "primaryKey": false,
3366
+ "notNull": true
3367
+ },
3368
+ "user_id": {
3369
+ "name": "user_id",
3370
+ "type": "text",
3371
+ "primaryKey": false,
3372
+ "notNull": true
3373
+ }
3374
+ },
3375
+ "indexes": {
3376
+ "junior_review_item_assignees_user_idx": {
3377
+ "name": "junior_review_item_assignees_user_idx",
3378
+ "columns": [
3379
+ {
3380
+ "expression": "user_id",
3381
+ "isExpression": false,
3382
+ "asc": true,
3383
+ "nulls": "last"
3384
+ }
3385
+ ],
3386
+ "isUnique": false,
3387
+ "concurrently": false,
3388
+ "method": "btree",
3389
+ "with": {}
3390
+ }
3391
+ },
3392
+ "foreignKeys": {
3393
+ "junior_review_item_assignees_item_id_junior_review_items_id_fk": {
3394
+ "name": "junior_review_item_assignees_item_id_junior_review_items_id_fk",
3395
+ "tableFrom": "junior_review_item_assignees",
3396
+ "tableTo": "junior_review_items",
3397
+ "columnsFrom": ["item_id"],
3398
+ "columnsTo": ["id"],
3399
+ "onDelete": "cascade",
3400
+ "onUpdate": "no action"
3401
+ },
3402
+ "junior_review_item_assignees_user_id_junior_users_id_fk": {
3403
+ "name": "junior_review_item_assignees_user_id_junior_users_id_fk",
3404
+ "tableFrom": "junior_review_item_assignees",
3405
+ "tableTo": "junior_users",
3406
+ "columnsFrom": ["user_id"],
3407
+ "columnsTo": ["id"],
3408
+ "onDelete": "cascade",
3409
+ "onUpdate": "no action"
3410
+ }
3411
+ },
3412
+ "compositePrimaryKeys": {
3413
+ "junior_review_item_assignees_item_id_user_id_pk": {
3414
+ "name": "junior_review_item_assignees_item_id_user_id_pk",
3415
+ "columns": ["item_id", "user_id"]
3416
+ }
3417
+ },
3418
+ "uniqueConstraints": {},
3419
+ "policies": {},
3420
+ "checkConstraints": {},
3421
+ "isRLSEnabled": false
3422
+ },
3423
+ "public.junior_review_item_conversations": {
3424
+ "name": "junior_review_item_conversations",
3425
+ "schema": "",
3426
+ "columns": {
3427
+ "item_id": {
3428
+ "name": "item_id",
3429
+ "type": "text",
3430
+ "primaryKey": false,
3431
+ "notNull": true
3432
+ },
3433
+ "conversation_id": {
3434
+ "name": "conversation_id",
3435
+ "type": "text",
3436
+ "primaryKey": false,
3437
+ "notNull": true
3438
+ }
3439
+ },
3440
+ "indexes": {
3441
+ "junior_review_item_conversations_conversation_idx": {
3442
+ "name": "junior_review_item_conversations_conversation_idx",
3443
+ "columns": [
3444
+ {
3445
+ "expression": "conversation_id",
3446
+ "isExpression": false,
3447
+ "asc": true,
3448
+ "nulls": "last"
3449
+ }
3450
+ ],
3451
+ "isUnique": false,
3452
+ "concurrently": false,
3453
+ "method": "btree",
3454
+ "with": {}
3455
+ }
3456
+ },
3457
+ "foreignKeys": {
3458
+ "junior_review_item_conversations_item_id_junior_review_items_id_fk": {
3459
+ "name": "junior_review_item_conversations_item_id_junior_review_items_id_fk",
3460
+ "tableFrom": "junior_review_item_conversations",
3461
+ "tableTo": "junior_review_items",
3462
+ "columnsFrom": ["item_id"],
3463
+ "columnsTo": ["id"],
3464
+ "onDelete": "cascade",
3465
+ "onUpdate": "no action"
3466
+ },
3467
+ "junior_review_item_conversations_conversation_id_junior_conversations_conversation_id_fk": {
3468
+ "name": "junior_review_item_conversations_conversation_id_junior_conversations_conversation_id_fk",
3469
+ "tableFrom": "junior_review_item_conversations",
3470
+ "tableTo": "junior_conversations",
3471
+ "columnsFrom": ["conversation_id"],
3472
+ "columnsTo": ["conversation_id"],
3473
+ "onDelete": "cascade",
3474
+ "onUpdate": "no action"
3475
+ }
3476
+ },
3477
+ "compositePrimaryKeys": {
3478
+ "junior_review_item_conversations_item_id_conversation_id_pk": {
3479
+ "name": "junior_review_item_conversations_item_id_conversation_id_pk",
3480
+ "columns": ["item_id", "conversation_id"]
3481
+ }
3482
+ },
3483
+ "uniqueConstraints": {},
3484
+ "policies": {},
3485
+ "checkConstraints": {},
3486
+ "isRLSEnabled": false
3487
+ },
3488
+ "public.junior_review_item_slack_cards": {
3489
+ "name": "junior_review_item_slack_cards",
3490
+ "schema": "",
3491
+ "columns": {
3492
+ "item_id": {
3493
+ "name": "item_id",
3494
+ "type": "text",
3495
+ "primaryKey": false,
3496
+ "notNull": true
3497
+ },
3498
+ "conversation_id": {
3499
+ "name": "conversation_id",
3500
+ "type": "text",
3501
+ "primaryKey": false,
3502
+ "notNull": true
3503
+ },
3504
+ "team_id": {
3505
+ "name": "team_id",
3506
+ "type": "text",
3507
+ "primaryKey": false,
3508
+ "notNull": true
3509
+ },
3510
+ "channel_id": {
3511
+ "name": "channel_id",
3512
+ "type": "text",
3513
+ "primaryKey": false,
3514
+ "notNull": true
3515
+ },
3516
+ "message_ts": {
3517
+ "name": "message_ts",
3518
+ "type": "text",
3519
+ "primaryKey": false,
3520
+ "notNull": true
3521
+ }
3522
+ },
3523
+ "indexes": {},
3524
+ "foreignKeys": {
3525
+ "junior_review_item_slack_cards_item_id_junior_review_items_id_fk": {
3526
+ "name": "junior_review_item_slack_cards_item_id_junior_review_items_id_fk",
3527
+ "tableFrom": "junior_review_item_slack_cards",
3528
+ "tableTo": "junior_review_items",
3529
+ "columnsFrom": ["item_id"],
3530
+ "columnsTo": ["id"],
3531
+ "onDelete": "cascade",
3532
+ "onUpdate": "no action"
3533
+ },
3534
+ "junior_review_item_slack_cards_conversation_id_junior_conversations_conversation_id_fk": {
3535
+ "name": "junior_review_item_slack_cards_conversation_id_junior_conversations_conversation_id_fk",
3536
+ "tableFrom": "junior_review_item_slack_cards",
3537
+ "tableTo": "junior_conversations",
3538
+ "columnsFrom": ["conversation_id"],
3539
+ "columnsTo": ["conversation_id"],
3540
+ "onDelete": "cascade",
3541
+ "onUpdate": "no action"
3542
+ }
3543
+ },
3544
+ "compositePrimaryKeys": {
3545
+ "junior_review_item_slack_cards_item_id_conversation_id_pk": {
3546
+ "name": "junior_review_item_slack_cards_item_id_conversation_id_pk",
3547
+ "columns": ["item_id", "conversation_id"]
3548
+ }
3549
+ },
3550
+ "uniqueConstraints": {},
3551
+ "policies": {},
3552
+ "checkConstraints": {},
3553
+ "isRLSEnabled": false
3554
+ },
3555
+ "public.junior_review_items": {
3556
+ "name": "junior_review_items",
3557
+ "schema": "",
3558
+ "columns": {
3559
+ "id": {
3560
+ "name": "id",
3561
+ "type": "text",
3562
+ "primaryKey": true,
3563
+ "notNull": true
3564
+ },
3565
+ "kind": {
3566
+ "name": "kind",
3567
+ "type": "text",
3568
+ "primaryKey": false,
3569
+ "notNull": true
3570
+ },
3571
+ "status": {
3572
+ "name": "status",
3573
+ "type": "text",
3574
+ "primaryKey": false,
3575
+ "notNull": true
3576
+ },
3577
+ "visibility": {
3578
+ "name": "visibility",
3579
+ "type": "text",
3580
+ "primaryKey": false,
3581
+ "notNull": true
3582
+ },
3583
+ "title": {
3584
+ "name": "title",
3585
+ "type": "text",
3586
+ "primaryKey": false,
3587
+ "notNull": true
3588
+ },
3589
+ "body": {
3590
+ "name": "body",
3591
+ "type": "text",
3592
+ "primaryKey": false,
3593
+ "notNull": true
3594
+ },
3595
+ "request": {
3596
+ "name": "request",
3597
+ "type": "jsonb",
3598
+ "primaryKey": false,
3599
+ "notNull": false
3600
+ },
3601
+ "answer": {
3602
+ "name": "answer",
3603
+ "type": "jsonb",
3604
+ "primaryKey": false,
3605
+ "notNull": false
3606
+ },
3607
+ "assigned_to_everyone": {
3608
+ "name": "assigned_to_everyone",
3609
+ "type": "boolean",
3610
+ "primaryKey": false,
3611
+ "notNull": true,
3612
+ "default": false
3613
+ },
3614
+ "dedupe_key": {
3615
+ "name": "dedupe_key",
3616
+ "type": "text",
3617
+ "primaryKey": false,
3618
+ "notNull": true
3619
+ },
3620
+ "subject_id": {
3621
+ "name": "subject_id",
3622
+ "type": "text",
3623
+ "primaryKey": false,
3624
+ "notNull": false
3625
+ },
3626
+ "subject_title": {
3627
+ "name": "subject_title",
3628
+ "type": "text",
3629
+ "primaryKey": false,
3630
+ "notNull": false
3631
+ },
3632
+ "subject_url": {
3633
+ "name": "subject_url",
3634
+ "type": "text",
3635
+ "primaryKey": false,
3636
+ "notNull": false
3637
+ },
3638
+ "added_by_conversation_id": {
3639
+ "name": "added_by_conversation_id",
3640
+ "type": "text",
3641
+ "primaryKey": false,
3642
+ "notNull": true
3643
+ },
3644
+ "added_by_turn_id": {
3645
+ "name": "added_by_turn_id",
3646
+ "type": "text",
3647
+ "primaryKey": false,
3648
+ "notNull": false
3649
+ },
3650
+ "provider": {
3651
+ "name": "provider",
3652
+ "type": "text",
3653
+ "primaryKey": false,
3654
+ "notNull": false
3655
+ },
3656
+ "provider_tenant_id": {
3657
+ "name": "provider_tenant_id",
3658
+ "type": "text",
3659
+ "primaryKey": false,
3660
+ "notNull": false
3661
+ },
3662
+ "automation_id": {
3663
+ "name": "automation_id",
3664
+ "type": "text",
3665
+ "primaryKey": false,
3666
+ "notNull": false
3667
+ },
3668
+ "closed_at": {
3669
+ "name": "closed_at",
3670
+ "type": "timestamp with time zone",
3671
+ "primaryKey": false,
3672
+ "notNull": false
3673
+ },
3674
+ "closed_by_user_id": {
3675
+ "name": "closed_by_user_id",
3676
+ "type": "text",
3677
+ "primaryKey": false,
3678
+ "notNull": false
3679
+ },
3680
+ "close_reason": {
3681
+ "name": "close_reason",
3682
+ "type": "text",
3683
+ "primaryKey": false,
3684
+ "notNull": false
3685
+ },
3686
+ "created_at": {
3687
+ "name": "created_at",
3688
+ "type": "timestamp with time zone",
3689
+ "primaryKey": false,
3690
+ "notNull": true
3691
+ },
3692
+ "updated_at": {
3693
+ "name": "updated_at",
3694
+ "type": "timestamp with time zone",
3695
+ "primaryKey": false,
3696
+ "notNull": true
3697
+ }
3698
+ },
3699
+ "indexes": {
3700
+ "junior_review_items_open_dedupe_uidx": {
3701
+ "name": "junior_review_items_open_dedupe_uidx",
3702
+ "columns": [
3703
+ {
3704
+ "expression": "coalesce(\"provider\", '')",
3705
+ "asc": true,
3706
+ "isExpression": true,
3707
+ "nulls": "last"
3708
+ },
3709
+ {
3710
+ "expression": "coalesce(\"provider_tenant_id\", '')",
3711
+ "asc": true,
3712
+ "isExpression": true,
3713
+ "nulls": "last"
3714
+ },
3715
+ {
3716
+ "expression": "dedupe_key",
3717
+ "isExpression": false,
3718
+ "asc": true,
3719
+ "nulls": "last"
3720
+ }
3721
+ ],
3722
+ "isUnique": true,
3723
+ "where": "\"junior_review_items\".\"status\" = 'open'",
3724
+ "concurrently": false,
3725
+ "method": "btree",
3726
+ "with": {}
3727
+ },
3728
+ "junior_review_items_status_idx": {
3729
+ "name": "junior_review_items_status_idx",
3730
+ "columns": [
3731
+ {
3732
+ "expression": "status",
3733
+ "isExpression": false,
3734
+ "asc": true,
3735
+ "nulls": "last"
3736
+ },
3737
+ {
3738
+ "expression": "updated_at",
3739
+ "isExpression": false,
3740
+ "asc": true,
3741
+ "nulls": "last"
3742
+ },
3743
+ {
3744
+ "expression": "id",
3745
+ "isExpression": false,
3746
+ "asc": true,
3747
+ "nulls": "last"
3748
+ }
3749
+ ],
3750
+ "isUnique": false,
3751
+ "concurrently": false,
3752
+ "method": "btree",
3753
+ "with": {}
3754
+ },
3755
+ "junior_review_items_subject_idx": {
3756
+ "name": "junior_review_items_subject_idx",
3757
+ "columns": [
3758
+ {
3759
+ "expression": "subject_id",
3760
+ "isExpression": false,
3761
+ "asc": true,
3762
+ "nulls": "last"
3763
+ },
3764
+ {
3765
+ "expression": "status",
3766
+ "isExpression": false,
3767
+ "asc": true,
3768
+ "nulls": "last"
3769
+ }
3770
+ ],
3771
+ "isUnique": false,
3772
+ "concurrently": false,
3773
+ "method": "btree",
3774
+ "with": {}
3775
+ },
3776
+ "junior_review_items_automation_idx": {
3777
+ "name": "junior_review_items_automation_idx",
3778
+ "columns": [
3779
+ {
3780
+ "expression": "automation_id",
3781
+ "isExpression": false,
3782
+ "asc": true,
3783
+ "nulls": "last"
3784
+ },
3785
+ {
3786
+ "expression": "status",
3787
+ "isExpression": false,
3788
+ "asc": true,
3789
+ "nulls": "last"
3790
+ }
3791
+ ],
3792
+ "isUnique": false,
3793
+ "concurrently": false,
3794
+ "method": "btree",
3795
+ "with": {}
3796
+ }
3797
+ },
3798
+ "foreignKeys": {
3799
+ "junior_review_items_added_by_conversation_id_junior_conversations_conversation_id_fk": {
3800
+ "name": "junior_review_items_added_by_conversation_id_junior_conversations_conversation_id_fk",
3801
+ "tableFrom": "junior_review_items",
3802
+ "tableTo": "junior_conversations",
3803
+ "columnsFrom": ["added_by_conversation_id"],
3804
+ "columnsTo": ["conversation_id"],
3805
+ "onDelete": "cascade",
3806
+ "onUpdate": "no action"
3807
+ },
3808
+ "junior_review_items_automation_id_junior_automations_id_fk": {
3809
+ "name": "junior_review_items_automation_id_junior_automations_id_fk",
3810
+ "tableFrom": "junior_review_items",
3811
+ "tableTo": "junior_automations",
3812
+ "columnsFrom": ["automation_id"],
3813
+ "columnsTo": ["id"],
3814
+ "onDelete": "set null",
3815
+ "onUpdate": "no action"
3816
+ },
3817
+ "junior_review_items_closed_by_user_id_junior_users_id_fk": {
3818
+ "name": "junior_review_items_closed_by_user_id_junior_users_id_fk",
3819
+ "tableFrom": "junior_review_items",
3820
+ "tableTo": "junior_users",
3821
+ "columnsFrom": ["closed_by_user_id"],
3822
+ "columnsTo": ["id"],
3823
+ "onDelete": "set null",
3824
+ "onUpdate": "no action"
3825
+ }
3826
+ },
3827
+ "compositePrimaryKeys": {},
3828
+ "uniqueConstraints": {},
3829
+ "policies": {},
3830
+ "checkConstraints": {
3831
+ "junior_review_items_kind_check": {
3832
+ "name": "junior_review_items_kind_check",
3833
+ "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)"
3834
+ },
3835
+ "junior_review_items_status_check": {
3836
+ "name": "junior_review_items_status_check",
3837
+ "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)"
3838
+ },
3839
+ "junior_review_items_tenant_check": {
3840
+ "name": "junior_review_items_tenant_check",
3841
+ "value": "(\"junior_review_items\".\"provider\" is null) = (\"junior_review_items\".\"provider_tenant_id\" is null)"
3842
+ },
3843
+ "junior_review_items_visibility_check": {
3844
+ "name": "junior_review_items_visibility_check",
3845
+ "value": "\"junior_review_items\".\"visibility\" = 'public' or not \"junior_review_items\".\"assigned_to_everyone\""
3846
+ }
3847
+ },
3848
+ "isRLSEnabled": false
3849
+ },
3850
+ "public.junior_snapshots": {
3851
+ "name": "junior_snapshots",
3852
+ "schema": "",
3853
+ "columns": {
3854
+ "id": {
3855
+ "name": "id",
3856
+ "type": "text",
3857
+ "primaryKey": true,
3858
+ "notNull": true
3859
+ },
3860
+ "workspace_id": {
3861
+ "name": "workspace_id",
3862
+ "type": "text",
3863
+ "primaryKey": false,
3864
+ "notNull": true
3865
+ },
3866
+ "profile_hash": {
3867
+ "name": "profile_hash",
3868
+ "type": "text",
3869
+ "primaryKey": false,
3870
+ "notNull": true
3871
+ },
3872
+ "status": {
3873
+ "name": "status",
3874
+ "type": "text",
3875
+ "primaryKey": false,
3876
+ "notNull": true
3877
+ },
3878
+ "snapshot_id": {
3879
+ "name": "snapshot_id",
3880
+ "type": "text",
3881
+ "primaryKey": false,
3882
+ "notNull": false
3883
+ },
3884
+ "build_duration_ms": {
3885
+ "name": "build_duration_ms",
3886
+ "type": "integer",
3887
+ "primaryKey": false,
3888
+ "notNull": false
3889
+ },
3890
+ "size_bytes": {
3891
+ "name": "size_bytes",
3892
+ "type": "bigint",
3893
+ "primaryKey": false,
3894
+ "notNull": false
3895
+ },
3896
+ "generated_at": {
3897
+ "name": "generated_at",
3898
+ "type": "timestamp with time zone",
3899
+ "primaryKey": false,
3900
+ "notNull": false
3901
+ },
3902
+ "build_started_at": {
3903
+ "name": "build_started_at",
3904
+ "type": "timestamp with time zone",
3905
+ "primaryKey": false,
3906
+ "notNull": false
3907
+ },
3908
+ "build_phase": {
3909
+ "name": "build_phase",
3910
+ "type": "text",
3911
+ "primaryKey": false,
3912
+ "notNull": false
3913
+ },
3914
+ "build_sandbox_name": {
3915
+ "name": "build_sandbox_name",
3916
+ "type": "text",
3917
+ "primaryKey": false,
3918
+ "notNull": false
3919
+ },
3920
+ "build_command_id": {
3921
+ "name": "build_command_id",
3922
+ "type": "text",
3923
+ "primaryKey": false,
3924
+ "notNull": false
3925
+ },
3926
+ "build_error": {
3927
+ "name": "build_error",
3928
+ "type": "text",
3929
+ "primaryKey": false,
3930
+ "notNull": false
3931
+ },
3932
+ "created_at": {
3933
+ "name": "created_at",
3934
+ "type": "timestamp with time zone",
3935
+ "primaryKey": false,
3936
+ "notNull": true
3937
+ },
3938
+ "updated_at": {
3939
+ "name": "updated_at",
3940
+ "type": "timestamp with time zone",
3941
+ "primaryKey": false,
3942
+ "notNull": true
3943
+ }
3944
+ },
3945
+ "indexes": {
3946
+ "junior_snapshots_snapshot_id_uidx": {
3947
+ "name": "junior_snapshots_snapshot_id_uidx",
3948
+ "columns": [
3949
+ {
3950
+ "expression": "snapshot_id",
3951
+ "isExpression": false,
3952
+ "asc": true,
3953
+ "nulls": "last"
3954
+ }
3955
+ ],
3956
+ "isUnique": true,
3957
+ "concurrently": false,
3958
+ "method": "btree",
3959
+ "with": {}
3960
+ },
3961
+ "junior_snapshots_workspace_idx": {
3962
+ "name": "junior_snapshots_workspace_idx",
3963
+ "columns": [
3964
+ {
3965
+ "expression": "workspace_id",
3966
+ "isExpression": false,
3967
+ "asc": true,
3968
+ "nulls": "last"
3969
+ }
3970
+ ],
3971
+ "isUnique": false,
3972
+ "concurrently": false,
3973
+ "method": "btree",
3974
+ "with": {}
3975
+ },
3976
+ "junior_snapshots_workspace_profile_status_idx": {
3977
+ "name": "junior_snapshots_workspace_profile_status_idx",
3978
+ "columns": [
3979
+ {
3980
+ "expression": "workspace_id",
3981
+ "isExpression": false,
3982
+ "asc": true,
3983
+ "nulls": "last"
3984
+ },
3985
+ {
3986
+ "expression": "profile_hash",
3987
+ "isExpression": false,
3988
+ "asc": true,
3989
+ "nulls": "last"
3990
+ },
3991
+ {
3992
+ "expression": "status",
3993
+ "isExpression": false,
3994
+ "asc": true,
3995
+ "nulls": "last"
3996
+ }
3997
+ ],
3998
+ "isUnique": false,
3999
+ "concurrently": false,
4000
+ "method": "btree",
4001
+ "with": {}
4002
+ },
4003
+ "junior_snapshots_active_build_uidx": {
4004
+ "name": "junior_snapshots_active_build_uidx",
4005
+ "columns": [
4006
+ {
4007
+ "expression": "workspace_id",
4008
+ "isExpression": false,
4009
+ "asc": true,
4010
+ "nulls": "last"
4011
+ },
4012
+ {
4013
+ "expression": "profile_hash",
4014
+ "isExpression": false,
4015
+ "asc": true,
4016
+ "nulls": "last"
4017
+ }
4018
+ ],
4019
+ "isUnique": true,
4020
+ "where": "\"junior_snapshots\".\"status\" = 'building'",
4021
+ "concurrently": false,
4022
+ "method": "btree",
4023
+ "with": {}
4024
+ },
4025
+ "junior_snapshots_workspace_status_idx": {
4026
+ "name": "junior_snapshots_workspace_status_idx",
4027
+ "columns": [
4028
+ {
4029
+ "expression": "workspace_id",
4030
+ "isExpression": false,
4031
+ "asc": true,
4032
+ "nulls": "last"
4033
+ },
4034
+ {
4035
+ "expression": "status",
4036
+ "isExpression": false,
4037
+ "asc": true,
4038
+ "nulls": "last"
4039
+ }
4040
+ ],
4041
+ "isUnique": false,
4042
+ "concurrently": false,
4043
+ "method": "btree",
4044
+ "with": {}
4045
+ }
4046
+ },
4047
+ "foreignKeys": {
4048
+ "junior_snapshots_workspace_id_junior_workspaces_id_fk": {
4049
+ "name": "junior_snapshots_workspace_id_junior_workspaces_id_fk",
4050
+ "tableFrom": "junior_snapshots",
4051
+ "tableTo": "junior_workspaces",
4052
+ "columnsFrom": ["workspace_id"],
4053
+ "columnsTo": ["id"],
4054
+ "onDelete": "cascade",
4055
+ "onUpdate": "no action"
4056
+ }
4057
+ },
4058
+ "compositePrimaryKeys": {},
4059
+ "uniqueConstraints": {},
4060
+ "policies": {},
4061
+ "checkConstraints": {
4062
+ "junior_snapshots_status_check": {
4063
+ "name": "junior_snapshots_status_check",
4064
+ "value": "\"junior_snapshots\".\"status\" in ('building', 'failed', 'ready')"
4065
+ },
4066
+ "junior_snapshots_build_phase_check": {
4067
+ "name": "junior_snapshots_build_phase_check",
4068
+ "value": "\"junior_snapshots\".\"build_phase\" is null or \"junior_snapshots\".\"build_phase\" in ('created', 'dependencies_installed', 'repositories_prepared')"
4069
+ },
4070
+ "junior_snapshots_ready_fields_check": {
4071
+ "name": "junior_snapshots_ready_fields_check",
4072
+ "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)"
4073
+ },
4074
+ "junior_snapshots_build_fields_check": {
4075
+ "name": "junior_snapshots_build_fields_check",
4076
+ "value": "\"junior_snapshots\".\"status\" = 'ready' or (\"junior_snapshots\".\"build_started_at\" is not null and \"junior_snapshots\".\"build_phase\" is not null)"
4077
+ },
4078
+ "junior_snapshots_build_duration_check": {
4079
+ "name": "junior_snapshots_build_duration_check",
4080
+ "value": "\"junior_snapshots\".\"build_duration_ms\" is null or \"junior_snapshots\".\"build_duration_ms\" >= 0"
4081
+ },
4082
+ "junior_snapshots_size_bytes_check": {
4083
+ "name": "junior_snapshots_size_bytes_check",
4084
+ "value": "\"junior_snapshots\".\"size_bytes\" is null or \"junior_snapshots\".\"size_bytes\" >= 0"
4085
+ }
4086
+ },
4087
+ "isRLSEnabled": false
4088
+ },
4089
+ "public.junior_stats": {
4090
+ "name": "junior_stats",
4091
+ "schema": "",
4092
+ "columns": {
4093
+ "date": {
4094
+ "name": "date",
4095
+ "type": "date",
4096
+ "primaryKey": false,
4097
+ "notNull": true
4098
+ },
4099
+ "namespace": {
4100
+ "name": "namespace",
4101
+ "type": "text",
4102
+ "primaryKey": false,
4103
+ "notNull": true
4104
+ },
4105
+ "metric": {
4106
+ "name": "metric",
4107
+ "type": "text",
4108
+ "primaryKey": false,
4109
+ "notNull": true
4110
+ },
4111
+ "name": {
4112
+ "name": "name",
4113
+ "type": "text",
4114
+ "primaryKey": false,
4115
+ "notNull": true
4116
+ },
4117
+ "count": {
4118
+ "name": "count",
4119
+ "type": "integer",
4120
+ "primaryKey": false,
4121
+ "notNull": true,
4122
+ "default": 0
4123
+ }
4124
+ },
4125
+ "indexes": {},
4126
+ "foreignKeys": {},
4127
+ "compositePrimaryKeys": {
4128
+ "junior_stats_date_namespace_metric_name_pk": {
4129
+ "name": "junior_stats_date_namespace_metric_name_pk",
4130
+ "columns": ["date", "namespace", "metric", "name"]
4131
+ }
4132
+ },
4133
+ "uniqueConstraints": {},
4134
+ "policies": {},
4135
+ "checkConstraints": {},
4136
+ "isRLSEnabled": false
4137
+ },
4138
+ "public.junior_users": {
4139
+ "name": "junior_users",
4140
+ "schema": "",
4141
+ "columns": {
4142
+ "id": {
4143
+ "name": "id",
4144
+ "type": "text",
4145
+ "primaryKey": true,
4146
+ "notNull": true
4147
+ },
4148
+ "primary_email": {
4149
+ "name": "primary_email",
4150
+ "type": "text",
4151
+ "primaryKey": false,
4152
+ "notNull": true
4153
+ },
4154
+ "primary_email_normalized": {
4155
+ "name": "primary_email_normalized",
4156
+ "type": "text",
4157
+ "primaryKey": false,
4158
+ "notNull": true
4159
+ },
4160
+ "display_name": {
4161
+ "name": "display_name",
4162
+ "type": "text",
4163
+ "primaryKey": false,
4164
+ "notNull": false
4165
+ },
4166
+ "timezone": {
4167
+ "name": "timezone",
4168
+ "type": "text",
4169
+ "primaryKey": false,
4170
+ "notNull": false
4171
+ },
4172
+ "customization": {
4173
+ "name": "customization",
4174
+ "type": "text",
4175
+ "primaryKey": false,
4176
+ "notNull": false
4177
+ },
4178
+ "notification_schedule": {
4179
+ "name": "notification_schedule",
4180
+ "type": "jsonb",
4181
+ "primaryKey": false,
4182
+ "notNull": false
4183
+ },
4184
+ "is_admin": {
4185
+ "name": "is_admin",
4186
+ "type": "boolean",
4187
+ "primaryKey": false,
4188
+ "notNull": true,
4189
+ "default": false
4190
+ },
4191
+ "auto_archive_default": {
4192
+ "name": "auto_archive_default",
4193
+ "type": "boolean",
4194
+ "primaryKey": false,
4195
+ "notNull": true,
4196
+ "default": false
4197
+ },
4198
+ "auto_archive_grace_hours": {
4199
+ "name": "auto_archive_grace_hours",
4200
+ "type": "integer",
4201
+ "primaryKey": false,
4202
+ "notNull": true,
4203
+ "default": 24
4204
+ },
4205
+ "created_at": {
4206
+ "name": "created_at",
4207
+ "type": "timestamp with time zone",
4208
+ "primaryKey": false,
4209
+ "notNull": true
4210
+ },
4211
+ "updated_at": {
4212
+ "name": "updated_at",
4213
+ "type": "timestamp with time zone",
4214
+ "primaryKey": false,
4215
+ "notNull": true
4216
+ }
4217
+ },
4218
+ "indexes": {
4219
+ "junior_users_primary_email_normalized_uidx": {
4220
+ "name": "junior_users_primary_email_normalized_uidx",
4221
+ "columns": [
4222
+ {
4223
+ "expression": "primary_email_normalized",
4224
+ "isExpression": false,
4225
+ "asc": true,
4226
+ "nulls": "last"
4227
+ }
4228
+ ],
4229
+ "isUnique": true,
4230
+ "concurrently": false,
4231
+ "method": "btree",
4232
+ "with": {}
4233
+ }
4234
+ },
4235
+ "foreignKeys": {},
4236
+ "compositePrimaryKeys": {},
4237
+ "uniqueConstraints": {},
4238
+ "policies": {},
4239
+ "checkConstraints": {},
4240
+ "isRLSEnabled": false
4241
+ },
4242
+ "public.junior_workspace_repos": {
4243
+ "name": "junior_workspace_repos",
4244
+ "schema": "",
4245
+ "columns": {
4246
+ "workspace_id": {
4247
+ "name": "workspace_id",
4248
+ "type": "text",
4249
+ "primaryKey": false,
4250
+ "notNull": true
4251
+ },
4252
+ "provider": {
4253
+ "name": "provider",
4254
+ "type": "text",
4255
+ "primaryKey": false,
4256
+ "notNull": true
4257
+ },
4258
+ "repo": {
4259
+ "name": "repo",
4260
+ "type": "text",
4261
+ "primaryKey": false,
4262
+ "notNull": true
4263
+ }
4264
+ },
4265
+ "indexes": {},
4266
+ "foreignKeys": {
4267
+ "junior_workspace_repos_workspace_id_junior_workspaces_id_fk": {
4268
+ "name": "junior_workspace_repos_workspace_id_junior_workspaces_id_fk",
4269
+ "tableFrom": "junior_workspace_repos",
4270
+ "tableTo": "junior_workspaces",
4271
+ "columnsFrom": ["workspace_id"],
4272
+ "columnsTo": ["id"],
4273
+ "onDelete": "cascade",
4274
+ "onUpdate": "no action"
4275
+ }
4276
+ },
4277
+ "compositePrimaryKeys": {
4278
+ "junior_workspace_repos_workspace_id_provider_repo_pk": {
4279
+ "name": "junior_workspace_repos_workspace_id_provider_repo_pk",
4280
+ "columns": ["workspace_id", "provider", "repo"]
4281
+ }
4282
+ },
4283
+ "uniqueConstraints": {},
4284
+ "policies": {},
4285
+ "checkConstraints": {},
4286
+ "isRLSEnabled": false
4287
+ },
4288
+ "public.junior_workspaces": {
4289
+ "name": "junior_workspaces",
4290
+ "schema": "",
4291
+ "columns": {
4292
+ "id": {
4293
+ "name": "id",
4294
+ "type": "text",
4295
+ "primaryKey": true,
4296
+ "notNull": true
4297
+ },
4298
+ "name": {
4299
+ "name": "name",
4300
+ "type": "text",
4301
+ "primaryKey": false,
4302
+ "notNull": true
4303
+ },
4304
+ "setup_script": {
4305
+ "name": "setup_script",
4306
+ "type": "text",
4307
+ "primaryKey": false,
4308
+ "notNull": true,
4309
+ "default": "''"
4310
+ },
4311
+ "vcpus": {
4312
+ "name": "vcpus",
4313
+ "type": "integer",
4314
+ "primaryKey": false,
4315
+ "notNull": false
4316
+ },
4317
+ "created_at": {
4318
+ "name": "created_at",
4319
+ "type": "timestamp with time zone",
4320
+ "primaryKey": false,
4321
+ "notNull": true
4322
+ },
4323
+ "updated_at": {
4324
+ "name": "updated_at",
4325
+ "type": "timestamp with time zone",
4326
+ "primaryKey": false,
4327
+ "notNull": true
4328
+ }
4329
+ },
4330
+ "indexes": {
4331
+ "junior_workspaces_name_idx": {
4332
+ "name": "junior_workspaces_name_idx",
4333
+ "columns": [
4334
+ {
4335
+ "expression": "name",
4336
+ "isExpression": false,
4337
+ "asc": true,
4338
+ "nulls": "last"
4339
+ }
4340
+ ],
4341
+ "isUnique": true,
4342
+ "concurrently": false,
4343
+ "method": "btree",
4344
+ "with": {}
4345
+ }
4346
+ },
4347
+ "foreignKeys": {},
4348
+ "compositePrimaryKeys": {},
4349
+ "uniqueConstraints": {},
4350
+ "policies": {},
4351
+ "checkConstraints": {},
4352
+ "isRLSEnabled": false
4353
+ }
4354
+ },
4355
+ "enums": {},
4356
+ "schemas": {},
4357
+ "sequences": {},
4358
+ "roles": {},
4359
+ "policies": {},
4360
+ "views": {},
4361
+ "_meta": {
4362
+ "columns": {},
4363
+ "schemas": {},
4364
+ "tables": {}
4365
+ }
4366
+ }