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