@sentry/junior 0.281.0 → 0.283.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 (76) hide show
  1. package/dist/{adapter-RVQGEa98.js → adapter-D8-lqOBF.js} +1 -1
  2. package/dist/{admin-DQpHx6Og.js → admin-Dnw5SCXp.js} +1 -1
  3. package/dist/{agent-runner-B229gXUY.js → agent-runner-Bj7GhysW.js} +52 -29
  4. package/dist/api/schema.d.ts +2 -2
  5. package/dist/api/schema.js +6 -6
  6. package/dist/api.d.ts +1 -1
  7. package/dist/api.js +94 -59
  8. package/dist/{app-BQ9RZS43.d.ts → app-CMBP-N43.d.ts} +2 -2
  9. package/dist/app.d.ts +1 -1
  10. package/dist/app.js +30 -30
  11. package/dist/{assistant-reply-DQbtwc6j.js → assistant-reply-CdYsLbXL.js} +1 -1
  12. package/dist/{automation-sIsmIXH7.js → automation-MLWOrghe.js} +1 -1
  13. package/dist/{background-compaction-queue-oegyrxSe.js → background-compaction-queue-Bbsqx8Vm.js} +2 -2
  14. package/dist/{briefs-BwzGWJgR.js → briefs-C4qBY-jb.js} +4 -4
  15. package/dist/{catalog-runtime-ClKzLvbN.js → catalog-runtime-B7NRB7eH.js} +1 -1
  16. package/dist/cli/chat.js +14 -14
  17. package/dist/cli/check.js +3 -3
  18. package/dist/cli/main.js +3 -3
  19. package/dist/cli/plugins.js +4 -4
  20. package/dist/cli/snapshot-create.js +4 -4
  21. package/dist/cli/upgrade.d.ts +1 -1
  22. package/dist/cli/upgrade.js +74 -7
  23. package/dist/{client-DkG0Tj53.js → client-a3Ib6wxr.js} +2 -2
  24. package/dist/{config-3AZ11aSM.js → config-DFVlYCeY.js} +97 -4
  25. package/dist/{connections-C0ut_6RW.js → connections-BtnvpBEV.js} +10 -10
  26. package/dist/{conversation-DNtcULyX.js → conversation-DdT7SNar.js} +3 -1
  27. package/dist/{conversation-pending-messages-LlFnr9-m.js → conversation-pending-messages-Dct5pheX.js} +1 -1
  28. package/dist/{conversation-privacy-DAgeBGLN.js → conversation-privacy-DLq-abjU.js} +1 -1
  29. package/dist/{credential-sync-Bg8NPuvj.js → credential-sync-B4XFVcjM.js} +13 -13
  30. package/dist/{db-BCFM0CUX.d.ts → db-A_WrTY-s.d.ts} +2 -1
  31. package/dist/{executor-DLKnzP6S.js → executor-HPgHGAWK.js} +20 -3
  32. package/dist/instrumentation.js +2 -2
  33. package/dist/{logging-DHzrobea.js → logging-2BXvW7Mp.js} +1 -1
  34. package/dist/{media-Dq9_svfQ.js → media-Bu9C6lz0.js} +3 -1
  35. package/dist/{message-LR8z5jXJ.js → message-BG1v1lXX.js} +9 -9
  36. package/dist/nitro.d.ts +1 -1
  37. package/dist/nitro.js +3 -11
  38. package/dist/{oauth-callback-server-EWdpj0_y.js → oauth-callback-server-CXNZJymo.js} +2 -2
  39. package/dist/{projection-Bhz1tp0G.js → projection-BfKkpOGQ.js} +42 -18
  40. package/dist/{prompt-DI6KCtwb.js → prompt-CCtaGgbI.js} +1 -1
  41. package/dist/{registry-EjhulgQW.js → registry-CLooHPAz.js} +1 -1
  42. package/dist/{resolve-Cw6OW4Fj.js → resolve-D3MK9oRJ.js} +3 -3
  43. package/dist/{result-BoD0jevy.js → result-BPCjUefO.js} +9 -9
  44. package/dist/{runner-D22bsBDS.js → runner-Ds31u3rB.js} +11 -11
  45. package/dist/{sandbox-egress-signals-BG5GYacQ.js → sandbox-egress-signals-CLd5RPUw.js} +1 -1
  46. package/dist/{schema-BN34Jy-U.js → schema-CHNP0GfH.js} +11 -4
  47. package/dist/{schema-CsqJzkP5.d.ts → schema-jW3ccLjp.d.ts} +22 -1
  48. package/dist/{service-account-xo-CeMqI.js → service-account-CWpTsoIM.js} +3 -3
  49. package/dist/{service-account-Dd1nnAQZ.js → service-account-D6AMahy7.js} +3 -3
  50. package/dist/{session-stop-CHSYB2uw.js → session-stop-D8LGC3H6.js} +12 -12
  51. package/dist/{skills-BGJr6xtW.js → skills-DuOKByQH.js} +2 -2
  52. package/dist/{spawn-Cl8WS7zi.js → spawn-CNIQGgAS.js} +2 -2
  53. package/dist/{stop-C9lHWpvl.js → stop-DX2oOIgl.js} +291 -204
  54. package/dist/{store-DeTnwVJt.js → store-61mD4ZSh.js} +4 -4
  55. package/dist/{store-C4z8gOgZ.js → store-DAJntSEv.js} +3 -3
  56. package/dist/{task-queue-BBos68l0.js → task-queue-BE70Pb9p.js} +3 -3
  57. package/dist/{task-runner-BSF9zO-H.js → task-runner-CmmfddSZ.js} +7 -7
  58. package/dist/{thread-state-DGq1o5JX.js → thread-state-0UfRMWYd.js} +4 -4
  59. package/dist/{turn-failure-response--9bA4uLP.js → turn-failure-response-DKdzxJHE.js} +7 -7
  60. package/dist/{turn-lifecycle-t5fimxwQ.js → turn-lifecycle-24sBZ4Ip.js} +1 -1
  61. package/dist/{turn-session-routing-RBtUe-3y.js → turn-session-routing-CzCnNAUO.js} +9 -9
  62. package/dist/{validation-DrR0leBT.js → validation-Cs_knhR8.js} +1 -1
  63. package/dist/{version-D_HFt_Dq.js → version-ZMC4cXWN.js} +1 -1
  64. package/dist/version.js +1 -1
  65. package/dist/{viewer-DWlpSFdj.js → viewer-CYB9T4rm.js} +19 -7
  66. package/dist/{work-pPoqtRea.js → work-J1n6RQkY.js} +11 -11
  67. package/dist/{worker-CoVKgJ-O.js → worker-s1fCvj1z.js} +6 -6
  68. package/migrations/0062_plugin_report_index.sql +3 -3
  69. package/migrations/0078_plugin_conversation_index.sql +3 -3
  70. package/migrations/0079_conversation_event_author_index.sql +3 -3
  71. package/migrations/0080_conversation_event_latest_message_indexes.sql +27 -0
  72. package/migrations/0081_conversation_pin_position.sql +1 -0
  73. package/migrations/meta/0080_snapshot.json +4265 -0
  74. package/migrations/meta/0081_snapshot.json +4271 -0
  75. package/migrations/meta/_journal.json +14 -0
  76. package/package.json +4 -4
