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