@@ -0,0 +1,4271 @@
1
+ {
2
+ "id": "8f6e6d82-8ecb-42f7-8b9a-0b8a19304e01",
3
+ "prevId": "b4f24d35-83a6-45eb-b852-9a915b704e32",
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\" and \"junior_conversation_participants\".\"archived_at\" is null",
2327
+ "concurrently": false,
2328
+ "method": "btree",
2329
+ "with": {}
2330
+ },
2331
+ "junior_conversation_participants_unarchived_activity_idx": {
2332
+ "name": "junior_conversation_participants_unarchived_activity_idx",
2333
+ "columns": [
2334
+ {
2335
+ "expression": "user_id",
2336
+ "isExpression": false,
2337
+ "asc": true,
2338
+ "nulls": "last"
2339
+ },
2340
+ {
2341
+ "expression": "last_message_at",
2342
+ "isExpression": false,
2343
+ "asc": true,
2344
+ "nulls": "last"
2345
+ },
2346
+ {
2347
+ "expression": "root_conversation_id",
2348
+ "isExpression": false,
2349
+ "asc": true,
2350
+ "nulls": "last"
2351
+ }
2352
+ ],
2353
+ "isUnique": false,
2354
+ "where": "\"junior_conversation_participants\".\"archived_at\" is null",
2355
+ "concurrently": false,
2356
+ "method": "btree",
2357
+ "with": {}
2358
+ }
2359
+ },
2360
+ "foreignKeys": {
2361
+ "junior_conversation_participants_user_id_junior_users_id_fk": {
2362
+ "name": "junior_conversation_participants_user_id_junior_users_id_fk",
2363
+ "tableFrom": "junior_conversation_participants",
2364
+ "tableTo": "junior_users",
2365
+ "columnsFrom": ["user_id"],
2366
+ "columnsTo": ["id"],
2367
+ "onDelete": "no action",
2368
+ "onUpdate": "no action"
2369
+ },
2370
+ "junior_conversation_participants_root_conversation_id_junior_conversations_conversation_id_fk": {
2371
+ "name": "junior_conversation_participants_root_conversation_id_junior_conversations_conversation_id_fk",
2372
+ "tableFrom": "junior_conversation_participants",
2373
+ "tableTo": "junior_conversations",
2374
+ "columnsFrom": ["root_conversation_id"],
2375
+ "columnsTo": ["conversation_id"],
2376
+ "onDelete": "no action",
2377
+ "onUpdate": "no action"
2378
+ }
2379
+ },
2380
+ "compositePrimaryKeys": {
2381
+ "junior_conversation_participants_user_root_pk": {
2382
+ "name": "junior_conversation_participants_user_root_pk",
2383
+ "columns": ["user_id", "root_conversation_id"]
2384
+ }
2385
+ },
2386
+ "uniqueConstraints": {},
2387
+ "policies": {},
2388
+ "checkConstraints": {},
2389
+ "isRLSEnabled": false
2390
+ },
2391
+ "public.junior_conversation_read_positions": {
2392
+ "name": "junior_conversation_read_positions",
2393
+ "schema": "",
2394
+ "columns": {
2395
+ "user_id": {
2396
+ "name": "user_id",
2397
+ "type": "text",
2398
+ "primaryKey": false,
2399
+ "notNull": true
2400
+ },
2401
+ "conversation_id": {
2402
+ "name": "conversation_id",
2403
+ "type": "text",
2404
+ "primaryKey": false,
2405
+ "notNull": true
2406
+ },
2407
+ "last_read_seq": {
2408
+ "name": "last_read_seq",
2409
+ "type": "integer",
2410
+ "primaryKey": false,
2411
+ "notNull": true
2412
+ },
2413
+ "updated_at": {
2414
+ "name": "updated_at",
2415
+ "type": "timestamp with time zone",
2416
+ "primaryKey": false,
2417
+ "notNull": true
2418
+ }
2419
+ },
2420
+ "indexes": {},
2421
+ "foreignKeys": {
2422
+ "junior_conversation_read_positions_user_id_junior_users_id_fk": {
2423
+ "name": "junior_conversation_read_positions_user_id_junior_users_id_fk",
2424
+ "tableFrom": "junior_conversation_read_positions",
2425
+ "tableTo": "junior_users",
2426
+ "columnsFrom": ["user_id"],
2427
+ "columnsTo": ["id"],
2428
+ "onDelete": "no action",
2429
+ "onUpdate": "no action"
2430
+ },
2431
+ "junior_conversation_read_positions_conversation_id_junior_conversations_conversation_id_fk": {
2432
+ "name": "junior_conversation_read_positions_conversation_id_junior_conversations_conversation_id_fk",
2433
+ "tableFrom": "junior_conversation_read_positions",
2434
+ "tableTo": "junior_conversations",
2435
+ "columnsFrom": ["conversation_id"],
2436
+ "columnsTo": ["conversation_id"],
2437
+ "onDelete": "no action",
2438
+ "onUpdate": "no action"
2439
+ }
2440
+ },
2441
+ "compositePrimaryKeys": {
2442
+ "junior_conversation_read_positions_user_conversation_pk": {
2443
+ "name": "junior_conversation_read_positions_user_conversation_pk",
2444
+ "columns": ["user_id", "conversation_id"]
2445
+ }
2446
+ },
2447
+ "uniqueConstraints": {},
2448
+ "policies": {},
2449
+ "checkConstraints": {},
2450
+ "isRLSEnabled": false
2451
+ },
2452
+ "public.junior_conversations": {
2453
+ "name": "junior_conversations",
2454
+ "schema": "",
2455
+ "columns": {
2456
+ "conversation_id": {
2457
+ "name": "conversation_id",
2458
+ "type": "text",
2459
+ "primaryKey": true,
2460
+ "notNull": true
2461
+ },
2462
+ "schema_version": {
2463
+ "name": "schema_version",
2464
+ "type": "integer",
2465
+ "primaryKey": false,
2466
+ "notNull": true,
2467
+ "default": 1
2468
+ },
2469
+ "source": {
2470
+ "name": "source",
2471
+ "type": "text",
2472
+ "primaryKey": false,
2473
+ "notNull": false
2474
+ },
2475
+ "source_json": {
2476
+ "name": "source_json",
2477
+ "type": "jsonb",
2478
+ "primaryKey": false,
2479
+ "notNull": false
2480
+ },
2481
+ "location_json": {
2482
+ "name": "location_json",
2483
+ "type": "jsonb",
2484
+ "primaryKey": false,
2485
+ "notNull": false
2486
+ },
2487
+ "destination_id": {
2488
+ "name": "destination_id",
2489
+ "type": "text",
2490
+ "primaryKey": false,
2491
+ "notNull": false
2492
+ },
2493
+ "destination_json": {
2494
+ "name": "destination_json",
2495
+ "type": "jsonb",
2496
+ "primaryKey": false,
2497
+ "notNull": false
2498
+ },
2499
+ "actor_identity_id": {
2500
+ "name": "actor_identity_id",
2501
+ "type": "text",
2502
+ "primaryKey": false,
2503
+ "notNull": false
2504
+ },
2505
+ "creator_identity_id": {
2506
+ "name": "creator_identity_id",
2507
+ "type": "text",
2508
+ "primaryKey": false,
2509
+ "notNull": false
2510
+ },
2511
+ "credential_subject_identity_id": {
2512
+ "name": "credential_subject_identity_id",
2513
+ "type": "text",
2514
+ "primaryKey": false,
2515
+ "notNull": false
2516
+ },
2517
+ "actor_json": {
2518
+ "name": "actor_json",
2519
+ "type": "jsonb",
2520
+ "primaryKey": false,
2521
+ "notNull": false
2522
+ },
2523
+ "channel_name": {
2524
+ "name": "channel_name",
2525
+ "type": "text",
2526
+ "primaryKey": false,
2527
+ "notNull": false
2528
+ },
2529
+ "title": {
2530
+ "name": "title",
2531
+ "type": "text",
2532
+ "primaryKey": false,
2533
+ "notNull": false
2534
+ },
2535
+ "created_at": {
2536
+ "name": "created_at",
2537
+ "type": "timestamp with time zone",
2538
+ "primaryKey": false,
2539
+ "notNull": true
2540
+ },
2541
+ "last_activity_at": {
2542
+ "name": "last_activity_at",
2543
+ "type": "timestamp with time zone",
2544
+ "primaryKey": false,
2545
+ "notNull": true
2546
+ },
2547
+ "updated_at": {
2548
+ "name": "updated_at",
2549
+ "type": "timestamp with time zone",
2550
+ "primaryKey": false,
2551
+ "notNull": true
2552
+ },
2553
+ "execution_updated_at": {
2554
+ "name": "execution_updated_at",
2555
+ "type": "timestamp with time zone",
2556
+ "primaryKey": false,
2557
+ "notNull": false
2558
+ },
2559
+ "execution_status": {
2560
+ "name": "execution_status",
2561
+ "type": "text",
2562
+ "primaryKey": false,
2563
+ "notNull": true
2564
+ },
2565
+ "run_id": {
2566
+ "name": "run_id",
2567
+ "type": "text",
2568
+ "primaryKey": false,
2569
+ "notNull": false
2570
+ },
2571
+ "last_checkpoint_at": {
2572
+ "name": "last_checkpoint_at",
2573
+ "type": "timestamp with time zone",
2574
+ "primaryKey": false,
2575
+ "notNull": false
2576
+ },
2577
+ "last_enqueued_at": {
2578
+ "name": "last_enqueued_at",
2579
+ "type": "timestamp with time zone",
2580
+ "primaryKey": false,
2581
+ "notNull": false
2582
+ },
2583
+ "parent_conversation_id": {
2584
+ "name": "parent_conversation_id",
2585
+ "type": "text",
2586
+ "primaryKey": false,
2587
+ "notNull": false
2588
+ },
2589
+ "forked_from_conversation_id": {
2590
+ "name": "forked_from_conversation_id",
2591
+ "type": "text",
2592
+ "primaryKey": false,
2593
+ "notNull": false
2594
+ },
2595
+ "quick_question_at": {
2596
+ "name": "quick_question_at",
2597
+ "type": "timestamp with time zone",
2598
+ "primaryKey": false,
2599
+ "notNull": false
2600
+ },
2601
+ "root_conversation_id": {
2602
+ "name": "root_conversation_id",
2603
+ "type": "text",
2604
+ "primaryKey": false,
2605
+ "notNull": false
2606
+ },
2607
+ "transcript_purged_at": {
2608
+ "name": "transcript_purged_at",
2609
+ "type": "timestamp with time zone",
2610
+ "primaryKey": false,
2611
+ "notNull": false
2612
+ },
2613
+ "stopped_at": {
2614
+ "name": "stopped_at",
2615
+ "type": "timestamp with time zone",
2616
+ "primaryKey": false,
2617
+ "notNull": false
2618
+ },
2619
+ "duration_ms": {
2620
+ "name": "duration_ms",
2621
+ "type": "integer",
2622
+ "primaryKey": false,
2623
+ "notNull": true,
2624
+ "default": 0
2625
+ },
2626
+ "usage_json": {
2627
+ "name": "usage_json",
2628
+ "type": "jsonb",
2629
+ "primaryKey": false,
2630
+ "notNull": false
2631
+ },
2632
+ "execution_duration_ms": {
2633
+ "name": "execution_duration_ms",
2634
+ "type": "integer",
2635
+ "primaryKey": false,
2636
+ "notNull": true,
2637
+ "default": 0
2638
+ },
2639
+ "execution_usage_json": {
2640
+ "name": "execution_usage_json",
2641
+ "type": "jsonb",
2642
+ "primaryKey": false,
2643
+ "notNull": false
2644
+ },
2645
+ "metric_run_id": {
2646
+ "name": "metric_run_id",
2647
+ "type": "text",
2648
+ "primaryKey": false,
2649
+ "notNull": false
2650
+ },
2651
+ "detail_version": {
2652
+ "name": "detail_version",
2653
+ "type": "integer",
2654
+ "primaryKey": false,
2655
+ "notNull": true,
2656
+ "default": 0
2657
+ },
2658
+ "archived_at": {
2659
+ "name": "archived_at",
2660
+ "type": "timestamp with time zone",
2661
+ "primaryKey": false,
2662
+ "notNull": false
2663
+ }
2664
+ },
2665
+ "indexes": {
2666
+ "junior_conversations_last_activity_idx": {
2667
+ "name": "junior_conversations_last_activity_idx",
2668
+ "columns": [
2669
+ {
2670
+ "expression": "last_activity_at",
2671
+ "isExpression": false,
2672
+ "asc": false,
2673
+ "nulls": "last"
2674
+ },
2675
+ {
2676
+ "expression": "conversation_id",
2677
+ "isExpression": false,
2678
+ "asc": true,
2679
+ "nulls": "last"
2680
+ }
2681
+ ],
2682
+ "isUnique": false,
2683
+ "concurrently": false,
2684
+ "method": "btree",
2685
+ "with": {}
2686
+ },
2687
+ "junior_conversations_active_idx": {
2688
+ "name": "junior_conversations_active_idx",
2689
+ "columns": [
2690
+ {
2691
+ "expression": "coalesce(\"execution_updated_at\", \"updated_at\")",
2692
+ "asc": true,
2693
+ "isExpression": true,
2694
+ "nulls": "last"
2695
+ },
2696
+ {
2697
+ "expression": "conversation_id",
2698
+ "isExpression": false,
2699
+ "asc": true,
2700
+ "nulls": "last"
2701
+ }
2702
+ ],
2703
+ "isUnique": false,
2704
+ "where": "\"junior_conversations\".\"execution_status\" <> 'idle'",
2705
+ "concurrently": false,
2706
+ "method": "btree",
2707
+ "with": {}
2708
+ },
2709
+ "junior_conversations_destination_activity_idx": {
2710
+ "name": "junior_conversations_destination_activity_idx",
2711
+ "columns": [
2712
+ {
2713
+ "expression": "destination_id",
2714
+ "isExpression": false,
2715
+ "asc": true,
2716
+ "nulls": "last"
2717
+ },
2718
+ {
2719
+ "expression": "last_activity_at",
2720
+ "isExpression": false,
2721
+ "asc": false,
2722
+ "nulls": "last"
2723
+ }
2724
+ ],
2725
+ "isUnique": false,
2726
+ "concurrently": false,
2727
+ "method": "btree",
2728
+ "with": {}
2729
+ },
2730
+ "junior_conversations_actor_activity_idx": {
2731
+ "name": "junior_conversations_actor_activity_idx",
2732
+ "columns": [
2733
+ {
2734
+ "expression": "actor_identity_id",
2735
+ "isExpression": false,
2736
+ "asc": true,
2737
+ "nulls": "last"
2738
+ },
2739
+ {
2740
+ "expression": "last_activity_at",
2741
+ "isExpression": false,
2742
+ "asc": false,
2743
+ "nulls": "last"
2744
+ }
2745
+ ],
2746
+ "isUnique": false,
2747
+ "concurrently": false,
2748
+ "method": "btree",
2749
+ "with": {}
2750
+ },
2751
+ "junior_conversations_parent_idx": {
2752
+ "name": "junior_conversations_parent_idx",
2753
+ "columns": [
2754
+ {
2755
+ "expression": "parent_conversation_id",
2756
+ "isExpression": false,
2757
+ "asc": true,
2758
+ "nulls": "last"
2759
+ }
2760
+ ],
2761
+ "isUnique": false,
2762
+ "concurrently": false,
2763
+ "method": "btree",
2764
+ "with": {}
2765
+ },
2766
+ "junior_conversations_forked_from_idx": {
2767
+ "name": "junior_conversations_forked_from_idx",
2768
+ "columns": [
2769
+ {
2770
+ "expression": "forked_from_conversation_id",
2771
+ "isExpression": false,
2772
+ "asc": true,
2773
+ "nulls": "last"
2774
+ }
2775
+ ],
2776
+ "isUnique": false,
2777
+ "concurrently": false,
2778
+ "method": "btree",
2779
+ "with": {}
2780
+ },
2781
+ "junior_conversations_root_idx": {
2782
+ "name": "junior_conversations_root_idx",
2783
+ "columns": [
2784
+ {
2785
+ "expression": "root_conversation_id",
2786
+ "isExpression": false,
2787
+ "asc": true,
2788
+ "nulls": "last"
2789
+ }
2790
+ ],
2791
+ "isUnique": false,
2792
+ "concurrently": false,
2793
+ "method": "btree",
2794
+ "with": {}
2795
+ }
2796
+ },
2797
+ "foreignKeys": {
2798
+ "junior_conversations_destination_id_junior_destinations_id_fk": {
2799
+ "name": "junior_conversations_destination_id_junior_destinations_id_fk",
2800
+ "tableFrom": "junior_conversations",
2801
+ "tableTo": "junior_destinations",
2802
+ "columnsFrom": ["destination_id"],
2803
+ "columnsTo": ["id"],
2804
+ "onDelete": "no action",
2805
+ "onUpdate": "no action"
2806
+ },
2807
+ "junior_conversations_actor_identity_id_junior_identities_id_fk": {
2808
+ "name": "junior_conversations_actor_identity_id_junior_identities_id_fk",
2809
+ "tableFrom": "junior_conversations",
2810
+ "tableTo": "junior_identities",
2811
+ "columnsFrom": ["actor_identity_id"],
2812
+ "columnsTo": ["id"],
2813
+ "onDelete": "no action",
2814
+ "onUpdate": "no action"
2815
+ },
2816
+ "junior_conversations_creator_identity_id_junior_identities_id_fk": {
2817
+ "name": "junior_conversations_creator_identity_id_junior_identities_id_fk",
2818
+ "tableFrom": "junior_conversations",
2819
+ "tableTo": "junior_identities",
2820
+ "columnsFrom": ["creator_identity_id"],
2821
+ "columnsTo": ["id"],
2822
+ "onDelete": "no action",
2823
+ "onUpdate": "no action"
2824
+ },
2825
+ "junior_conversations_credential_subject_identity_id_junior_identities_id_fk": {
2826
+ "name": "junior_conversations_credential_subject_identity_id_junior_identities_id_fk",
2827
+ "tableFrom": "junior_conversations",
2828
+ "tableTo": "junior_identities",
2829
+ "columnsFrom": ["credential_subject_identity_id"],
2830
+ "columnsTo": ["id"],
2831
+ "onDelete": "no action",
2832
+ "onUpdate": "no action"
2833
+ },
2834
+ "junior_conversations_parent_conversation_id_junior_conversations_conversation_id_fk": {
2835
+ "name": "junior_conversations_parent_conversation_id_junior_conversations_conversation_id_fk",
2836
+ "tableFrom": "junior_conversations",
2837
+ "tableTo": "junior_conversations",
2838
+ "columnsFrom": ["parent_conversation_id"],
2839
+ "columnsTo": ["conversation_id"],
2840
+ "onDelete": "no action",
2841
+ "onUpdate": "no action"
2842
+ },
2843
+ "junior_conversations_forked_from_conversation_id_junior_conversations_conversation_id_fk": {
2844
+ "name": "junior_conversations_forked_from_conversation_id_junior_conversations_conversation_id_fk",
2845
+ "tableFrom": "junior_conversations",
2846
+ "tableTo": "junior_conversations",
2847
+ "columnsFrom": ["forked_from_conversation_id"],
2848
+ "columnsTo": ["conversation_id"],
2849
+ "onDelete": "set null",
2850
+ "onUpdate": "no action"
2851
+ },
2852
+ "junior_conversations_root_conversation_id_junior_conversations_conversation_id_fk": {
2853
+ "name": "junior_conversations_root_conversation_id_junior_conversations_conversation_id_fk",
2854
+ "tableFrom": "junior_conversations",
2855
+ "tableTo": "junior_conversations",
2856
+ "columnsFrom": ["root_conversation_id"],
2857
+ "columnsTo": ["conversation_id"],
2858
+ "onDelete": "no action",
2859
+ "onUpdate": "no action"
2860
+ }
2861
+ },
2862
+ "compositePrimaryKeys": {},
2863
+ "uniqueConstraints": {},
2864
+ "policies": {},
2865
+ "checkConstraints": {},
2866
+ "isRLSEnabled": false
2867
+ },
2868
+ "public.junior_destinations": {
2869
+ "name": "junior_destinations",
2870
+ "schema": "",
2871
+ "columns": {
2872
+ "id": {
2873
+ "name": "id",
2874
+ "type": "text",
2875
+ "primaryKey": true,
2876
+ "notNull": true
2877
+ },
2878
+ "provider": {
2879
+ "name": "provider",
2880
+ "type": "text",
2881
+ "primaryKey": false,
2882
+ "notNull": true
2883
+ },
2884
+ "provider_tenant_id": {
2885
+ "name": "provider_tenant_id",
2886
+ "type": "text",
2887
+ "primaryKey": false,
2888
+ "notNull": true,
2889
+ "default": "''"
2890
+ },
2891
+ "provider_destination_id": {
2892
+ "name": "provider_destination_id",
2893
+ "type": "text",
2894
+ "primaryKey": false,
2895
+ "notNull": true
2896
+ },
2897
+ "kind": {
2898
+ "name": "kind",
2899
+ "type": "text",
2900
+ "primaryKey": false,
2901
+ "notNull": true
2902
+ },
2903
+ "parent_destination_id": {
2904
+ "name": "parent_destination_id",
2905
+ "type": "text",
2906
+ "primaryKey": false,
2907
+ "notNull": false
2908
+ },
2909
+ "display_name": {
2910
+ "name": "display_name",
2911
+ "type": "text",
2912
+ "primaryKey": false,
2913
+ "notNull": false
2914
+ },
2915
+ "visibility": {
2916
+ "name": "visibility",
2917
+ "type": "text",
2918
+ "primaryKey": false,
2919
+ "notNull": true,
2920
+ "default": "'unknown'"
2921
+ },
2922
+ "metadata_json": {
2923
+ "name": "metadata_json",
2924
+ "type": "jsonb",
2925
+ "primaryKey": false,
2926
+ "notNull": false
2927
+ },
2928
+ "created_at": {
2929
+ "name": "created_at",
2930
+ "type": "timestamp with time zone",
2931
+ "primaryKey": false,
2932
+ "notNull": true
2933
+ },
2934
+ "updated_at": {
2935
+ "name": "updated_at",
2936
+ "type": "timestamp with time zone",
2937
+ "primaryKey": false,
2938
+ "notNull": true
2939
+ }
2940
+ },
2941
+ "indexes": {
2942
+ "junior_destinations_provider_destination_uidx": {
2943
+ "name": "junior_destinations_provider_destination_uidx",
2944
+ "columns": [
2945
+ {
2946
+ "expression": "provider",
2947
+ "isExpression": false,
2948
+ "asc": true,
2949
+ "nulls": "last"
2950
+ },
2951
+ {
2952
+ "expression": "provider_tenant_id",
2953
+ "isExpression": false,
2954
+ "asc": true,
2955
+ "nulls": "last"
2956
+ },
2957
+ {
2958
+ "expression": "provider_destination_id",
2959
+ "isExpression": false,
2960
+ "asc": true,
2961
+ "nulls": "last"
2962
+ }
2963
+ ],
2964
+ "isUnique": true,
2965
+ "concurrently": false,
2966
+ "method": "btree",
2967
+ "with": {}
2968
+ },
2969
+ "junior_destinations_provider_kind_idx": {
2970
+ "name": "junior_destinations_provider_kind_idx",
2971
+ "columns": [
2972
+ {
2973
+ "expression": "provider",
2974
+ "isExpression": false,
2975
+ "asc": true,
2976
+ "nulls": "last"
2977
+ },
2978
+ {
2979
+ "expression": "kind",
2980
+ "isExpression": false,
2981
+ "asc": true,
2982
+ "nulls": "last"
2983
+ }
2984
+ ],
2985
+ "isUnique": false,
2986
+ "concurrently": false,
2987
+ "method": "btree",
2988
+ "with": {}
2989
+ }
2990
+ },
2991
+ "foreignKeys": {},
2992
+ "compositePrimaryKeys": {},
2993
+ "uniqueConstraints": {},
2994
+ "policies": {},
2995
+ "checkConstraints": {},
2996
+ "isRLSEnabled": false
2997
+ },
2998
+ "public.junior_identities": {
2999
+ "name": "junior_identities",
3000
+ "schema": "",
3001
+ "columns": {
3002
+ "id": {
3003
+ "name": "id",
3004
+ "type": "text",
3005
+ "primaryKey": true,
3006
+ "notNull": true
3007
+ },
3008
+ "kind": {
3009
+ "name": "kind",
3010
+ "type": "text",
3011
+ "primaryKey": false,
3012
+ "notNull": true
3013
+ },
3014
+ "provider": {
3015
+ "name": "provider",
3016
+ "type": "text",
3017
+ "primaryKey": false,
3018
+ "notNull": true
3019
+ },
3020
+ "provider_tenant_id": {
3021
+ "name": "provider_tenant_id",
3022
+ "type": "text",
3023
+ "primaryKey": false,
3024
+ "notNull": true,
3025
+ "default": "''"
3026
+ },
3027
+ "provider_subject_id": {
3028
+ "name": "provider_subject_id",
3029
+ "type": "text",
3030
+ "primaryKey": false,
3031
+ "notNull": true
3032
+ },
3033
+ "display_name": {
3034
+ "name": "display_name",
3035
+ "type": "text",
3036
+ "primaryKey": false,
3037
+ "notNull": false
3038
+ },
3039
+ "handle": {
3040
+ "name": "handle",
3041
+ "type": "text",
3042
+ "primaryKey": false,
3043
+ "notNull": false
3044
+ },
3045
+ "email": {
3046
+ "name": "email",
3047
+ "type": "text",
3048
+ "primaryKey": false,
3049
+ "notNull": false
3050
+ },
3051
+ "avatar_url": {
3052
+ "name": "avatar_url",
3053
+ "type": "text",
3054
+ "primaryKey": false,
3055
+ "notNull": false
3056
+ },
3057
+ "metadata_json": {
3058
+ "name": "metadata_json",
3059
+ "type": "jsonb",
3060
+ "primaryKey": false,
3061
+ "notNull": false
3062
+ },
3063
+ "created_at": {
3064
+ "name": "created_at",
3065
+ "type": "timestamp with time zone",
3066
+ "primaryKey": false,
3067
+ "notNull": true
3068
+ },
3069
+ "updated_at": {
3070
+ "name": "updated_at",
3071
+ "type": "timestamp with time zone",
3072
+ "primaryKey": false,
3073
+ "notNull": true
3074
+ },
3075
+ "user_id": {
3076
+ "name": "user_id",
3077
+ "type": "text",
3078
+ "primaryKey": false,
3079
+ "notNull": false
3080
+ },
3081
+ "email_normalized": {
3082
+ "name": "email_normalized",
3083
+ "type": "text",
3084
+ "primaryKey": false,
3085
+ "notNull": false
3086
+ },
3087
+ "email_verified": {
3088
+ "name": "email_verified",
3089
+ "type": "boolean",
3090
+ "primaryKey": false,
3091
+ "notNull": true,
3092
+ "default": false
3093
+ },
3094
+ "signed_in_at": {
3095
+ "name": "signed_in_at",
3096
+ "type": "timestamp with time zone",
3097
+ "primaryKey": false,
3098
+ "notNull": false
3099
+ }
3100
+ },
3101
+ "indexes": {
3102
+ "junior_identities_provider_subject_uidx": {
3103
+ "name": "junior_identities_provider_subject_uidx",
3104
+ "columns": [
3105
+ {
3106
+ "expression": "provider",
3107
+ "isExpression": false,
3108
+ "asc": true,
3109
+ "nulls": "last"
3110
+ },
3111
+ {
3112
+ "expression": "provider_tenant_id",
3113
+ "isExpression": false,
3114
+ "asc": true,
3115
+ "nulls": "last"
3116
+ },
3117
+ {
3118
+ "expression": "provider_subject_id",
3119
+ "isExpression": false,
3120
+ "asc": true,
3121
+ "nulls": "last"
3122
+ }
3123
+ ],
3124
+ "isUnique": true,
3125
+ "concurrently": false,
3126
+ "method": "btree",
3127
+ "with": {}
3128
+ },
3129
+ "junior_identities_user_idx": {
3130
+ "name": "junior_identities_user_idx",
3131
+ "columns": [
3132
+ {
3133
+ "expression": "user_id",
3134
+ "isExpression": false,
3135
+ "asc": true,
3136
+ "nulls": "last"
3137
+ }
3138
+ ],
3139
+ "isUnique": false,
3140
+ "concurrently": false,
3141
+ "method": "btree",
3142
+ "with": {}
3143
+ },
3144
+ "junior_identities_verified_email_idx": {
3145
+ "name": "junior_identities_verified_email_idx",
3146
+ "columns": [
3147
+ {
3148
+ "expression": "email_normalized",
3149
+ "isExpression": false,
3150
+ "asc": true,
3151
+ "nulls": "last"
3152
+ }
3153
+ ],
3154
+ "isUnique": false,
3155
+ "where": "\"junior_identities\".\"email_verified\" = true AND \"junior_identities\".\"email_normalized\" IS NOT NULL",
3156
+ "concurrently": false,
3157
+ "method": "btree",
3158
+ "with": {}
3159
+ },
3160
+ "junior_identities_kind_provider_idx": {
3161
+ "name": "junior_identities_kind_provider_idx",
3162
+ "columns": [
3163
+ {
3164
+ "expression": "kind",
3165
+ "isExpression": false,
3166
+ "asc": true,
3167
+ "nulls": "last"
3168
+ },
3169
+ {
3170
+ "expression": "provider",
3171
+ "isExpression": false,
3172
+ "asc": true,
3173
+ "nulls": "last"
3174
+ }
3175
+ ],
3176
+ "isUnique": false,
3177
+ "concurrently": false,
3178
+ "method": "btree",
3179
+ "with": {}
3180
+ }
3181
+ },
3182
+ "foreignKeys": {
3183
+ "junior_identities_user_id_junior_users_id_fk": {
3184
+ "name": "junior_identities_user_id_junior_users_id_fk",
3185
+ "tableFrom": "junior_identities",
3186
+ "tableTo": "junior_users",
3187
+ "columnsFrom": ["user_id"],
3188
+ "columnsTo": ["id"],
3189
+ "onDelete": "no action",
3190
+ "onUpdate": "no action"
3191
+ }
3192
+ },
3193
+ "compositePrimaryKeys": {},
3194
+ "uniqueConstraints": {},
3195
+ "policies": {},
3196
+ "checkConstraints": {},
3197
+ "isRLSEnabled": false
3198
+ },
3199
+ "public.junior_location_configurations": {
3200
+ "name": "junior_location_configurations",
3201
+ "schema": "",
3202
+ "columns": {
3203
+ "location_id": {
3204
+ "name": "location_id",
3205
+ "type": "text",
3206
+ "primaryKey": false,
3207
+ "notNull": true
3208
+ },
3209
+ "key": {
3210
+ "name": "key",
3211
+ "type": "text",
3212
+ "primaryKey": false,
3213
+ "notNull": true
3214
+ },
3215
+ "value": {
3216
+ "name": "value",
3217
+ "type": "text",
3218
+ "primaryKey": false,
3219
+ "notNull": true
3220
+ },
3221
+ "updated_at": {
3222
+ "name": "updated_at",
3223
+ "type": "timestamp with time zone",
3224
+ "primaryKey": false,
3225
+ "notNull": true
3226
+ },
3227
+ "updated_by": {
3228
+ "name": "updated_by",
3229
+ "type": "text",
3230
+ "primaryKey": false,
3231
+ "notNull": false
3232
+ },
3233
+ "source": {
3234
+ "name": "source",
3235
+ "type": "text",
3236
+ "primaryKey": false,
3237
+ "notNull": false
3238
+ },
3239
+ "expires_at": {
3240
+ "name": "expires_at",
3241
+ "type": "text",
3242
+ "primaryKey": false,
3243
+ "notNull": false
3244
+ }
3245
+ },
3246
+ "indexes": {},
3247
+ "foreignKeys": {
3248
+ "junior_location_configurations_location_id_junior_destinations_id_fk": {
3249
+ "name": "junior_location_configurations_location_id_junior_destinations_id_fk",
3250
+ "tableFrom": "junior_location_configurations",
3251
+ "tableTo": "junior_destinations",
3252
+ "columnsFrom": ["location_id"],
3253
+ "columnsTo": ["id"],
3254
+ "onDelete": "cascade",
3255
+ "onUpdate": "no action"
3256
+ }
3257
+ },
3258
+ "compositePrimaryKeys": {
3259
+ "junior_location_configurations_location_id_key_pk": {
3260
+ "name": "junior_location_configurations_location_id_key_pk",
3261
+ "columns": ["location_id", "key"]
3262
+ }
3263
+ },
3264
+ "uniqueConstraints": {},
3265
+ "policies": {},
3266
+ "checkConstraints": {},
3267
+ "isRLSEnabled": false
3268
+ },
3269
+ "public.junior_review_item_assignees": {
3270
+ "name": "junior_review_item_assignees",
3271
+ "schema": "",
3272
+ "columns": {
3273
+ "item_id": {
3274
+ "name": "item_id",
3275
+ "type": "text",
3276
+ "primaryKey": false,
3277
+ "notNull": true
3278
+ },
3279
+ "user_id": {
3280
+ "name": "user_id",
3281
+ "type": "text",
3282
+ "primaryKey": false,
3283
+ "notNull": true
3284
+ }
3285
+ },
3286
+ "indexes": {
3287
+ "junior_review_item_assignees_user_idx": {
3288
+ "name": "junior_review_item_assignees_user_idx",
3289
+ "columns": [
3290
+ {
3291
+ "expression": "user_id",
3292
+ "isExpression": false,
3293
+ "asc": true,
3294
+ "nulls": "last"
3295
+ }
3296
+ ],
3297
+ "isUnique": false,
3298
+ "concurrently": false,
3299
+ "method": "btree",
3300
+ "with": {}
3301
+ }
3302
+ },
3303
+ "foreignKeys": {
3304
+ "junior_review_item_assignees_item_id_junior_review_items_id_fk": {
3305
+ "name": "junior_review_item_assignees_item_id_junior_review_items_id_fk",
3306
+ "tableFrom": "junior_review_item_assignees",
3307
+ "tableTo": "junior_review_items",
3308
+ "columnsFrom": ["item_id"],
3309
+ "columnsTo": ["id"],
3310
+ "onDelete": "cascade",
3311
+ "onUpdate": "no action"
3312
+ },
3313
+ "junior_review_item_assignees_user_id_junior_users_id_fk": {
3314
+ "name": "junior_review_item_assignees_user_id_junior_users_id_fk",
3315
+ "tableFrom": "junior_review_item_assignees",
3316
+ "tableTo": "junior_users",
3317
+ "columnsFrom": ["user_id"],
3318
+ "columnsTo": ["id"],
3319
+ "onDelete": "cascade",
3320
+ "onUpdate": "no action"
3321
+ }
3322
+ },
3323
+ "compositePrimaryKeys": {
3324
+ "junior_review_item_assignees_item_id_user_id_pk": {
3325
+ "name": "junior_review_item_assignees_item_id_user_id_pk",
3326
+ "columns": ["item_id", "user_id"]
3327
+ }
3328
+ },
3329
+ "uniqueConstraints": {},
3330
+ "policies": {},
3331
+ "checkConstraints": {},
3332
+ "isRLSEnabled": false
3333
+ },
3334
+ "public.junior_review_item_conversations": {
3335
+ "name": "junior_review_item_conversations",
3336
+ "schema": "",
3337
+ "columns": {
3338
+ "item_id": {
3339
+ "name": "item_id",
3340
+ "type": "text",
3341
+ "primaryKey": false,
3342
+ "notNull": true
3343
+ },
3344
+ "conversation_id": {
3345
+ "name": "conversation_id",
3346
+ "type": "text",
3347
+ "primaryKey": false,
3348
+ "notNull": true
3349
+ }
3350
+ },
3351
+ "indexes": {
3352
+ "junior_review_item_conversations_conversation_idx": {
3353
+ "name": "junior_review_item_conversations_conversation_idx",
3354
+ "columns": [
3355
+ {
3356
+ "expression": "conversation_id",
3357
+ "isExpression": false,
3358
+ "asc": true,
3359
+ "nulls": "last"
3360
+ }
3361
+ ],
3362
+ "isUnique": false,
3363
+ "concurrently": false,
3364
+ "method": "btree",
3365
+ "with": {}
3366
+ }
3367
+ },
3368
+ "foreignKeys": {
3369
+ "junior_review_item_conversations_item_id_junior_review_items_id_fk": {
3370
+ "name": "junior_review_item_conversations_item_id_junior_review_items_id_fk",
3371
+ "tableFrom": "junior_review_item_conversations",
3372
+ "tableTo": "junior_review_items",
3373
+ "columnsFrom": ["item_id"],
3374
+ "columnsTo": ["id"],
3375
+ "onDelete": "cascade",
3376
+ "onUpdate": "no action"
3377
+ },
3378
+ "junior_review_item_conversations_conversation_id_junior_conversations_conversation_id_fk": {
3379
+ "name": "junior_review_item_conversations_conversation_id_junior_conversations_conversation_id_fk",
3380
+ "tableFrom": "junior_review_item_conversations",
3381
+ "tableTo": "junior_conversations",
3382
+ "columnsFrom": ["conversation_id"],
3383
+ "columnsTo": ["conversation_id"],
3384
+ "onDelete": "cascade",
3385
+ "onUpdate": "no action"
3386
+ }
3387
+ },
3388
+ "compositePrimaryKeys": {
3389
+ "junior_review_item_conversations_item_id_conversation_id_pk": {
3390
+ "name": "junior_review_item_conversations_item_id_conversation_id_pk",
3391
+ "columns": ["item_id", "conversation_id"]
3392
+ }
3393
+ },
3394
+ "uniqueConstraints": {},
3395
+ "policies": {},
3396
+ "checkConstraints": {},
3397
+ "isRLSEnabled": false
3398
+ },
3399
+ "public.junior_review_item_slack_cards": {
3400
+ "name": "junior_review_item_slack_cards",
3401
+ "schema": "",
3402
+ "columns": {
3403
+ "item_id": {
3404
+ "name": "item_id",
3405
+ "type": "text",
3406
+ "primaryKey": false,
3407
+ "notNull": true
3408
+ },
3409
+ "conversation_id": {
3410
+ "name": "conversation_id",
3411
+ "type": "text",
3412
+ "primaryKey": false,
3413
+ "notNull": true
3414
+ },
3415
+ "team_id": {
3416
+ "name": "team_id",
3417
+ "type": "text",
3418
+ "primaryKey": false,
3419
+ "notNull": true
3420
+ },
3421
+ "channel_id": {
3422
+ "name": "channel_id",
3423
+ "type": "text",
3424
+ "primaryKey": false,
3425
+ "notNull": true
3426
+ },
3427
+ "message_ts": {
3428
+ "name": "message_ts",
3429
+ "type": "text",
3430
+ "primaryKey": false,
3431
+ "notNull": true
3432
+ }
3433
+ },
3434
+ "indexes": {},
3435
+ "foreignKeys": {
3436
+ "junior_review_item_slack_cards_item_id_junior_review_items_id_fk": {
3437
+ "name": "junior_review_item_slack_cards_item_id_junior_review_items_id_fk",
3438
+ "tableFrom": "junior_review_item_slack_cards",
3439
+ "tableTo": "junior_review_items",
3440
+ "columnsFrom": ["item_id"],
3441
+ "columnsTo": ["id"],
3442
+ "onDelete": "cascade",
3443
+ "onUpdate": "no action"
3444
+ },
3445
+ "junior_review_item_slack_cards_conversation_id_junior_conversations_conversation_id_fk": {
3446
+ "name": "junior_review_item_slack_cards_conversation_id_junior_conversations_conversation_id_fk",
3447
+ "tableFrom": "junior_review_item_slack_cards",
3448
+ "tableTo": "junior_conversations",
3449
+ "columnsFrom": ["conversation_id"],
3450
+ "columnsTo": ["conversation_id"],
3451
+ "onDelete": "cascade",
3452
+ "onUpdate": "no action"
3453
+ }
3454
+ },
3455
+ "compositePrimaryKeys": {
3456
+ "junior_review_item_slack_cards_item_id_conversation_id_pk": {
3457
+ "name": "junior_review_item_slack_cards_item_id_conversation_id_pk",
3458
+ "columns": ["item_id", "conversation_id"]
3459
+ }
3460
+ },
3461
+ "uniqueConstraints": {},
3462
+ "policies": {},
3463
+ "checkConstraints": {},
3464
+ "isRLSEnabled": false
3465
+ },
3466
+ "public.junior_review_items": {
3467
+ "name": "junior_review_items",
3468
+ "schema": "",
3469
+ "columns": {
3470
+ "id": {
3471
+ "name": "id",
3472
+ "type": "text",
3473
+ "primaryKey": true,
3474
+ "notNull": true
3475
+ },
3476
+ "kind": {
3477
+ "name": "kind",
3478
+ "type": "text",
3479
+ "primaryKey": false,
3480
+ "notNull": true
3481
+ },
3482
+ "status": {
3483
+ "name": "status",
3484
+ "type": "text",
3485
+ "primaryKey": false,
3486
+ "notNull": true
3487
+ },
3488
+ "visibility": {
3489
+ "name": "visibility",
3490
+ "type": "text",
3491
+ "primaryKey": false,
3492
+ "notNull": true
3493
+ },
3494
+ "title": {
3495
+ "name": "title",
3496
+ "type": "text",
3497
+ "primaryKey": false,
3498
+ "notNull": true
3499
+ },
3500
+ "body": {
3501
+ "name": "body",
3502
+ "type": "text",
3503
+ "primaryKey": false,
3504
+ "notNull": true
3505
+ },
3506
+ "request": {
3507
+ "name": "request",
3508
+ "type": "jsonb",
3509
+ "primaryKey": false,
3510
+ "notNull": false
3511
+ },
3512
+ "answer": {
3513
+ "name": "answer",
3514
+ "type": "jsonb",
3515
+ "primaryKey": false,
3516
+ "notNull": false
3517
+ },
3518
+ "assigned_to_everyone": {
3519
+ "name": "assigned_to_everyone",
3520
+ "type": "boolean",
3521
+ "primaryKey": false,
3522
+ "notNull": true,
3523
+ "default": false
3524
+ },
3525
+ "dedupe_key": {
3526
+ "name": "dedupe_key",
3527
+ "type": "text",
3528
+ "primaryKey": false,
3529
+ "notNull": true
3530
+ },
3531
+ "subject_id": {
3532
+ "name": "subject_id",
3533
+ "type": "text",
3534
+ "primaryKey": false,
3535
+ "notNull": false
3536
+ },
3537
+ "subject_title": {
3538
+ "name": "subject_title",
3539
+ "type": "text",
3540
+ "primaryKey": false,
3541
+ "notNull": false
3542
+ },
3543
+ "subject_url": {
3544
+ "name": "subject_url",
3545
+ "type": "text",
3546
+ "primaryKey": false,
3547
+ "notNull": false
3548
+ },
3549
+ "added_by_conversation_id": {
3550
+ "name": "added_by_conversation_id",
3551
+ "type": "text",
3552
+ "primaryKey": false,
3553
+ "notNull": true
3554
+ },
3555
+ "added_by_turn_id": {
3556
+ "name": "added_by_turn_id",
3557
+ "type": "text",
3558
+ "primaryKey": false,
3559
+ "notNull": false
3560
+ },
3561
+ "provider": {
3562
+ "name": "provider",
3563
+ "type": "text",
3564
+ "primaryKey": false,
3565
+ "notNull": false
3566
+ },
3567
+ "provider_tenant_id": {
3568
+ "name": "provider_tenant_id",
3569
+ "type": "text",
3570
+ "primaryKey": false,
3571
+ "notNull": false
3572
+ },
3573
+ "automation_id": {
3574
+ "name": "automation_id",
3575
+ "type": "text",
3576
+ "primaryKey": false,
3577
+ "notNull": false
3578
+ },
3579
+ "closed_at": {
3580
+ "name": "closed_at",
3581
+ "type": "timestamp with time zone",
3582
+ "primaryKey": false,
3583
+ "notNull": false
3584
+ },
3585
+ "closed_by_user_id": {
3586
+ "name": "closed_by_user_id",
3587
+ "type": "text",
3588
+ "primaryKey": false,
3589
+ "notNull": false
3590
+ },
3591
+ "close_reason": {
3592
+ "name": "close_reason",
3593
+ "type": "text",
3594
+ "primaryKey": false,
3595
+ "notNull": false
3596
+ },
3597
+ "created_at": {
3598
+ "name": "created_at",
3599
+ "type": "timestamp with time zone",
3600
+ "primaryKey": false,
3601
+ "notNull": true
3602
+ },
3603
+ "updated_at": {
3604
+ "name": "updated_at",
3605
+ "type": "timestamp with time zone",
3606
+ "primaryKey": false,
3607
+ "notNull": true
3608
+ }
3609
+ },
3610
+ "indexes": {
3611
+ "junior_review_items_open_dedupe_uidx": {
3612
+ "name": "junior_review_items_open_dedupe_uidx",
3613
+ "columns": [
3614
+ {
3615
+ "expression": "coalesce(\"provider\", '')",
3616
+ "asc": true,
3617
+ "isExpression": true,
3618
+ "nulls": "last"
3619
+ },
3620
+ {
3621
+ "expression": "coalesce(\"provider_tenant_id\", '')",
3622
+ "asc": true,
3623
+ "isExpression": true,
3624
+ "nulls": "last"
3625
+ },
3626
+ {
3627
+ "expression": "dedupe_key",
3628
+ "isExpression": false,
3629
+ "asc": true,
3630
+ "nulls": "last"
3631
+ }
3632
+ ],
3633
+ "isUnique": true,
3634
+ "where": "\"junior_review_items\".\"status\" = 'open'",
3635
+ "concurrently": false,
3636
+ "method": "btree",
3637
+ "with": {}
3638
+ },
3639
+ "junior_review_items_status_idx": {
3640
+ "name": "junior_review_items_status_idx",
3641
+ "columns": [
3642
+ {
3643
+ "expression": "status",
3644
+ "isExpression": false,
3645
+ "asc": true,
3646
+ "nulls": "last"
3647
+ },
3648
+ {
3649
+ "expression": "updated_at",
3650
+ "isExpression": false,
3651
+ "asc": true,
3652
+ "nulls": "last"
3653
+ },
3654
+ {
3655
+ "expression": "id",
3656
+ "isExpression": false,
3657
+ "asc": true,
3658
+ "nulls": "last"
3659
+ }
3660
+ ],
3661
+ "isUnique": false,
3662
+ "concurrently": false,
3663
+ "method": "btree",
3664
+ "with": {}
3665
+ },
3666
+ "junior_review_items_subject_idx": {
3667
+ "name": "junior_review_items_subject_idx",
3668
+ "columns": [
3669
+ {
3670
+ "expression": "subject_id",
3671
+ "isExpression": false,
3672
+ "asc": true,
3673
+ "nulls": "last"
3674
+ },
3675
+ {
3676
+ "expression": "status",
3677
+ "isExpression": false,
3678
+ "asc": true,
3679
+ "nulls": "last"
3680
+ }
3681
+ ],
3682
+ "isUnique": false,
3683
+ "concurrently": false,
3684
+ "method": "btree",
3685
+ "with": {}
3686
+ },
3687
+ "junior_review_items_automation_idx": {
3688
+ "name": "junior_review_items_automation_idx",
3689
+ "columns": [
3690
+ {
3691
+ "expression": "automation_id",
3692
+ "isExpression": false,
3693
+ "asc": true,
3694
+ "nulls": "last"
3695
+ },
3696
+ {
3697
+ "expression": "status",
3698
+ "isExpression": false,
3699
+ "asc": true,
3700
+ "nulls": "last"
3701
+ }
3702
+ ],
3703
+ "isUnique": false,
3704
+ "concurrently": false,
3705
+ "method": "btree",
3706
+ "with": {}
3707
+ }
3708
+ },
3709
+ "foreignKeys": {
3710
+ "junior_review_items_added_by_conversation_id_junior_conversations_conversation_id_fk": {
3711
+ "name": "junior_review_items_added_by_conversation_id_junior_conversations_conversation_id_fk",
3712
+ "tableFrom": "junior_review_items",
3713
+ "tableTo": "junior_conversations",
3714
+ "columnsFrom": ["added_by_conversation_id"],
3715
+ "columnsTo": ["conversation_id"],
3716
+ "onDelete": "cascade",
3717
+ "onUpdate": "no action"
3718
+ },
3719
+ "junior_review_items_automation_id_junior_automations_id_fk": {
3720
+ "name": "junior_review_items_automation_id_junior_automations_id_fk",
3721
+ "tableFrom": "junior_review_items",
3722
+ "tableTo": "junior_automations",
3723
+ "columnsFrom": ["automation_id"],
3724
+ "columnsTo": ["id"],
3725
+ "onDelete": "set null",
3726
+ "onUpdate": "no action"
3727
+ },
3728
+ "junior_review_items_closed_by_user_id_junior_users_id_fk": {
3729
+ "name": "junior_review_items_closed_by_user_id_junior_users_id_fk",
3730
+ "tableFrom": "junior_review_items",
3731
+ "tableTo": "junior_users",
3732
+ "columnsFrom": ["closed_by_user_id"],
3733
+ "columnsTo": ["id"],
3734
+ "onDelete": "set null",
3735
+ "onUpdate": "no action"
3736
+ }
3737
+ },
3738
+ "compositePrimaryKeys": {},
3739
+ "uniqueConstraints": {},
3740
+ "policies": {},
3741
+ "checkConstraints": {
3742
+ "junior_review_items_kind_check": {
3743
+ "name": "junior_review_items_kind_check",
3744
+ "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)"
3745
+ },
3746
+ "junior_review_items_status_check": {
3747
+ "name": "junior_review_items_status_check",
3748
+ "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)"
3749
+ },
3750
+ "junior_review_items_tenant_check": {
3751
+ "name": "junior_review_items_tenant_check",
3752
+ "value": "(\"junior_review_items\".\"provider\" is null) = (\"junior_review_items\".\"provider_tenant_id\" is null)"
3753
+ },
3754
+ "junior_review_items_visibility_check": {
3755
+ "name": "junior_review_items_visibility_check",
3756
+ "value": "\"junior_review_items\".\"visibility\" = 'public' or not \"junior_review_items\".\"assigned_to_everyone\""
3757
+ }
3758
+ },
3759
+ "isRLSEnabled": false
3760
+ },
3761
+ "public.junior_snapshots": {
3762
+ "name": "junior_snapshots",
3763
+ "schema": "",
3764
+ "columns": {
3765
+ "id": {
3766
+ "name": "id",
3767
+ "type": "text",
3768
+ "primaryKey": true,
3769
+ "notNull": true
3770
+ },
3771
+ "workspace_id": {
3772
+ "name": "workspace_id",
3773
+ "type": "text",
3774
+ "primaryKey": false,
3775
+ "notNull": true
3776
+ },
3777
+ "profile_hash": {
3778
+ "name": "profile_hash",
3779
+ "type": "text",
3780
+ "primaryKey": false,
3781
+ "notNull": true
3782
+ },
3783
+ "status": {
3784
+ "name": "status",
3785
+ "type": "text",
3786
+ "primaryKey": false,
3787
+ "notNull": true
3788
+ },
3789
+ "snapshot_id": {
3790
+ "name": "snapshot_id",
3791
+ "type": "text",
3792
+ "primaryKey": false,
3793
+ "notNull": false
3794
+ },
3795
+ "build_duration_ms": {
3796
+ "name": "build_duration_ms",
3797
+ "type": "integer",
3798
+ "primaryKey": false,
3799
+ "notNull": false
3800
+ },
3801
+ "size_bytes": {
3802
+ "name": "size_bytes",
3803
+ "type": "bigint",
3804
+ "primaryKey": false,
3805
+ "notNull": false
3806
+ },
3807
+ "generated_at": {
3808
+ "name": "generated_at",
3809
+ "type": "timestamp with time zone",
3810
+ "primaryKey": false,
3811
+ "notNull": false
3812
+ },
3813
+ "build_started_at": {
3814
+ "name": "build_started_at",
3815
+ "type": "timestamp with time zone",
3816
+ "primaryKey": false,
3817
+ "notNull": false
3818
+ },
3819
+ "build_phase": {
3820
+ "name": "build_phase",
3821
+ "type": "text",
3822
+ "primaryKey": false,
3823
+ "notNull": false
3824
+ },
3825
+ "build_sandbox_name": {
3826
+ "name": "build_sandbox_name",
3827
+ "type": "text",
3828
+ "primaryKey": false,
3829
+ "notNull": false
3830
+ },
3831
+ "build_command_id": {
3832
+ "name": "build_command_id",
3833
+ "type": "text",
3834
+ "primaryKey": false,
3835
+ "notNull": false
3836
+ },
3837
+ "build_error": {
3838
+ "name": "build_error",
3839
+ "type": "text",
3840
+ "primaryKey": false,
3841
+ "notNull": false
3842
+ },
3843
+ "created_at": {
3844
+ "name": "created_at",
3845
+ "type": "timestamp with time zone",
3846
+ "primaryKey": false,
3847
+ "notNull": true
3848
+ },
3849
+ "updated_at": {
3850
+ "name": "updated_at",
3851
+ "type": "timestamp with time zone",
3852
+ "primaryKey": false,
3853
+ "notNull": true
3854
+ }
3855
+ },
3856
+ "indexes": {
3857
+ "junior_snapshots_snapshot_id_uidx": {
3858
+ "name": "junior_snapshots_snapshot_id_uidx",
3859
+ "columns": [
3860
+ {
3861
+ "expression": "snapshot_id",
3862
+ "isExpression": false,
3863
+ "asc": true,
3864
+ "nulls": "last"
3865
+ }
3866
+ ],
3867
+ "isUnique": true,
3868
+ "concurrently": false,
3869
+ "method": "btree",
3870
+ "with": {}
3871
+ },
3872
+ "junior_snapshots_workspace_idx": {
3873
+ "name": "junior_snapshots_workspace_idx",
3874
+ "columns": [
3875
+ {
3876
+ "expression": "workspace_id",
3877
+ "isExpression": false,
3878
+ "asc": true,
3879
+ "nulls": "last"
3880
+ }
3881
+ ],
3882
+ "isUnique": false,
3883
+ "concurrently": false,
3884
+ "method": "btree",
3885
+ "with": {}
3886
+ },
3887
+ "junior_snapshots_workspace_profile_status_idx": {
3888
+ "name": "junior_snapshots_workspace_profile_status_idx",
3889
+ "columns": [
3890
+ {
3891
+ "expression": "workspace_id",
3892
+ "isExpression": false,
3893
+ "asc": true,
3894
+ "nulls": "last"
3895
+ },
3896
+ {
3897
+ "expression": "profile_hash",
3898
+ "isExpression": false,
3899
+ "asc": true,
3900
+ "nulls": "last"
3901
+ },
3902
+ {
3903
+ "expression": "status",
3904
+ "isExpression": false,
3905
+ "asc": true,
3906
+ "nulls": "last"
3907
+ }
3908
+ ],
3909
+ "isUnique": false,
3910
+ "concurrently": false,
3911
+ "method": "btree",
3912
+ "with": {}
3913
+ },
3914
+ "junior_snapshots_active_build_uidx": {
3915
+ "name": "junior_snapshots_active_build_uidx",
3916
+ "columns": [
3917
+ {
3918
+ "expression": "workspace_id",
3919
+ "isExpression": false,
3920
+ "asc": true,
3921
+ "nulls": "last"
3922
+ },
3923
+ {
3924
+ "expression": "profile_hash",
3925
+ "isExpression": false,
3926
+ "asc": true,
3927
+ "nulls": "last"
3928
+ }
3929
+ ],
3930
+ "isUnique": true,
3931
+ "where": "\"junior_snapshots\".\"status\" = 'building'",
3932
+ "concurrently": false,
3933
+ "method": "btree",
3934
+ "with": {}
3935
+ },
3936
+ "junior_snapshots_workspace_status_idx": {
3937
+ "name": "junior_snapshots_workspace_status_idx",
3938
+ "columns": [
3939
+ {
3940
+ "expression": "workspace_id",
3941
+ "isExpression": false,
3942
+ "asc": true,
3943
+ "nulls": "last"
3944
+ },
3945
+ {
3946
+ "expression": "status",
3947
+ "isExpression": false,
3948
+ "asc": true,
3949
+ "nulls": "last"
3950
+ }
3951
+ ],
3952
+ "isUnique": false,
3953
+ "concurrently": false,
3954
+ "method": "btree",
3955
+ "with": {}
3956
+ }
3957
+ },
3958
+ "foreignKeys": {
3959
+ "junior_snapshots_workspace_id_junior_workspaces_id_fk": {
3960
+ "name": "junior_snapshots_workspace_id_junior_workspaces_id_fk",
3961
+ "tableFrom": "junior_snapshots",
3962
+ "tableTo": "junior_workspaces",
3963
+ "columnsFrom": ["workspace_id"],
3964
+ "columnsTo": ["id"],
3965
+ "onDelete": "cascade",
3966
+ "onUpdate": "no action"
3967
+ }
3968
+ },
3969
+ "compositePrimaryKeys": {},
3970
+ "uniqueConstraints": {},
3971
+ "policies": {},
3972
+ "checkConstraints": {
3973
+ "junior_snapshots_status_check": {
3974
+ "name": "junior_snapshots_status_check",
3975
+ "value": "\"junior_snapshots\".\"status\" in ('building', 'failed', 'ready')"
3976
+ },
3977
+ "junior_snapshots_build_phase_check": {
3978
+ "name": "junior_snapshots_build_phase_check",
3979
+ "value": "\"junior_snapshots\".\"build_phase\" is null or \"junior_snapshots\".\"build_phase\" in ('created', 'dependencies_installed', 'repositories_prepared')"
3980
+ },
3981
+ "junior_snapshots_ready_fields_check": {
3982
+ "name": "junior_snapshots_ready_fields_check",
3983
+ "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)"
3984
+ },
3985
+ "junior_snapshots_build_fields_check": {
3986
+ "name": "junior_snapshots_build_fields_check",
3987
+ "value": "\"junior_snapshots\".\"status\" = 'ready' or (\"junior_snapshots\".\"build_started_at\" is not null and \"junior_snapshots\".\"build_phase\" is not null)"
3988
+ },
3989
+ "junior_snapshots_build_duration_check": {
3990
+ "name": "junior_snapshots_build_duration_check",
3991
+ "value": "\"junior_snapshots\".\"build_duration_ms\" is null or \"junior_snapshots\".\"build_duration_ms\" >= 0"
3992
+ },
3993
+ "junior_snapshots_size_bytes_check": {
3994
+ "name": "junior_snapshots_size_bytes_check",
3995
+ "value": "\"junior_snapshots\".\"size_bytes\" is null or \"junior_snapshots\".\"size_bytes\" >= 0"
3996
+ }
3997
+ },
3998
+ "isRLSEnabled": false
3999
+ },
4000
+ "public.junior_stats": {
4001
+ "name": "junior_stats",
4002
+ "schema": "",
4003
+ "columns": {
4004
+ "date": {
4005
+ "name": "date",
4006
+ "type": "date",
4007
+ "primaryKey": false,
4008
+ "notNull": true
4009
+ },
4010
+ "namespace": {
4011
+ "name": "namespace",
4012
+ "type": "text",
4013
+ "primaryKey": false,
4014
+ "notNull": true
4015
+ },
4016
+ "metric": {
4017
+ "name": "metric",
4018
+ "type": "text",
4019
+ "primaryKey": false,
4020
+ "notNull": true
4021
+ },
4022
+ "name": {
4023
+ "name": "name",
4024
+ "type": "text",
4025
+ "primaryKey": false,
4026
+ "notNull": true
4027
+ },
4028
+ "count": {
4029
+ "name": "count",
4030
+ "type": "integer",
4031
+ "primaryKey": false,
4032
+ "notNull": true,
4033
+ "default": 0
4034
+ }
4035
+ },
4036
+ "indexes": {},
4037
+ "foreignKeys": {},
4038
+ "compositePrimaryKeys": {
4039
+ "junior_stats_date_namespace_metric_name_pk": {
4040
+ "name": "junior_stats_date_namespace_metric_name_pk",
4041
+ "columns": ["date", "namespace", "metric", "name"]
4042
+ }
4043
+ },
4044
+ "uniqueConstraints": {},
4045
+ "policies": {},
4046
+ "checkConstraints": {},
4047
+ "isRLSEnabled": false
4048
+ },
4049
+ "public.junior_users": {
4050
+ "name": "junior_users",
4051
+ "schema": "",
4052
+ "columns": {
4053
+ "id": {
4054
+ "name": "id",
4055
+ "type": "text",
4056
+ "primaryKey": true,
4057
+ "notNull": true
4058
+ },
4059
+ "primary_email": {
4060
+ "name": "primary_email",
4061
+ "type": "text",
4062
+ "primaryKey": false,
4063
+ "notNull": true
4064
+ },
4065
+ "primary_email_normalized": {
4066
+ "name": "primary_email_normalized",
4067
+ "type": "text",
4068
+ "primaryKey": false,
4069
+ "notNull": true
4070
+ },
4071
+ "display_name": {
4072
+ "name": "display_name",
4073
+ "type": "text",
4074
+ "primaryKey": false,
4075
+ "notNull": false
4076
+ },
4077
+ "timezone": {
4078
+ "name": "timezone",
4079
+ "type": "text",
4080
+ "primaryKey": false,
4081
+ "notNull": false
4082
+ },
4083
+ "customization": {
4084
+ "name": "customization",
4085
+ "type": "text",
4086
+ "primaryKey": false,
4087
+ "notNull": false
4088
+ },
4089
+ "is_admin": {
4090
+ "name": "is_admin",
4091
+ "type": "boolean",
4092
+ "primaryKey": false,
4093
+ "notNull": true,
4094
+ "default": false
4095
+ },
4096
+ "auto_archive_default": {
4097
+ "name": "auto_archive_default",
4098
+ "type": "boolean",
4099
+ "primaryKey": false,
4100
+ "notNull": true,
4101
+ "default": false
4102
+ },
4103
+ "auto_archive_grace_hours": {
4104
+ "name": "auto_archive_grace_hours",
4105
+ "type": "integer",
4106
+ "primaryKey": false,
4107
+ "notNull": true,
4108
+ "default": 24
4109
+ },
4110
+ "created_at": {
4111
+ "name": "created_at",
4112
+ "type": "timestamp with time zone",
4113
+ "primaryKey": false,
4114
+ "notNull": true
4115
+ },
4116
+ "updated_at": {
4117
+ "name": "updated_at",
4118
+ "type": "timestamp with time zone",
4119
+ "primaryKey": false,
4120
+ "notNull": true
4121
+ }
4122
+ },
4123
+ "indexes": {
4124
+ "junior_users_primary_email_normalized_uidx": {
4125
+ "name": "junior_users_primary_email_normalized_uidx",
4126
+ "columns": [
4127
+ {
4128
+ "expression": "primary_email_normalized",
4129
+ "isExpression": false,
4130
+ "asc": true,
4131
+ "nulls": "last"
4132
+ }
4133
+ ],
4134
+ "isUnique": true,
4135
+ "concurrently": false,
4136
+ "method": "btree",
4137
+ "with": {}
4138
+ }
4139
+ },
4140
+ "foreignKeys": {},
4141
+ "compositePrimaryKeys": {},
4142
+ "uniqueConstraints": {},
4143
+ "policies": {},
4144
+ "checkConstraints": {},
4145
+ "isRLSEnabled": false
4146
+ },
4147
+ "public.junior_workspace_repos": {
4148
+ "name": "junior_workspace_repos",
4149
+ "schema": "",
4150
+ "columns": {
4151
+ "workspace_id": {
4152
+ "name": "workspace_id",
4153
+ "type": "text",
4154
+ "primaryKey": false,
4155
+ "notNull": true
4156
+ },
4157
+ "provider": {
4158
+ "name": "provider",
4159
+ "type": "text",
4160
+ "primaryKey": false,
4161
+ "notNull": true
4162
+ },
4163
+ "repo": {
4164
+ "name": "repo",
4165
+ "type": "text",
4166
+ "primaryKey": false,
4167
+ "notNull": true
4168
+ }
4169
+ },
4170
+ "indexes": {},
4171
+ "foreignKeys": {
4172
+ "junior_workspace_repos_workspace_id_junior_workspaces_id_fk": {
4173
+ "name": "junior_workspace_repos_workspace_id_junior_workspaces_id_fk",
4174
+ "tableFrom": "junior_workspace_repos",
4175
+ "tableTo": "junior_workspaces",
4176
+ "columnsFrom": ["workspace_id"],
4177
+ "columnsTo": ["id"],
4178
+ "onDelete": "cascade",
4179
+ "onUpdate": "no action"
4180
+ }
4181
+ },
4182
+ "compositePrimaryKeys": {
4183
+ "junior_workspace_repos_workspace_id_provider_repo_pk": {
4184
+ "name": "junior_workspace_repos_workspace_id_provider_repo_pk",
4185
+ "columns": ["workspace_id", "provider", "repo"]
4186
+ }
4187
+ },
4188
+ "uniqueConstraints": {},
4189
+ "policies": {},
4190
+ "checkConstraints": {},
4191
+ "isRLSEnabled": false
4192
+ },
4193
+ "public.junior_workspaces": {
4194
+ "name": "junior_workspaces",
4195
+ "schema": "",
4196
+ "columns": {
4197
+ "id": {
4198
+ "name": "id",
4199
+ "type": "text",
4200
+ "primaryKey": true,
4201
+ "notNull": true
4202
+ },
4203
+ "name": {
4204
+ "name": "name",
4205
+ "type": "text",
4206
+ "primaryKey": false,
4207
+ "notNull": true
4208
+ },
4209
+ "setup_script": {
4210
+ "name": "setup_script",
4211
+ "type": "text",
4212
+ "primaryKey": false,
4213
+ "notNull": true,
4214
+ "default": "''"
4215
+ },
4216
+ "vcpus": {
4217
+ "name": "vcpus",
4218
+ "type": "integer",
4219
+ "primaryKey": false,
4220
+ "notNull": false
4221
+ },
4222
+ "created_at": {
4223
+ "name": "created_at",
4224
+ "type": "timestamp with time zone",
4225
+ "primaryKey": false,
4226
+ "notNull": true
4227
+ },
4228
+ "updated_at": {
4229
+ "name": "updated_at",
4230
+ "type": "timestamp with time zone",
4231
+ "primaryKey": false,
4232
+ "notNull": true
4233
+ }
4234
+ },
4235
+ "indexes": {
4236
+ "junior_workspaces_name_idx": {
4237
+ "name": "junior_workspaces_name_idx",
4238
+ "columns": [
4239
+ {
4240
+ "expression": "name",
4241
+ "isExpression": false,
4242
+ "asc": true,
4243
+ "nulls": "last"
4244
+ }
4245
+ ],
4246
+ "isUnique": true,
4247
+ "concurrently": false,
4248
+ "method": "btree",
4249
+ "with": {}
4250
+ }
4251
+ },
4252
+ "foreignKeys": {},
4253
+ "compositePrimaryKeys": {},
4254
+ "uniqueConstraints": {},
4255
+ "policies": {},
4256
+ "checkConstraints": {},
4257
+ "isRLSEnabled": false
4258
+ }
4259
+ },
4260
+ "enums": {},
4261
+ "schemas": {},
4262
+ "sequences": {},
4263
+ "roles": {},
4264
+ "policies": {},
4265
+ "views": {},
4266
+ "_meta": {
4267
+ "columns": {},
4268
+ "schemas": {},
4269
+ "tables": {}
4270
+ }
4271
+ }