@sentry/junior 0.176.2 → 0.178.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 (92) hide show
  1. package/dist/{agent-hooks-LQZFBXBK.js → agent-hooks-PBT4NNBV.js} +12 -12
  2. package/dist/api/conversations/archive.d.ts +5 -2
  3. package/dist/api/conversations/list.d.ts +0 -1
  4. package/dist/api/conversations/membership.d.ts +14 -0
  5. package/dist/api/conversations/projection.d.ts +2 -1
  6. package/dist/api/locations/detail.d.ts +1 -1
  7. package/dist/api/people/shared.d.ts +2 -2
  8. package/dist/api/schema/conversation.d.ts +4 -4
  9. package/dist/api/schema/location.d.ts +1 -1
  10. package/dist/api/schema/person.d.ts +1 -1
  11. package/dist/api/schema.js +1 -1
  12. package/dist/api.js +245 -166
  13. package/dist/app.js +52 -57
  14. package/dist/{catalog-runtime-P3DBC3XM.js → catalog-runtime-M7QGKPFZ.js} +5 -5
  15. package/dist/chat/agent/sandbox.d.ts +2 -0
  16. package/dist/chat/conversations/sql/participants.d.ts +1 -0
  17. package/dist/chat/conversations/store.d.ts +0 -1
  18. package/dist/chat/resource-events/notification.d.ts +6 -1
  19. package/dist/chat/sandbox/errors.d.ts +4 -0
  20. package/dist/chat/sandbox/noninteractive-command.d.ts +1 -0
  21. package/dist/chat/sandbox/prepare-workspace.d.ts +27 -3
  22. package/dist/chat/sandbox/sandbox.d.ts +2 -0
  23. package/dist/chat/sandbox/session.d.ts +2 -0
  24. package/dist/chat/sandbox/snapshot/builder-sandbox.d.ts +5 -0
  25. package/dist/chat/sandbox/snapshot/install.d.ts +2 -2
  26. package/dist/chat/sandbox/snapshot/span.d.ts +3 -0
  27. package/dist/chat/sandbox/snapshot/store.d.ts +20 -17
  28. package/dist/chat/sandbox/snapshot/waiting-error.d.ts +15 -0
  29. package/dist/chat/sandbox/snapshot/workspace.d.ts +17 -0
  30. package/dist/chat/services/workspace-snapshot-wait.d.ts +27 -0
  31. package/dist/chat/workspaces/types.d.ts +1 -0
  32. package/dist/{chunk-2PWBS4JK.js → chunk-22T3HB44.js} +1 -1
  33. package/dist/{chunk-LNV3NNDO.js → chunk-3ZZEPLLB.js} +2 -2
  34. package/dist/{chunk-DBXTXY2Z.js → chunk-4K6VNP3S.js} +9 -9
  35. package/dist/{chunk-SZWILPFG.js → chunk-534BO42N.js} +45 -276
  36. package/dist/{chunk-QWPKRFG6.js → chunk-6OYVH66J.js} +1 -1
  37. package/dist/{chunk-ESIS6NVJ.js → chunk-ABLODWPO.js} +1 -1
  38. package/dist/{chunk-LY6QWCJI.js → chunk-AGJ4OQ2V.js} +1 -1
  39. package/dist/{chunk-KKY2R2QF.js → chunk-AQHSXA3J.js} +331 -2
  40. package/dist/{chunk-JRDM64UU.js → chunk-AVRWMQ4U.js} +1 -1
  41. package/dist/{chunk-B2RBW7CX.js → chunk-BFLMRTPD.js} +6 -6
  42. package/dist/{chunk-HXX3CSGJ.js → chunk-BHHWCNXI.js} +5 -5
  43. package/dist/{chunk-H5SVUUPE.js → chunk-BUGO42R6.js} +4 -4
  44. package/dist/{chunk-2XQ45FB2.js → chunk-D3UJTX4U.js} +1 -1
  45. package/dist/{chunk-V4SBMRZ3.js → chunk-FQ6BMP5P.js} +767 -81
  46. package/dist/{chunk-AJ6M3LLM.js → chunk-G3CQEUHI.js} +5 -5
  47. package/dist/{chunk-RHNT2FYF.js → chunk-H6ZXBFGX.js} +1 -1
  48. package/dist/{chunk-FLBOMXLS.js → chunk-IQRPDKPJ.js} +1 -1
  49. package/dist/{chunk-OOH45KJS.js → chunk-JVXZ3WDH.js} +6 -6
  50. package/dist/{chunk-HLEE6JNT.js → chunk-KEQAA42D.js} +1 -1
  51. package/dist/{chunk-E7MUDWFH.js → chunk-LAOP4EPL.js} +6 -6
  52. package/dist/{chunk-FIWDSKL2.js → chunk-OGRD5PFM.js} +1 -1
  53. package/dist/{chunk-MNKXBIIA.js → chunk-PRDKO3QB.js} +124 -13
  54. package/dist/{chunk-YAB6CALP.js → chunk-QCCLDJHB.js} +8 -8
  55. package/dist/{chunk-FDA3E627.js → chunk-RE4XWXBV.js} +6 -6
  56. package/dist/{chunk-WVDCJ26T.js → chunk-RGV6KHDM.js} +4 -4
  57. package/dist/{chunk-73FXUNOB.js → chunk-RGXOLPWO.js} +1 -1
  58. package/dist/{chunk-ELEAIRTG.js → chunk-TKB25A3L.js} +2 -2
  59. package/dist/{chunk-UZM72ORS.js → chunk-U3UDPGZG.js} +2 -2
  60. package/dist/{chunk-PLJ3UO67.js → chunk-UGWBJAGN.js} +1 -1
  61. package/dist/{chunk-OJQTYDDD.js → chunk-UMG7M32G.js} +19 -19
  62. package/dist/{chunk-MOVIDCPX.js → chunk-XCNS3CXE.js} +11 -17
  63. package/dist/{chunk-TRG4RCTT.js → chunk-XWUJWHFD.js} +204 -100
  64. package/dist/{chunk-2KSPJ6EE.js → chunk-ZCHHVTMF.js} +14 -5
  65. package/dist/cli/chat.js +31 -30
  66. package/dist/cli/check.js +6 -6
  67. package/dist/cli/plugins.js +13 -13
  68. package/dist/cli/snapshot-create.js +10 -10
  69. package/dist/cli/upgrade.js +7 -7
  70. package/dist/db/schema/conversation-participants.d.ts +17 -0
  71. package/dist/db/schema/conversations.d.ts +629 -1
  72. package/dist/db/schema/snapshots.d.ts +1 -1
  73. package/dist/db/schema.d.ts +18 -1
  74. package/dist/{db-ATGRVFSI.js → db-QVYOWATH.js} +7 -7
  75. package/dist/instrumentation.js +4 -4
  76. package/dist/nitro.js +2 -2
  77. package/dist/{oauth-callback-server-55TYSRIZ.js → oauth-callback-server-PLPAFXO6.js} +23 -23
  78. package/dist/{runner-FD4BRECW.js → runner-AGNEIOZS.js} +15 -15
  79. package/dist/{skills-5YY7QYV6.js → skills-U5KQ66EM.js} +6 -6
  80. package/dist/spawn-ZRYYZP2B.js +37 -0
  81. package/dist/{validation-KH5UQUV4.js → validation-QE4U45KS.js} +6 -6
  82. package/dist/version.js +1 -1
  83. package/dist/{work-5LWDUEO4.js → work-ATAXAHJJ.js} +18 -18
  84. package/dist/worker-LIL5AOER.js +24 -0
  85. package/migrations/0033_workspace_snapshot_active_build.sql +1 -0
  86. package/migrations/0034_strong_randall.sql +31 -0
  87. package/migrations/meta/0033_snapshot.json +2914 -0
  88. package/migrations/meta/0034_snapshot.json +3038 -0
  89. package/migrations/meta/_journal.json +15 -1
  90. package/package.json +5 -5
  91. package/dist/spawn-6IS46YNW.js +0 -37
  92. package/dist/worker-XKVLTAI2.js +0 -24
@@ -0,0 +1,3038 @@
1
+ {
2
+ "id": "5f541d5b-316b-4af1-aa1e-443fefed33c3",
3
+ "prevId": "30e30f6e-cfbc-4d22-aa24-8c0d8a5abc37",
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_conversation_annotations": {
634
+ "name": "junior_conversation_annotations",
635
+ "schema": "",
636
+ "columns": {
637
+ "conversation_id": {
638
+ "name": "conversation_id",
639
+ "type": "text",
640
+ "primaryKey": false,
641
+ "notNull": true
642
+ },
643
+ "plugin": {
644
+ "name": "plugin",
645
+ "type": "text",
646
+ "primaryKey": false,
647
+ "notNull": true
648
+ },
649
+ "kind": {
650
+ "name": "kind",
651
+ "type": "text",
652
+ "primaryKey": false,
653
+ "notNull": true
654
+ },
655
+ "key": {
656
+ "name": "key",
657
+ "type": "text",
658
+ "primaryKey": false,
659
+ "notNull": true
660
+ },
661
+ "annotation_json": {
662
+ "name": "annotation_json",
663
+ "type": "jsonb",
664
+ "primaryKey": false,
665
+ "notNull": true
666
+ },
667
+ "created_at": {
668
+ "name": "created_at",
669
+ "type": "timestamp with time zone",
670
+ "primaryKey": false,
671
+ "notNull": true
672
+ },
673
+ "updated_at": {
674
+ "name": "updated_at",
675
+ "type": "timestamp with time zone",
676
+ "primaryKey": false,
677
+ "notNull": true
678
+ }
679
+ },
680
+ "indexes": {},
681
+ "foreignKeys": {
682
+ "junior_conversation_annotations_conversation_id_fk": {
683
+ "name": "junior_conversation_annotations_conversation_id_fk",
684
+ "tableFrom": "junior_conversation_annotations",
685
+ "tableTo": "junior_conversations",
686
+ "columnsFrom": [
687
+ "conversation_id"
688
+ ],
689
+ "columnsTo": [
690
+ "conversation_id"
691
+ ],
692
+ "onDelete": "cascade",
693
+ "onUpdate": "no action"
694
+ }
695
+ },
696
+ "compositePrimaryKeys": {
697
+ "junior_conversation_annotations_pk": {
698
+ "name": "junior_conversation_annotations_pk",
699
+ "columns": [
700
+ "conversation_id",
701
+ "plugin",
702
+ "kind",
703
+ "key"
704
+ ]
705
+ }
706
+ },
707
+ "uniqueConstraints": {},
708
+ "policies": {},
709
+ "checkConstraints": {},
710
+ "isRLSEnabled": false
711
+ },
712
+ "public.junior_conversation_bindings": {
713
+ "name": "junior_conversation_bindings",
714
+ "schema": "",
715
+ "columns": {
716
+ "conversation_id": {
717
+ "name": "conversation_id",
718
+ "type": "text",
719
+ "primaryKey": false,
720
+ "notNull": true
721
+ },
722
+ "provider": {
723
+ "name": "provider",
724
+ "type": "text",
725
+ "primaryKey": false,
726
+ "notNull": true
727
+ },
728
+ "provider_tenant_id": {
729
+ "name": "provider_tenant_id",
730
+ "type": "text",
731
+ "primaryKey": false,
732
+ "notNull": true,
733
+ "default": "''"
734
+ },
735
+ "provider_destination_id": {
736
+ "name": "provider_destination_id",
737
+ "type": "text",
738
+ "primaryKey": false,
739
+ "notNull": true
740
+ },
741
+ "provider_conversation_id": {
742
+ "name": "provider_conversation_id",
743
+ "type": "text",
744
+ "primaryKey": false,
745
+ "notNull": true
746
+ },
747
+ "created_at": {
748
+ "name": "created_at",
749
+ "type": "timestamp with time zone",
750
+ "primaryKey": false,
751
+ "notNull": true
752
+ }
753
+ },
754
+ "indexes": {
755
+ "junior_conversation_bindings_conversation_idx": {
756
+ "name": "junior_conversation_bindings_conversation_idx",
757
+ "columns": [
758
+ {
759
+ "expression": "conversation_id",
760
+ "isExpression": false,
761
+ "asc": true,
762
+ "nulls": "last"
763
+ }
764
+ ],
765
+ "isUnique": false,
766
+ "concurrently": false,
767
+ "method": "btree",
768
+ "with": {}
769
+ }
770
+ },
771
+ "foreignKeys": {
772
+ "junior_conversation_bindings_conversation_id_junior_conversations_conversation_id_fk": {
773
+ "name": "junior_conversation_bindings_conversation_id_junior_conversations_conversation_id_fk",
774
+ "tableFrom": "junior_conversation_bindings",
775
+ "tableTo": "junior_conversations",
776
+ "columnsFrom": [
777
+ "conversation_id"
778
+ ],
779
+ "columnsTo": [
780
+ "conversation_id"
781
+ ],
782
+ "onDelete": "no action",
783
+ "onUpdate": "no action"
784
+ }
785
+ },
786
+ "compositePrimaryKeys": {
787
+ "junior_conversation_bindings_provider_conversation_pk": {
788
+ "name": "junior_conversation_bindings_provider_conversation_pk",
789
+ "columns": [
790
+ "provider",
791
+ "provider_tenant_id",
792
+ "provider_destination_id",
793
+ "provider_conversation_id"
794
+ ]
795
+ }
796
+ },
797
+ "uniqueConstraints": {},
798
+ "policies": {},
799
+ "checkConstraints": {},
800
+ "isRLSEnabled": false
801
+ },
802
+ "public.junior_conversation_events": {
803
+ "name": "junior_conversation_events",
804
+ "schema": "",
805
+ "columns": {
806
+ "conversation_id": {
807
+ "name": "conversation_id",
808
+ "type": "text",
809
+ "primaryKey": false,
810
+ "notNull": true
811
+ },
812
+ "seq": {
813
+ "name": "seq",
814
+ "type": "integer",
815
+ "primaryKey": false,
816
+ "notNull": true
817
+ },
818
+ "history_version": {
819
+ "name": "history_version",
820
+ "type": "integer",
821
+ "primaryKey": false,
822
+ "notNull": true
823
+ },
824
+ "schema_version": {
825
+ "name": "schema_version",
826
+ "type": "integer",
827
+ "primaryKey": false,
828
+ "notNull": true,
829
+ "default": 1
830
+ },
831
+ "idempotency_key": {
832
+ "name": "idempotency_key",
833
+ "type": "text",
834
+ "primaryKey": false,
835
+ "notNull": false
836
+ },
837
+ "type": {
838
+ "name": "type",
839
+ "type": "text",
840
+ "primaryKey": false,
841
+ "notNull": true
842
+ },
843
+ "payload": {
844
+ "name": "payload",
845
+ "type": "jsonb",
846
+ "primaryKey": false,
847
+ "notNull": true
848
+ },
849
+ "actor_identity_id": {
850
+ "name": "actor_identity_id",
851
+ "type": "text",
852
+ "primaryKey": false,
853
+ "notNull": false
854
+ },
855
+ "created_at": {
856
+ "name": "created_at",
857
+ "type": "timestamp with time zone",
858
+ "primaryKey": false,
859
+ "notNull": true
860
+ }
861
+ },
862
+ "indexes": {
863
+ "junior_conversation_events_history_version_idx": {
864
+ "name": "junior_conversation_events_history_version_idx",
865
+ "columns": [
866
+ {
867
+ "expression": "conversation_id",
868
+ "isExpression": false,
869
+ "asc": true,
870
+ "nulls": "last"
871
+ },
872
+ {
873
+ "expression": "history_version",
874
+ "isExpression": false,
875
+ "asc": true,
876
+ "nulls": "last"
877
+ },
878
+ {
879
+ "expression": "seq",
880
+ "isExpression": false,
881
+ "asc": true,
882
+ "nulls": "last"
883
+ }
884
+ ],
885
+ "isUnique": false,
886
+ "concurrently": false,
887
+ "method": "btree",
888
+ "with": {}
889
+ },
890
+ "junior_conversation_events_type_idx": {
891
+ "name": "junior_conversation_events_type_idx",
892
+ "columns": [
893
+ {
894
+ "expression": "conversation_id",
895
+ "isExpression": false,
896
+ "asc": true,
897
+ "nulls": "last"
898
+ },
899
+ {
900
+ "expression": "type",
901
+ "isExpression": false,
902
+ "asc": true,
903
+ "nulls": "last"
904
+ },
905
+ {
906
+ "expression": "seq",
907
+ "isExpression": false,
908
+ "asc": true,
909
+ "nulls": "last"
910
+ }
911
+ ],
912
+ "isUnique": false,
913
+ "concurrently": false,
914
+ "method": "btree",
915
+ "with": {}
916
+ },
917
+ "junior_conversation_events_actor_identity_idx": {
918
+ "name": "junior_conversation_events_actor_identity_idx",
919
+ "columns": [
920
+ {
921
+ "expression": "actor_identity_id",
922
+ "isExpression": false,
923
+ "asc": true,
924
+ "nulls": "last"
925
+ },
926
+ {
927
+ "expression": "conversation_id",
928
+ "isExpression": false,
929
+ "asc": true,
930
+ "nulls": "last"
931
+ },
932
+ {
933
+ "expression": "seq",
934
+ "isExpression": false,
935
+ "asc": true,
936
+ "nulls": "last"
937
+ }
938
+ ],
939
+ "isUnique": false,
940
+ "concurrently": false,
941
+ "method": "btree",
942
+ "with": {}
943
+ },
944
+ "junior_conversation_events_message_search_idx": {
945
+ "name": "junior_conversation_events_message_search_idx",
946
+ "columns": [
947
+ {
948
+ "expression": "to_tsvector('english', \"payload\"->>'text')",
949
+ "asc": true,
950
+ "isExpression": true,
951
+ "nulls": "last"
952
+ }
953
+ ],
954
+ "isUnique": false,
955
+ "where": "\"junior_conversation_events\".\"type\" = 'message'",
956
+ "concurrently": false,
957
+ "method": "gin",
958
+ "with": {}
959
+ },
960
+ "junior_conversation_events_idempotency_idx": {
961
+ "name": "junior_conversation_events_idempotency_idx",
962
+ "columns": [
963
+ {
964
+ "expression": "conversation_id",
965
+ "isExpression": false,
966
+ "asc": true,
967
+ "nulls": "last"
968
+ },
969
+ {
970
+ "expression": "idempotency_key",
971
+ "isExpression": false,
972
+ "asc": true,
973
+ "nulls": "last"
974
+ }
975
+ ],
976
+ "isUnique": true,
977
+ "concurrently": false,
978
+ "method": "btree",
979
+ "with": {}
980
+ }
981
+ },
982
+ "foreignKeys": {
983
+ "junior_conversation_events_actor_identity_id_junior_identities_id_fk": {
984
+ "name": "junior_conversation_events_actor_identity_id_junior_identities_id_fk",
985
+ "tableFrom": "junior_conversation_events",
986
+ "tableTo": "junior_identities",
987
+ "columnsFrom": [
988
+ "actor_identity_id"
989
+ ],
990
+ "columnsTo": [
991
+ "id"
992
+ ],
993
+ "onDelete": "no action",
994
+ "onUpdate": "no action"
995
+ },
996
+ "junior_conversation_events_conversation_id_junior_conversations_conversation_id_fk": {
997
+ "name": "junior_conversation_events_conversation_id_junior_conversations_conversation_id_fk",
998
+ "tableFrom": "junior_conversation_events",
999
+ "tableTo": "junior_conversations",
1000
+ "columnsFrom": [
1001
+ "conversation_id"
1002
+ ],
1003
+ "columnsTo": [
1004
+ "conversation_id"
1005
+ ],
1006
+ "onDelete": "no action",
1007
+ "onUpdate": "no action"
1008
+ }
1009
+ },
1010
+ "compositePrimaryKeys": {
1011
+ "junior_conversation_events_conversation_id_seq_pk": {
1012
+ "name": "junior_conversation_events_conversation_id_seq_pk",
1013
+ "columns": [
1014
+ "conversation_id",
1015
+ "seq"
1016
+ ]
1017
+ }
1018
+ },
1019
+ "uniqueConstraints": {},
1020
+ "policies": {},
1021
+ "checkConstraints": {},
1022
+ "isRLSEnabled": false
1023
+ },
1024
+ "public.junior_conversation_participants": {
1025
+ "name": "junior_conversation_participants",
1026
+ "schema": "",
1027
+ "columns": {
1028
+ "user_id": {
1029
+ "name": "user_id",
1030
+ "type": "text",
1031
+ "primaryKey": false,
1032
+ "notNull": true
1033
+ },
1034
+ "root_conversation_id": {
1035
+ "name": "root_conversation_id",
1036
+ "type": "text",
1037
+ "primaryKey": false,
1038
+ "notNull": true
1039
+ },
1040
+ "last_message_at": {
1041
+ "name": "last_message_at",
1042
+ "type": "timestamp with time zone",
1043
+ "primaryKey": false,
1044
+ "notNull": true
1045
+ },
1046
+ "archived_at": {
1047
+ "name": "archived_at",
1048
+ "type": "timestamp with time zone",
1049
+ "primaryKey": false,
1050
+ "notNull": false
1051
+ }
1052
+ },
1053
+ "indexes": {
1054
+ "junior_conversation_participants_user_activity_idx": {
1055
+ "name": "junior_conversation_participants_user_activity_idx",
1056
+ "columns": [
1057
+ {
1058
+ "expression": "user_id",
1059
+ "isExpression": false,
1060
+ "asc": true,
1061
+ "nulls": "last"
1062
+ },
1063
+ {
1064
+ "expression": "last_message_at",
1065
+ "isExpression": false,
1066
+ "asc": false,
1067
+ "nulls": "last"
1068
+ }
1069
+ ],
1070
+ "isUnique": false,
1071
+ "concurrently": false,
1072
+ "method": "btree",
1073
+ "with": {}
1074
+ },
1075
+ "junior_conversation_participants_root_idx": {
1076
+ "name": "junior_conversation_participants_root_idx",
1077
+ "columns": [
1078
+ {
1079
+ "expression": "root_conversation_id",
1080
+ "isExpression": false,
1081
+ "asc": true,
1082
+ "nulls": "last"
1083
+ }
1084
+ ],
1085
+ "isUnique": false,
1086
+ "concurrently": false,
1087
+ "method": "btree",
1088
+ "with": {}
1089
+ }
1090
+ },
1091
+ "foreignKeys": {
1092
+ "junior_conversation_participants_user_id_junior_users_id_fk": {
1093
+ "name": "junior_conversation_participants_user_id_junior_users_id_fk",
1094
+ "tableFrom": "junior_conversation_participants",
1095
+ "tableTo": "junior_users",
1096
+ "columnsFrom": [
1097
+ "user_id"
1098
+ ],
1099
+ "columnsTo": [
1100
+ "id"
1101
+ ],
1102
+ "onDelete": "no action",
1103
+ "onUpdate": "no action"
1104
+ },
1105
+ "junior_conversation_participants_root_conversation_id_junior_conversations_conversation_id_fk": {
1106
+ "name": "junior_conversation_participants_root_conversation_id_junior_conversations_conversation_id_fk",
1107
+ "tableFrom": "junior_conversation_participants",
1108
+ "tableTo": "junior_conversations",
1109
+ "columnsFrom": [
1110
+ "root_conversation_id"
1111
+ ],
1112
+ "columnsTo": [
1113
+ "conversation_id"
1114
+ ],
1115
+ "onDelete": "no action",
1116
+ "onUpdate": "no action"
1117
+ }
1118
+ },
1119
+ "compositePrimaryKeys": {
1120
+ "junior_conversation_participants_user_root_pk": {
1121
+ "name": "junior_conversation_participants_user_root_pk",
1122
+ "columns": [
1123
+ "user_id",
1124
+ "root_conversation_id"
1125
+ ]
1126
+ }
1127
+ },
1128
+ "uniqueConstraints": {},
1129
+ "policies": {},
1130
+ "checkConstraints": {},
1131
+ "isRLSEnabled": false
1132
+ },
1133
+ "public.junior_conversations": {
1134
+ "name": "junior_conversations",
1135
+ "schema": "",
1136
+ "columns": {
1137
+ "conversation_id": {
1138
+ "name": "conversation_id",
1139
+ "type": "text",
1140
+ "primaryKey": true,
1141
+ "notNull": true
1142
+ },
1143
+ "schema_version": {
1144
+ "name": "schema_version",
1145
+ "type": "integer",
1146
+ "primaryKey": false,
1147
+ "notNull": true,
1148
+ "default": 1
1149
+ },
1150
+ "source": {
1151
+ "name": "source",
1152
+ "type": "text",
1153
+ "primaryKey": false,
1154
+ "notNull": false
1155
+ },
1156
+ "source_json": {
1157
+ "name": "source_json",
1158
+ "type": "jsonb",
1159
+ "primaryKey": false,
1160
+ "notNull": false
1161
+ },
1162
+ "origin_type": {
1163
+ "name": "origin_type",
1164
+ "type": "text",
1165
+ "primaryKey": false,
1166
+ "notNull": false
1167
+ },
1168
+ "origin_id": {
1169
+ "name": "origin_id",
1170
+ "type": "text",
1171
+ "primaryKey": false,
1172
+ "notNull": false
1173
+ },
1174
+ "origin_run_id": {
1175
+ "name": "origin_run_id",
1176
+ "type": "text",
1177
+ "primaryKey": false,
1178
+ "notNull": false
1179
+ },
1180
+ "destination_id": {
1181
+ "name": "destination_id",
1182
+ "type": "text",
1183
+ "primaryKey": false,
1184
+ "notNull": false
1185
+ },
1186
+ "destination_json": {
1187
+ "name": "destination_json",
1188
+ "type": "jsonb",
1189
+ "primaryKey": false,
1190
+ "notNull": false
1191
+ },
1192
+ "actor_identity_id": {
1193
+ "name": "actor_identity_id",
1194
+ "type": "text",
1195
+ "primaryKey": false,
1196
+ "notNull": false
1197
+ },
1198
+ "creator_identity_id": {
1199
+ "name": "creator_identity_id",
1200
+ "type": "text",
1201
+ "primaryKey": false,
1202
+ "notNull": false
1203
+ },
1204
+ "credential_subject_identity_id": {
1205
+ "name": "credential_subject_identity_id",
1206
+ "type": "text",
1207
+ "primaryKey": false,
1208
+ "notNull": false
1209
+ },
1210
+ "actor_json": {
1211
+ "name": "actor_json",
1212
+ "type": "jsonb",
1213
+ "primaryKey": false,
1214
+ "notNull": false
1215
+ },
1216
+ "channel_name": {
1217
+ "name": "channel_name",
1218
+ "type": "text",
1219
+ "primaryKey": false,
1220
+ "notNull": false
1221
+ },
1222
+ "title": {
1223
+ "name": "title",
1224
+ "type": "text",
1225
+ "primaryKey": false,
1226
+ "notNull": false
1227
+ },
1228
+ "created_at": {
1229
+ "name": "created_at",
1230
+ "type": "timestamp with time zone",
1231
+ "primaryKey": false,
1232
+ "notNull": true
1233
+ },
1234
+ "last_activity_at": {
1235
+ "name": "last_activity_at",
1236
+ "type": "timestamp with time zone",
1237
+ "primaryKey": false,
1238
+ "notNull": true
1239
+ },
1240
+ "updated_at": {
1241
+ "name": "updated_at",
1242
+ "type": "timestamp with time zone",
1243
+ "primaryKey": false,
1244
+ "notNull": true
1245
+ },
1246
+ "execution_updated_at": {
1247
+ "name": "execution_updated_at",
1248
+ "type": "timestamp with time zone",
1249
+ "primaryKey": false,
1250
+ "notNull": false
1251
+ },
1252
+ "execution_status": {
1253
+ "name": "execution_status",
1254
+ "type": "text",
1255
+ "primaryKey": false,
1256
+ "notNull": true
1257
+ },
1258
+ "run_id": {
1259
+ "name": "run_id",
1260
+ "type": "text",
1261
+ "primaryKey": false,
1262
+ "notNull": false
1263
+ },
1264
+ "last_checkpoint_at": {
1265
+ "name": "last_checkpoint_at",
1266
+ "type": "timestamp with time zone",
1267
+ "primaryKey": false,
1268
+ "notNull": false
1269
+ },
1270
+ "last_enqueued_at": {
1271
+ "name": "last_enqueued_at",
1272
+ "type": "timestamp with time zone",
1273
+ "primaryKey": false,
1274
+ "notNull": false
1275
+ },
1276
+ "parent_conversation_id": {
1277
+ "name": "parent_conversation_id",
1278
+ "type": "text",
1279
+ "primaryKey": false,
1280
+ "notNull": false
1281
+ },
1282
+ "root_conversation_id": {
1283
+ "name": "root_conversation_id",
1284
+ "type": "text",
1285
+ "primaryKey": false,
1286
+ "notNull": false
1287
+ },
1288
+ "transcript_purged_at": {
1289
+ "name": "transcript_purged_at",
1290
+ "type": "timestamp with time zone",
1291
+ "primaryKey": false,
1292
+ "notNull": false
1293
+ },
1294
+ "duration_ms": {
1295
+ "name": "duration_ms",
1296
+ "type": "integer",
1297
+ "primaryKey": false,
1298
+ "notNull": true,
1299
+ "default": 0
1300
+ },
1301
+ "usage_json": {
1302
+ "name": "usage_json",
1303
+ "type": "jsonb",
1304
+ "primaryKey": false,
1305
+ "notNull": false
1306
+ },
1307
+ "execution_duration_ms": {
1308
+ "name": "execution_duration_ms",
1309
+ "type": "integer",
1310
+ "primaryKey": false,
1311
+ "notNull": true,
1312
+ "default": 0
1313
+ },
1314
+ "execution_usage_json": {
1315
+ "name": "execution_usage_json",
1316
+ "type": "jsonb",
1317
+ "primaryKey": false,
1318
+ "notNull": false
1319
+ },
1320
+ "metric_run_id": {
1321
+ "name": "metric_run_id",
1322
+ "type": "text",
1323
+ "primaryKey": false,
1324
+ "notNull": false
1325
+ },
1326
+ "archived_at": {
1327
+ "name": "archived_at",
1328
+ "type": "timestamp with time zone",
1329
+ "primaryKey": false,
1330
+ "notNull": false
1331
+ }
1332
+ },
1333
+ "indexes": {
1334
+ "junior_conversations_last_activity_idx": {
1335
+ "name": "junior_conversations_last_activity_idx",
1336
+ "columns": [
1337
+ {
1338
+ "expression": "last_activity_at",
1339
+ "isExpression": false,
1340
+ "asc": false,
1341
+ "nulls": "last"
1342
+ },
1343
+ {
1344
+ "expression": "conversation_id",
1345
+ "isExpression": false,
1346
+ "asc": true,
1347
+ "nulls": "last"
1348
+ }
1349
+ ],
1350
+ "isUnique": false,
1351
+ "concurrently": false,
1352
+ "method": "btree",
1353
+ "with": {}
1354
+ },
1355
+ "junior_conversations_active_idx": {
1356
+ "name": "junior_conversations_active_idx",
1357
+ "columns": [
1358
+ {
1359
+ "expression": "coalesce(\"execution_updated_at\", \"updated_at\")",
1360
+ "asc": true,
1361
+ "isExpression": true,
1362
+ "nulls": "last"
1363
+ },
1364
+ {
1365
+ "expression": "conversation_id",
1366
+ "isExpression": false,
1367
+ "asc": true,
1368
+ "nulls": "last"
1369
+ }
1370
+ ],
1371
+ "isUnique": false,
1372
+ "where": "\"junior_conversations\".\"execution_status\" <> 'idle'",
1373
+ "concurrently": false,
1374
+ "method": "btree",
1375
+ "with": {}
1376
+ },
1377
+ "junior_conversations_destination_activity_idx": {
1378
+ "name": "junior_conversations_destination_activity_idx",
1379
+ "columns": [
1380
+ {
1381
+ "expression": "destination_id",
1382
+ "isExpression": false,
1383
+ "asc": true,
1384
+ "nulls": "last"
1385
+ },
1386
+ {
1387
+ "expression": "last_activity_at",
1388
+ "isExpression": false,
1389
+ "asc": false,
1390
+ "nulls": "last"
1391
+ }
1392
+ ],
1393
+ "isUnique": false,
1394
+ "concurrently": false,
1395
+ "method": "btree",
1396
+ "with": {}
1397
+ },
1398
+ "junior_conversations_actor_activity_idx": {
1399
+ "name": "junior_conversations_actor_activity_idx",
1400
+ "columns": [
1401
+ {
1402
+ "expression": "actor_identity_id",
1403
+ "isExpression": false,
1404
+ "asc": true,
1405
+ "nulls": "last"
1406
+ },
1407
+ {
1408
+ "expression": "last_activity_at",
1409
+ "isExpression": false,
1410
+ "asc": false,
1411
+ "nulls": "last"
1412
+ }
1413
+ ],
1414
+ "isUnique": false,
1415
+ "concurrently": false,
1416
+ "method": "btree",
1417
+ "with": {}
1418
+ },
1419
+ "junior_conversations_origin_idx": {
1420
+ "name": "junior_conversations_origin_idx",
1421
+ "columns": [
1422
+ {
1423
+ "expression": "origin_type",
1424
+ "isExpression": false,
1425
+ "asc": true,
1426
+ "nulls": "last"
1427
+ },
1428
+ {
1429
+ "expression": "origin_id",
1430
+ "isExpression": false,
1431
+ "asc": true,
1432
+ "nulls": "last"
1433
+ },
1434
+ {
1435
+ "expression": "last_activity_at",
1436
+ "isExpression": false,
1437
+ "asc": false,
1438
+ "nulls": "last"
1439
+ }
1440
+ ],
1441
+ "isUnique": false,
1442
+ "concurrently": false,
1443
+ "method": "btree",
1444
+ "with": {}
1445
+ },
1446
+ "junior_conversations_parent_idx": {
1447
+ "name": "junior_conversations_parent_idx",
1448
+ "columns": [
1449
+ {
1450
+ "expression": "parent_conversation_id",
1451
+ "isExpression": false,
1452
+ "asc": true,
1453
+ "nulls": "last"
1454
+ }
1455
+ ],
1456
+ "isUnique": false,
1457
+ "concurrently": false,
1458
+ "method": "btree",
1459
+ "with": {}
1460
+ },
1461
+ "junior_conversations_root_idx": {
1462
+ "name": "junior_conversations_root_idx",
1463
+ "columns": [
1464
+ {
1465
+ "expression": "root_conversation_id",
1466
+ "isExpression": false,
1467
+ "asc": true,
1468
+ "nulls": "last"
1469
+ }
1470
+ ],
1471
+ "isUnique": false,
1472
+ "concurrently": false,
1473
+ "method": "btree",
1474
+ "with": {}
1475
+ }
1476
+ },
1477
+ "foreignKeys": {
1478
+ "junior_conversations_destination_id_junior_destinations_id_fk": {
1479
+ "name": "junior_conversations_destination_id_junior_destinations_id_fk",
1480
+ "tableFrom": "junior_conversations",
1481
+ "tableTo": "junior_destinations",
1482
+ "columnsFrom": [
1483
+ "destination_id"
1484
+ ],
1485
+ "columnsTo": [
1486
+ "id"
1487
+ ],
1488
+ "onDelete": "no action",
1489
+ "onUpdate": "no action"
1490
+ },
1491
+ "junior_conversations_actor_identity_id_junior_identities_id_fk": {
1492
+ "name": "junior_conversations_actor_identity_id_junior_identities_id_fk",
1493
+ "tableFrom": "junior_conversations",
1494
+ "tableTo": "junior_identities",
1495
+ "columnsFrom": [
1496
+ "actor_identity_id"
1497
+ ],
1498
+ "columnsTo": [
1499
+ "id"
1500
+ ],
1501
+ "onDelete": "no action",
1502
+ "onUpdate": "no action"
1503
+ },
1504
+ "junior_conversations_creator_identity_id_junior_identities_id_fk": {
1505
+ "name": "junior_conversations_creator_identity_id_junior_identities_id_fk",
1506
+ "tableFrom": "junior_conversations",
1507
+ "tableTo": "junior_identities",
1508
+ "columnsFrom": [
1509
+ "creator_identity_id"
1510
+ ],
1511
+ "columnsTo": [
1512
+ "id"
1513
+ ],
1514
+ "onDelete": "no action",
1515
+ "onUpdate": "no action"
1516
+ },
1517
+ "junior_conversations_credential_subject_identity_id_junior_identities_id_fk": {
1518
+ "name": "junior_conversations_credential_subject_identity_id_junior_identities_id_fk",
1519
+ "tableFrom": "junior_conversations",
1520
+ "tableTo": "junior_identities",
1521
+ "columnsFrom": [
1522
+ "credential_subject_identity_id"
1523
+ ],
1524
+ "columnsTo": [
1525
+ "id"
1526
+ ],
1527
+ "onDelete": "no action",
1528
+ "onUpdate": "no action"
1529
+ },
1530
+ "junior_conversations_parent_conversation_id_junior_conversations_conversation_id_fk": {
1531
+ "name": "junior_conversations_parent_conversation_id_junior_conversations_conversation_id_fk",
1532
+ "tableFrom": "junior_conversations",
1533
+ "tableTo": "junior_conversations",
1534
+ "columnsFrom": [
1535
+ "parent_conversation_id"
1536
+ ],
1537
+ "columnsTo": [
1538
+ "conversation_id"
1539
+ ],
1540
+ "onDelete": "no action",
1541
+ "onUpdate": "no action"
1542
+ },
1543
+ "junior_conversations_root_conversation_id_junior_conversations_conversation_id_fk": {
1544
+ "name": "junior_conversations_root_conversation_id_junior_conversations_conversation_id_fk",
1545
+ "tableFrom": "junior_conversations",
1546
+ "tableTo": "junior_conversations",
1547
+ "columnsFrom": [
1548
+ "root_conversation_id"
1549
+ ],
1550
+ "columnsTo": [
1551
+ "conversation_id"
1552
+ ],
1553
+ "onDelete": "no action",
1554
+ "onUpdate": "no action"
1555
+ }
1556
+ },
1557
+ "compositePrimaryKeys": {},
1558
+ "uniqueConstraints": {},
1559
+ "policies": {},
1560
+ "checkConstraints": {},
1561
+ "isRLSEnabled": false
1562
+ },
1563
+ "public.junior_destinations": {
1564
+ "name": "junior_destinations",
1565
+ "schema": "",
1566
+ "columns": {
1567
+ "id": {
1568
+ "name": "id",
1569
+ "type": "text",
1570
+ "primaryKey": true,
1571
+ "notNull": true
1572
+ },
1573
+ "provider": {
1574
+ "name": "provider",
1575
+ "type": "text",
1576
+ "primaryKey": false,
1577
+ "notNull": true
1578
+ },
1579
+ "provider_tenant_id": {
1580
+ "name": "provider_tenant_id",
1581
+ "type": "text",
1582
+ "primaryKey": false,
1583
+ "notNull": true,
1584
+ "default": "''"
1585
+ },
1586
+ "provider_destination_id": {
1587
+ "name": "provider_destination_id",
1588
+ "type": "text",
1589
+ "primaryKey": false,
1590
+ "notNull": true
1591
+ },
1592
+ "kind": {
1593
+ "name": "kind",
1594
+ "type": "text",
1595
+ "primaryKey": false,
1596
+ "notNull": true
1597
+ },
1598
+ "parent_destination_id": {
1599
+ "name": "parent_destination_id",
1600
+ "type": "text",
1601
+ "primaryKey": false,
1602
+ "notNull": false
1603
+ },
1604
+ "display_name": {
1605
+ "name": "display_name",
1606
+ "type": "text",
1607
+ "primaryKey": false,
1608
+ "notNull": false
1609
+ },
1610
+ "visibility": {
1611
+ "name": "visibility",
1612
+ "type": "text",
1613
+ "primaryKey": false,
1614
+ "notNull": true,
1615
+ "default": "'unknown'"
1616
+ },
1617
+ "metadata_json": {
1618
+ "name": "metadata_json",
1619
+ "type": "jsonb",
1620
+ "primaryKey": false,
1621
+ "notNull": false
1622
+ },
1623
+ "created_at": {
1624
+ "name": "created_at",
1625
+ "type": "timestamp with time zone",
1626
+ "primaryKey": false,
1627
+ "notNull": true
1628
+ },
1629
+ "updated_at": {
1630
+ "name": "updated_at",
1631
+ "type": "timestamp with time zone",
1632
+ "primaryKey": false,
1633
+ "notNull": true
1634
+ }
1635
+ },
1636
+ "indexes": {
1637
+ "junior_destinations_provider_destination_uidx": {
1638
+ "name": "junior_destinations_provider_destination_uidx",
1639
+ "columns": [
1640
+ {
1641
+ "expression": "provider",
1642
+ "isExpression": false,
1643
+ "asc": true,
1644
+ "nulls": "last"
1645
+ },
1646
+ {
1647
+ "expression": "provider_tenant_id",
1648
+ "isExpression": false,
1649
+ "asc": true,
1650
+ "nulls": "last"
1651
+ },
1652
+ {
1653
+ "expression": "provider_destination_id",
1654
+ "isExpression": false,
1655
+ "asc": true,
1656
+ "nulls": "last"
1657
+ }
1658
+ ],
1659
+ "isUnique": true,
1660
+ "concurrently": false,
1661
+ "method": "btree",
1662
+ "with": {}
1663
+ },
1664
+ "junior_destinations_provider_kind_idx": {
1665
+ "name": "junior_destinations_provider_kind_idx",
1666
+ "columns": [
1667
+ {
1668
+ "expression": "provider",
1669
+ "isExpression": false,
1670
+ "asc": true,
1671
+ "nulls": "last"
1672
+ },
1673
+ {
1674
+ "expression": "kind",
1675
+ "isExpression": false,
1676
+ "asc": true,
1677
+ "nulls": "last"
1678
+ }
1679
+ ],
1680
+ "isUnique": false,
1681
+ "concurrently": false,
1682
+ "method": "btree",
1683
+ "with": {}
1684
+ }
1685
+ },
1686
+ "foreignKeys": {},
1687
+ "compositePrimaryKeys": {},
1688
+ "uniqueConstraints": {},
1689
+ "policies": {},
1690
+ "checkConstraints": {},
1691
+ "isRLSEnabled": false
1692
+ },
1693
+ "public.junior_event_tasks": {
1694
+ "name": "junior_event_tasks",
1695
+ "schema": "",
1696
+ "columns": {
1697
+ "id": {
1698
+ "name": "id",
1699
+ "type": "text",
1700
+ "primaryKey": true,
1701
+ "notNull": true
1702
+ },
1703
+ "team_id": {
1704
+ "name": "team_id",
1705
+ "type": "text",
1706
+ "primaryKey": false,
1707
+ "notNull": true
1708
+ },
1709
+ "namespace": {
1710
+ "name": "namespace",
1711
+ "type": "text",
1712
+ "primaryKey": false,
1713
+ "notNull": true
1714
+ },
1715
+ "identifier": {
1716
+ "name": "identifier",
1717
+ "type": "text",
1718
+ "primaryKey": false,
1719
+ "notNull": true
1720
+ },
1721
+ "created_at_ms": {
1722
+ "name": "created_at_ms",
1723
+ "type": "bigint",
1724
+ "primaryKey": false,
1725
+ "notNull": true
1726
+ },
1727
+ "title": {
1728
+ "name": "title",
1729
+ "type": "text",
1730
+ "primaryKey": false,
1731
+ "notNull": false
1732
+ },
1733
+ "task_json": {
1734
+ "name": "task_json",
1735
+ "type": "jsonb",
1736
+ "primaryKey": false,
1737
+ "notNull": true
1738
+ }
1739
+ },
1740
+ "indexes": {
1741
+ "junior_event_tasks_team_idx": {
1742
+ "name": "junior_event_tasks_team_idx",
1743
+ "columns": [
1744
+ {
1745
+ "expression": "team_id",
1746
+ "isExpression": false,
1747
+ "asc": true,
1748
+ "nulls": "last"
1749
+ },
1750
+ {
1751
+ "expression": "created_at_ms",
1752
+ "isExpression": false,
1753
+ "asc": true,
1754
+ "nulls": "last"
1755
+ },
1756
+ {
1757
+ "expression": "id",
1758
+ "isExpression": false,
1759
+ "asc": true,
1760
+ "nulls": "last"
1761
+ }
1762
+ ],
1763
+ "isUnique": false,
1764
+ "concurrently": false,
1765
+ "method": "btree",
1766
+ "with": {}
1767
+ },
1768
+ "junior_event_tasks_match_idx": {
1769
+ "name": "junior_event_tasks_match_idx",
1770
+ "columns": [
1771
+ {
1772
+ "expression": "namespace",
1773
+ "isExpression": false,
1774
+ "asc": true,
1775
+ "nulls": "last"
1776
+ },
1777
+ {
1778
+ "expression": "identifier",
1779
+ "isExpression": false,
1780
+ "asc": true,
1781
+ "nulls": "last"
1782
+ },
1783
+ {
1784
+ "expression": "created_at_ms",
1785
+ "isExpression": false,
1786
+ "asc": true,
1787
+ "nulls": "last"
1788
+ },
1789
+ {
1790
+ "expression": "id",
1791
+ "isExpression": false,
1792
+ "asc": true,
1793
+ "nulls": "last"
1794
+ }
1795
+ ],
1796
+ "isUnique": false,
1797
+ "concurrently": false,
1798
+ "method": "btree",
1799
+ "with": {}
1800
+ }
1801
+ },
1802
+ "foreignKeys": {},
1803
+ "compositePrimaryKeys": {},
1804
+ "uniqueConstraints": {},
1805
+ "policies": {},
1806
+ "checkConstraints": {},
1807
+ "isRLSEnabled": false
1808
+ },
1809
+ "public.junior_identities": {
1810
+ "name": "junior_identities",
1811
+ "schema": "",
1812
+ "columns": {
1813
+ "id": {
1814
+ "name": "id",
1815
+ "type": "text",
1816
+ "primaryKey": true,
1817
+ "notNull": true
1818
+ },
1819
+ "kind": {
1820
+ "name": "kind",
1821
+ "type": "text",
1822
+ "primaryKey": false,
1823
+ "notNull": true
1824
+ },
1825
+ "provider": {
1826
+ "name": "provider",
1827
+ "type": "text",
1828
+ "primaryKey": false,
1829
+ "notNull": true
1830
+ },
1831
+ "provider_tenant_id": {
1832
+ "name": "provider_tenant_id",
1833
+ "type": "text",
1834
+ "primaryKey": false,
1835
+ "notNull": true,
1836
+ "default": "''"
1837
+ },
1838
+ "provider_subject_id": {
1839
+ "name": "provider_subject_id",
1840
+ "type": "text",
1841
+ "primaryKey": false,
1842
+ "notNull": true
1843
+ },
1844
+ "display_name": {
1845
+ "name": "display_name",
1846
+ "type": "text",
1847
+ "primaryKey": false,
1848
+ "notNull": false
1849
+ },
1850
+ "handle": {
1851
+ "name": "handle",
1852
+ "type": "text",
1853
+ "primaryKey": false,
1854
+ "notNull": false
1855
+ },
1856
+ "email": {
1857
+ "name": "email",
1858
+ "type": "text",
1859
+ "primaryKey": false,
1860
+ "notNull": false
1861
+ },
1862
+ "avatar_url": {
1863
+ "name": "avatar_url",
1864
+ "type": "text",
1865
+ "primaryKey": false,
1866
+ "notNull": false
1867
+ },
1868
+ "metadata_json": {
1869
+ "name": "metadata_json",
1870
+ "type": "jsonb",
1871
+ "primaryKey": false,
1872
+ "notNull": false
1873
+ },
1874
+ "created_at": {
1875
+ "name": "created_at",
1876
+ "type": "timestamp with time zone",
1877
+ "primaryKey": false,
1878
+ "notNull": true
1879
+ },
1880
+ "updated_at": {
1881
+ "name": "updated_at",
1882
+ "type": "timestamp with time zone",
1883
+ "primaryKey": false,
1884
+ "notNull": true
1885
+ },
1886
+ "user_id": {
1887
+ "name": "user_id",
1888
+ "type": "text",
1889
+ "primaryKey": false,
1890
+ "notNull": false
1891
+ },
1892
+ "email_normalized": {
1893
+ "name": "email_normalized",
1894
+ "type": "text",
1895
+ "primaryKey": false,
1896
+ "notNull": false
1897
+ },
1898
+ "email_verified": {
1899
+ "name": "email_verified",
1900
+ "type": "boolean",
1901
+ "primaryKey": false,
1902
+ "notNull": true,
1903
+ "default": false
1904
+ }
1905
+ },
1906
+ "indexes": {
1907
+ "junior_identities_provider_subject_uidx": {
1908
+ "name": "junior_identities_provider_subject_uidx",
1909
+ "columns": [
1910
+ {
1911
+ "expression": "provider",
1912
+ "isExpression": false,
1913
+ "asc": true,
1914
+ "nulls": "last"
1915
+ },
1916
+ {
1917
+ "expression": "provider_tenant_id",
1918
+ "isExpression": false,
1919
+ "asc": true,
1920
+ "nulls": "last"
1921
+ },
1922
+ {
1923
+ "expression": "provider_subject_id",
1924
+ "isExpression": false,
1925
+ "asc": true,
1926
+ "nulls": "last"
1927
+ }
1928
+ ],
1929
+ "isUnique": true,
1930
+ "concurrently": false,
1931
+ "method": "btree",
1932
+ "with": {}
1933
+ },
1934
+ "junior_identities_user_idx": {
1935
+ "name": "junior_identities_user_idx",
1936
+ "columns": [
1937
+ {
1938
+ "expression": "user_id",
1939
+ "isExpression": false,
1940
+ "asc": true,
1941
+ "nulls": "last"
1942
+ }
1943
+ ],
1944
+ "isUnique": false,
1945
+ "concurrently": false,
1946
+ "method": "btree",
1947
+ "with": {}
1948
+ },
1949
+ "junior_identities_verified_email_idx": {
1950
+ "name": "junior_identities_verified_email_idx",
1951
+ "columns": [
1952
+ {
1953
+ "expression": "email_normalized",
1954
+ "isExpression": false,
1955
+ "asc": true,
1956
+ "nulls": "last"
1957
+ }
1958
+ ],
1959
+ "isUnique": false,
1960
+ "where": "\"junior_identities\".\"email_verified\" = true AND \"junior_identities\".\"email_normalized\" IS NOT NULL",
1961
+ "concurrently": false,
1962
+ "method": "btree",
1963
+ "with": {}
1964
+ },
1965
+ "junior_identities_kind_provider_idx": {
1966
+ "name": "junior_identities_kind_provider_idx",
1967
+ "columns": [
1968
+ {
1969
+ "expression": "kind",
1970
+ "isExpression": false,
1971
+ "asc": true,
1972
+ "nulls": "last"
1973
+ },
1974
+ {
1975
+ "expression": "provider",
1976
+ "isExpression": false,
1977
+ "asc": true,
1978
+ "nulls": "last"
1979
+ }
1980
+ ],
1981
+ "isUnique": false,
1982
+ "concurrently": false,
1983
+ "method": "btree",
1984
+ "with": {}
1985
+ }
1986
+ },
1987
+ "foreignKeys": {
1988
+ "junior_identities_user_id_junior_users_id_fk": {
1989
+ "name": "junior_identities_user_id_junior_users_id_fk",
1990
+ "tableFrom": "junior_identities",
1991
+ "tableTo": "junior_users",
1992
+ "columnsFrom": [
1993
+ "user_id"
1994
+ ],
1995
+ "columnsTo": [
1996
+ "id"
1997
+ ],
1998
+ "onDelete": "no action",
1999
+ "onUpdate": "no action"
2000
+ }
2001
+ },
2002
+ "compositePrimaryKeys": {},
2003
+ "uniqueConstraints": {},
2004
+ "policies": {},
2005
+ "checkConstraints": {},
2006
+ "isRLSEnabled": false
2007
+ },
2008
+ "public.junior_location_configurations": {
2009
+ "name": "junior_location_configurations",
2010
+ "schema": "",
2011
+ "columns": {
2012
+ "location_id": {
2013
+ "name": "location_id",
2014
+ "type": "text",
2015
+ "primaryKey": false,
2016
+ "notNull": true
2017
+ },
2018
+ "key": {
2019
+ "name": "key",
2020
+ "type": "text",
2021
+ "primaryKey": false,
2022
+ "notNull": true
2023
+ },
2024
+ "value": {
2025
+ "name": "value",
2026
+ "type": "text",
2027
+ "primaryKey": false,
2028
+ "notNull": true
2029
+ },
2030
+ "updated_at": {
2031
+ "name": "updated_at",
2032
+ "type": "timestamp with time zone",
2033
+ "primaryKey": false,
2034
+ "notNull": true
2035
+ },
2036
+ "updated_by": {
2037
+ "name": "updated_by",
2038
+ "type": "text",
2039
+ "primaryKey": false,
2040
+ "notNull": false
2041
+ },
2042
+ "source": {
2043
+ "name": "source",
2044
+ "type": "text",
2045
+ "primaryKey": false,
2046
+ "notNull": false
2047
+ },
2048
+ "expires_at": {
2049
+ "name": "expires_at",
2050
+ "type": "text",
2051
+ "primaryKey": false,
2052
+ "notNull": false
2053
+ }
2054
+ },
2055
+ "indexes": {},
2056
+ "foreignKeys": {
2057
+ "junior_location_configurations_location_id_junior_destinations_id_fk": {
2058
+ "name": "junior_location_configurations_location_id_junior_destinations_id_fk",
2059
+ "tableFrom": "junior_location_configurations",
2060
+ "tableTo": "junior_destinations",
2061
+ "columnsFrom": [
2062
+ "location_id"
2063
+ ],
2064
+ "columnsTo": [
2065
+ "id"
2066
+ ],
2067
+ "onDelete": "cascade",
2068
+ "onUpdate": "no action"
2069
+ }
2070
+ },
2071
+ "compositePrimaryKeys": {
2072
+ "junior_location_configurations_location_id_key_pk": {
2073
+ "name": "junior_location_configurations_location_id_key_pk",
2074
+ "columns": [
2075
+ "location_id",
2076
+ "key"
2077
+ ]
2078
+ }
2079
+ },
2080
+ "uniqueConstraints": {},
2081
+ "policies": {},
2082
+ "checkConstraints": {},
2083
+ "isRLSEnabled": false
2084
+ },
2085
+ "public.junior_scheduler_runs": {
2086
+ "name": "junior_scheduler_runs",
2087
+ "schema": "",
2088
+ "columns": {
2089
+ "id": {
2090
+ "name": "id",
2091
+ "type": "text",
2092
+ "primaryKey": true,
2093
+ "notNull": true
2094
+ },
2095
+ "task_id": {
2096
+ "name": "task_id",
2097
+ "type": "text",
2098
+ "primaryKey": false,
2099
+ "notNull": true
2100
+ },
2101
+ "status": {
2102
+ "name": "status",
2103
+ "type": "text",
2104
+ "primaryKey": false,
2105
+ "notNull": true
2106
+ },
2107
+ "scheduled_for_ms": {
2108
+ "name": "scheduled_for_ms",
2109
+ "type": "bigint",
2110
+ "primaryKey": false,
2111
+ "notNull": true
2112
+ },
2113
+ "record": {
2114
+ "name": "record",
2115
+ "type": "jsonb",
2116
+ "primaryKey": false,
2117
+ "notNull": true
2118
+ }
2119
+ },
2120
+ "indexes": {
2121
+ "junior_scheduler_runs_task_status_idx": {
2122
+ "name": "junior_scheduler_runs_task_status_idx",
2123
+ "columns": [
2124
+ {
2125
+ "expression": "task_id",
2126
+ "isExpression": false,
2127
+ "asc": true,
2128
+ "nulls": "last"
2129
+ },
2130
+ {
2131
+ "expression": "status",
2132
+ "isExpression": false,
2133
+ "asc": true,
2134
+ "nulls": "last"
2135
+ },
2136
+ {
2137
+ "expression": "scheduled_for_ms",
2138
+ "isExpression": false,
2139
+ "asc": true,
2140
+ "nulls": "last"
2141
+ }
2142
+ ],
2143
+ "isUnique": false,
2144
+ "concurrently": false,
2145
+ "method": "btree",
2146
+ "with": {}
2147
+ },
2148
+ "junior_scheduler_runs_status_idx": {
2149
+ "name": "junior_scheduler_runs_status_idx",
2150
+ "columns": [
2151
+ {
2152
+ "expression": "status",
2153
+ "isExpression": false,
2154
+ "asc": true,
2155
+ "nulls": "last"
2156
+ },
2157
+ {
2158
+ "expression": "scheduled_for_ms",
2159
+ "isExpression": false,
2160
+ "asc": true,
2161
+ "nulls": "last"
2162
+ }
2163
+ ],
2164
+ "isUnique": false,
2165
+ "concurrently": false,
2166
+ "method": "btree",
2167
+ "with": {}
2168
+ }
2169
+ },
2170
+ "foreignKeys": {},
2171
+ "compositePrimaryKeys": {},
2172
+ "uniqueConstraints": {},
2173
+ "policies": {},
2174
+ "checkConstraints": {},
2175
+ "isRLSEnabled": false
2176
+ },
2177
+ "public.junior_scheduler_tasks": {
2178
+ "name": "junior_scheduler_tasks",
2179
+ "schema": "",
2180
+ "columns": {
2181
+ "id": {
2182
+ "name": "id",
2183
+ "type": "text",
2184
+ "primaryKey": true,
2185
+ "notNull": true
2186
+ },
2187
+ "team_id": {
2188
+ "name": "team_id",
2189
+ "type": "text",
2190
+ "primaryKey": false,
2191
+ "notNull": true
2192
+ },
2193
+ "creator_slack_user_id": {
2194
+ "name": "creator_slack_user_id",
2195
+ "type": "text",
2196
+ "primaryKey": false,
2197
+ "notNull": false
2198
+ },
2199
+ "creator_identity_id": {
2200
+ "name": "creator_identity_id",
2201
+ "type": "text",
2202
+ "primaryKey": false,
2203
+ "notNull": false
2204
+ },
2205
+ "status": {
2206
+ "name": "status",
2207
+ "type": "text",
2208
+ "primaryKey": false,
2209
+ "notNull": true
2210
+ },
2211
+ "next_run_at_ms": {
2212
+ "name": "next_run_at_ms",
2213
+ "type": "bigint",
2214
+ "primaryKey": false,
2215
+ "notNull": false
2216
+ },
2217
+ "run_now_at_ms": {
2218
+ "name": "run_now_at_ms",
2219
+ "type": "bigint",
2220
+ "primaryKey": false,
2221
+ "notNull": false
2222
+ },
2223
+ "created_at_ms": {
2224
+ "name": "created_at_ms",
2225
+ "type": "bigint",
2226
+ "primaryKey": false,
2227
+ "notNull": true
2228
+ },
2229
+ "title": {
2230
+ "name": "title",
2231
+ "type": "text",
2232
+ "primaryKey": false,
2233
+ "notNull": false
2234
+ },
2235
+ "record": {
2236
+ "name": "record",
2237
+ "type": "jsonb",
2238
+ "primaryKey": false,
2239
+ "notNull": true
2240
+ }
2241
+ },
2242
+ "indexes": {
2243
+ "junior_scheduler_tasks_creator_idx": {
2244
+ "name": "junior_scheduler_tasks_creator_idx",
2245
+ "columns": [
2246
+ {
2247
+ "expression": "team_id",
2248
+ "isExpression": false,
2249
+ "asc": true,
2250
+ "nulls": "last"
2251
+ },
2252
+ {
2253
+ "expression": "creator_slack_user_id",
2254
+ "isExpression": false,
2255
+ "asc": true,
2256
+ "nulls": "last"
2257
+ },
2258
+ {
2259
+ "expression": "created_at_ms",
2260
+ "isExpression": false,
2261
+ "asc": true,
2262
+ "nulls": "last"
2263
+ },
2264
+ {
2265
+ "expression": "id",
2266
+ "isExpression": false,
2267
+ "asc": true,
2268
+ "nulls": "last"
2269
+ }
2270
+ ],
2271
+ "isUnique": false,
2272
+ "where": "\"junior_scheduler_tasks\".\"status\" <> 'deleted'",
2273
+ "concurrently": false,
2274
+ "method": "btree",
2275
+ "with": {}
2276
+ },
2277
+ "junior_scheduler_tasks_creator_identity_idx": {
2278
+ "name": "junior_scheduler_tasks_creator_identity_idx",
2279
+ "columns": [
2280
+ {
2281
+ "expression": "creator_identity_id",
2282
+ "isExpression": false,
2283
+ "asc": true,
2284
+ "nulls": "last"
2285
+ },
2286
+ {
2287
+ "expression": "created_at_ms",
2288
+ "isExpression": false,
2289
+ "asc": true,
2290
+ "nulls": "last"
2291
+ },
2292
+ {
2293
+ "expression": "id",
2294
+ "isExpression": false,
2295
+ "asc": true,
2296
+ "nulls": "last"
2297
+ }
2298
+ ],
2299
+ "isUnique": false,
2300
+ "where": "\"junior_scheduler_tasks\".\"status\" <> 'deleted' AND \"junior_scheduler_tasks\".\"creator_identity_id\" IS NOT NULL",
2301
+ "concurrently": false,
2302
+ "method": "btree",
2303
+ "with": {}
2304
+ },
2305
+ "junior_scheduler_tasks_team_status_idx": {
2306
+ "name": "junior_scheduler_tasks_team_status_idx",
2307
+ "columns": [
2308
+ {
2309
+ "expression": "team_id",
2310
+ "isExpression": false,
2311
+ "asc": true,
2312
+ "nulls": "last"
2313
+ },
2314
+ {
2315
+ "expression": "created_at_ms",
2316
+ "isExpression": false,
2317
+ "asc": true,
2318
+ "nulls": "last"
2319
+ },
2320
+ {
2321
+ "expression": "id",
2322
+ "isExpression": false,
2323
+ "asc": true,
2324
+ "nulls": "last"
2325
+ }
2326
+ ],
2327
+ "isUnique": false,
2328
+ "where": "\"junior_scheduler_tasks\".\"status\" <> 'deleted'",
2329
+ "concurrently": false,
2330
+ "method": "btree",
2331
+ "with": {}
2332
+ },
2333
+ "junior_scheduler_tasks_run_now_due_idx": {
2334
+ "name": "junior_scheduler_tasks_run_now_due_idx",
2335
+ "columns": [
2336
+ {
2337
+ "expression": "run_now_at_ms",
2338
+ "isExpression": false,
2339
+ "asc": true,
2340
+ "nulls": "last"
2341
+ },
2342
+ {
2343
+ "expression": "created_at_ms",
2344
+ "isExpression": false,
2345
+ "asc": true,
2346
+ "nulls": "last"
2347
+ },
2348
+ {
2349
+ "expression": "id",
2350
+ "isExpression": false,
2351
+ "asc": true,
2352
+ "nulls": "last"
2353
+ }
2354
+ ],
2355
+ "isUnique": false,
2356
+ "where": "\"junior_scheduler_tasks\".\"status\" = 'active' AND \"junior_scheduler_tasks\".\"run_now_at_ms\" IS NOT NULL",
2357
+ "concurrently": false,
2358
+ "method": "btree",
2359
+ "with": {}
2360
+ },
2361
+ "junior_scheduler_tasks_next_run_due_idx": {
2362
+ "name": "junior_scheduler_tasks_next_run_due_idx",
2363
+ "columns": [
2364
+ {
2365
+ "expression": "next_run_at_ms",
2366
+ "isExpression": false,
2367
+ "asc": true,
2368
+ "nulls": "last"
2369
+ },
2370
+ {
2371
+ "expression": "created_at_ms",
2372
+ "isExpression": false,
2373
+ "asc": true,
2374
+ "nulls": "last"
2375
+ },
2376
+ {
2377
+ "expression": "id",
2378
+ "isExpression": false,
2379
+ "asc": true,
2380
+ "nulls": "last"
2381
+ }
2382
+ ],
2383
+ "isUnique": false,
2384
+ "where": "\"junior_scheduler_tasks\".\"status\" = 'active' AND \"junior_scheduler_tasks\".\"next_run_at_ms\" IS NOT NULL",
2385
+ "concurrently": false,
2386
+ "method": "btree",
2387
+ "with": {}
2388
+ }
2389
+ },
2390
+ "foreignKeys": {},
2391
+ "compositePrimaryKeys": {},
2392
+ "uniqueConstraints": {},
2393
+ "policies": {},
2394
+ "checkConstraints": {},
2395
+ "isRLSEnabled": false
2396
+ },
2397
+ "public.junior_snapshots": {
2398
+ "name": "junior_snapshots",
2399
+ "schema": "",
2400
+ "columns": {
2401
+ "id": {
2402
+ "name": "id",
2403
+ "type": "text",
2404
+ "primaryKey": true,
2405
+ "notNull": true
2406
+ },
2407
+ "workspace_id": {
2408
+ "name": "workspace_id",
2409
+ "type": "text",
2410
+ "primaryKey": false,
2411
+ "notNull": true
2412
+ },
2413
+ "profile_hash": {
2414
+ "name": "profile_hash",
2415
+ "type": "text",
2416
+ "primaryKey": false,
2417
+ "notNull": true
2418
+ },
2419
+ "status": {
2420
+ "name": "status",
2421
+ "type": "text",
2422
+ "primaryKey": false,
2423
+ "notNull": true
2424
+ },
2425
+ "snapshot_id": {
2426
+ "name": "snapshot_id",
2427
+ "type": "text",
2428
+ "primaryKey": false,
2429
+ "notNull": false
2430
+ },
2431
+ "build_duration_ms": {
2432
+ "name": "build_duration_ms",
2433
+ "type": "integer",
2434
+ "primaryKey": false,
2435
+ "notNull": false
2436
+ },
2437
+ "generated_at": {
2438
+ "name": "generated_at",
2439
+ "type": "timestamp with time zone",
2440
+ "primaryKey": false,
2441
+ "notNull": false
2442
+ },
2443
+ "build_started_at": {
2444
+ "name": "build_started_at",
2445
+ "type": "timestamp with time zone",
2446
+ "primaryKey": false,
2447
+ "notNull": false
2448
+ },
2449
+ "build_phase": {
2450
+ "name": "build_phase",
2451
+ "type": "text",
2452
+ "primaryKey": false,
2453
+ "notNull": false
2454
+ },
2455
+ "build_sandbox_name": {
2456
+ "name": "build_sandbox_name",
2457
+ "type": "text",
2458
+ "primaryKey": false,
2459
+ "notNull": false
2460
+ },
2461
+ "build_command_id": {
2462
+ "name": "build_command_id",
2463
+ "type": "text",
2464
+ "primaryKey": false,
2465
+ "notNull": false
2466
+ },
2467
+ "build_error": {
2468
+ "name": "build_error",
2469
+ "type": "text",
2470
+ "primaryKey": false,
2471
+ "notNull": false
2472
+ },
2473
+ "created_at": {
2474
+ "name": "created_at",
2475
+ "type": "timestamp with time zone",
2476
+ "primaryKey": false,
2477
+ "notNull": true
2478
+ },
2479
+ "updated_at": {
2480
+ "name": "updated_at",
2481
+ "type": "timestamp with time zone",
2482
+ "primaryKey": false,
2483
+ "notNull": true
2484
+ }
2485
+ },
2486
+ "indexes": {
2487
+ "junior_snapshots_snapshot_id_uidx": {
2488
+ "name": "junior_snapshots_snapshot_id_uidx",
2489
+ "columns": [
2490
+ {
2491
+ "expression": "snapshot_id",
2492
+ "isExpression": false,
2493
+ "asc": true,
2494
+ "nulls": "last"
2495
+ }
2496
+ ],
2497
+ "isUnique": true,
2498
+ "concurrently": false,
2499
+ "method": "btree",
2500
+ "with": {}
2501
+ },
2502
+ "junior_snapshots_workspace_idx": {
2503
+ "name": "junior_snapshots_workspace_idx",
2504
+ "columns": [
2505
+ {
2506
+ "expression": "workspace_id",
2507
+ "isExpression": false,
2508
+ "asc": true,
2509
+ "nulls": "last"
2510
+ }
2511
+ ],
2512
+ "isUnique": false,
2513
+ "concurrently": false,
2514
+ "method": "btree",
2515
+ "with": {}
2516
+ },
2517
+ "junior_snapshots_workspace_profile_status_idx": {
2518
+ "name": "junior_snapshots_workspace_profile_status_idx",
2519
+ "columns": [
2520
+ {
2521
+ "expression": "workspace_id",
2522
+ "isExpression": false,
2523
+ "asc": true,
2524
+ "nulls": "last"
2525
+ },
2526
+ {
2527
+ "expression": "profile_hash",
2528
+ "isExpression": false,
2529
+ "asc": true,
2530
+ "nulls": "last"
2531
+ },
2532
+ {
2533
+ "expression": "status",
2534
+ "isExpression": false,
2535
+ "asc": true,
2536
+ "nulls": "last"
2537
+ }
2538
+ ],
2539
+ "isUnique": false,
2540
+ "concurrently": false,
2541
+ "method": "btree",
2542
+ "with": {}
2543
+ },
2544
+ "junior_snapshots_active_build_uidx": {
2545
+ "name": "junior_snapshots_active_build_uidx",
2546
+ "columns": [
2547
+ {
2548
+ "expression": "workspace_id",
2549
+ "isExpression": false,
2550
+ "asc": true,
2551
+ "nulls": "last"
2552
+ },
2553
+ {
2554
+ "expression": "profile_hash",
2555
+ "isExpression": false,
2556
+ "asc": true,
2557
+ "nulls": "last"
2558
+ }
2559
+ ],
2560
+ "isUnique": true,
2561
+ "where": "\"junior_snapshots\".\"status\" = 'building'",
2562
+ "concurrently": false,
2563
+ "method": "btree",
2564
+ "with": {}
2565
+ },
2566
+ "junior_snapshots_workspace_status_idx": {
2567
+ "name": "junior_snapshots_workspace_status_idx",
2568
+ "columns": [
2569
+ {
2570
+ "expression": "workspace_id",
2571
+ "isExpression": false,
2572
+ "asc": true,
2573
+ "nulls": "last"
2574
+ },
2575
+ {
2576
+ "expression": "status",
2577
+ "isExpression": false,
2578
+ "asc": true,
2579
+ "nulls": "last"
2580
+ }
2581
+ ],
2582
+ "isUnique": false,
2583
+ "concurrently": false,
2584
+ "method": "btree",
2585
+ "with": {}
2586
+ }
2587
+ },
2588
+ "foreignKeys": {
2589
+ "junior_snapshots_workspace_id_junior_workspaces_id_fk": {
2590
+ "name": "junior_snapshots_workspace_id_junior_workspaces_id_fk",
2591
+ "tableFrom": "junior_snapshots",
2592
+ "tableTo": "junior_workspaces",
2593
+ "columnsFrom": [
2594
+ "workspace_id"
2595
+ ],
2596
+ "columnsTo": [
2597
+ "id"
2598
+ ],
2599
+ "onDelete": "cascade",
2600
+ "onUpdate": "no action"
2601
+ }
2602
+ },
2603
+ "compositePrimaryKeys": {},
2604
+ "uniqueConstraints": {},
2605
+ "policies": {},
2606
+ "checkConstraints": {
2607
+ "junior_snapshots_status_check": {
2608
+ "name": "junior_snapshots_status_check",
2609
+ "value": "\"junior_snapshots\".\"status\" in ('building', 'failed', 'ready')"
2610
+ },
2611
+ "junior_snapshots_build_phase_check": {
2612
+ "name": "junior_snapshots_build_phase_check",
2613
+ "value": "\"junior_snapshots\".\"build_phase\" is null or \"junior_snapshots\".\"build_phase\" in ('created', 'dependencies_installed', 'repositories_prepared')"
2614
+ },
2615
+ "junior_snapshots_ready_fields_check": {
2616
+ "name": "junior_snapshots_ready_fields_check",
2617
+ "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)"
2618
+ },
2619
+ "junior_snapshots_build_fields_check": {
2620
+ "name": "junior_snapshots_build_fields_check",
2621
+ "value": "\"junior_snapshots\".\"status\" = 'ready' or (\"junior_snapshots\".\"build_started_at\" is not null and \"junior_snapshots\".\"build_phase\" is not null)"
2622
+ },
2623
+ "junior_snapshots_build_duration_check": {
2624
+ "name": "junior_snapshots_build_duration_check",
2625
+ "value": "\"junior_snapshots\".\"build_duration_ms\" is null or \"junior_snapshots\".\"build_duration_ms\" >= 0"
2626
+ }
2627
+ },
2628
+ "isRLSEnabled": false
2629
+ },
2630
+ "public.junior_stats": {
2631
+ "name": "junior_stats",
2632
+ "schema": "",
2633
+ "columns": {
2634
+ "date": {
2635
+ "name": "date",
2636
+ "type": "date",
2637
+ "primaryKey": false,
2638
+ "notNull": true
2639
+ },
2640
+ "namespace": {
2641
+ "name": "namespace",
2642
+ "type": "text",
2643
+ "primaryKey": false,
2644
+ "notNull": true
2645
+ },
2646
+ "metric": {
2647
+ "name": "metric",
2648
+ "type": "text",
2649
+ "primaryKey": false,
2650
+ "notNull": true
2651
+ },
2652
+ "name": {
2653
+ "name": "name",
2654
+ "type": "text",
2655
+ "primaryKey": false,
2656
+ "notNull": true
2657
+ },
2658
+ "count": {
2659
+ "name": "count",
2660
+ "type": "integer",
2661
+ "primaryKey": false,
2662
+ "notNull": true,
2663
+ "default": 0
2664
+ }
2665
+ },
2666
+ "indexes": {},
2667
+ "foreignKeys": {},
2668
+ "compositePrimaryKeys": {
2669
+ "junior_stats_date_namespace_metric_name_pk": {
2670
+ "name": "junior_stats_date_namespace_metric_name_pk",
2671
+ "columns": [
2672
+ "date",
2673
+ "namespace",
2674
+ "metric",
2675
+ "name"
2676
+ ]
2677
+ }
2678
+ },
2679
+ "uniqueConstraints": {},
2680
+ "policies": {},
2681
+ "checkConstraints": {},
2682
+ "isRLSEnabled": false
2683
+ },
2684
+ "public.junior_task_executions": {
2685
+ "name": "junior_task_executions",
2686
+ "schema": "",
2687
+ "columns": {
2688
+ "execution_id": {
2689
+ "name": "execution_id",
2690
+ "type": "text",
2691
+ "primaryKey": false,
2692
+ "notNull": true
2693
+ },
2694
+ "kind": {
2695
+ "name": "kind",
2696
+ "type": "text",
2697
+ "primaryKey": false,
2698
+ "notNull": true
2699
+ },
2700
+ "namespace": {
2701
+ "name": "namespace",
2702
+ "type": "text",
2703
+ "primaryKey": false,
2704
+ "notNull": true
2705
+ },
2706
+ "task_id": {
2707
+ "name": "task_id",
2708
+ "type": "text",
2709
+ "primaryKey": false,
2710
+ "notNull": true
2711
+ },
2712
+ "conversation_id": {
2713
+ "name": "conversation_id",
2714
+ "type": "text",
2715
+ "primaryKey": false,
2716
+ "notNull": false
2717
+ },
2718
+ "executed_at_ms": {
2719
+ "name": "executed_at_ms",
2720
+ "type": "bigint",
2721
+ "primaryKey": false,
2722
+ "notNull": true
2723
+ },
2724
+ "status": {
2725
+ "name": "status",
2726
+ "type": "text",
2727
+ "primaryKey": false,
2728
+ "notNull": true
2729
+ }
2730
+ },
2731
+ "indexes": {
2732
+ "junior_task_executions_task_time_idx": {
2733
+ "name": "junior_task_executions_task_time_idx",
2734
+ "columns": [
2735
+ {
2736
+ "expression": "kind",
2737
+ "isExpression": false,
2738
+ "asc": true,
2739
+ "nulls": "last"
2740
+ },
2741
+ {
2742
+ "expression": "namespace",
2743
+ "isExpression": false,
2744
+ "asc": true,
2745
+ "nulls": "last"
2746
+ },
2747
+ {
2748
+ "expression": "task_id",
2749
+ "isExpression": false,
2750
+ "asc": true,
2751
+ "nulls": "last"
2752
+ },
2753
+ {
2754
+ "expression": "executed_at_ms",
2755
+ "isExpression": false,
2756
+ "asc": true,
2757
+ "nulls": "last"
2758
+ }
2759
+ ],
2760
+ "isUnique": false,
2761
+ "concurrently": false,
2762
+ "method": "btree",
2763
+ "with": {}
2764
+ },
2765
+ "junior_task_executions_time_kind_idx": {
2766
+ "name": "junior_task_executions_time_kind_idx",
2767
+ "columns": [
2768
+ {
2769
+ "expression": "executed_at_ms",
2770
+ "isExpression": false,
2771
+ "asc": true,
2772
+ "nulls": "last"
2773
+ },
2774
+ {
2775
+ "expression": "kind",
2776
+ "isExpression": false,
2777
+ "asc": true,
2778
+ "nulls": "last"
2779
+ }
2780
+ ],
2781
+ "isUnique": false,
2782
+ "concurrently": false,
2783
+ "method": "btree",
2784
+ "with": {}
2785
+ },
2786
+ "junior_task_executions_conversation_time_idx": {
2787
+ "name": "junior_task_executions_conversation_time_idx",
2788
+ "columns": [
2789
+ {
2790
+ "expression": "conversation_id",
2791
+ "isExpression": false,
2792
+ "asc": true,
2793
+ "nulls": "last"
2794
+ },
2795
+ {
2796
+ "expression": "executed_at_ms",
2797
+ "isExpression": false,
2798
+ "asc": true,
2799
+ "nulls": "last"
2800
+ }
2801
+ ],
2802
+ "isUnique": false,
2803
+ "concurrently": false,
2804
+ "method": "btree",
2805
+ "with": {}
2806
+ }
2807
+ },
2808
+ "foreignKeys": {
2809
+ "junior_task_executions_conversation_id_junior_conversations_conversation_id_fk": {
2810
+ "name": "junior_task_executions_conversation_id_junior_conversations_conversation_id_fk",
2811
+ "tableFrom": "junior_task_executions",
2812
+ "tableTo": "junior_conversations",
2813
+ "columnsFrom": [
2814
+ "conversation_id"
2815
+ ],
2816
+ "columnsTo": [
2817
+ "conversation_id"
2818
+ ],
2819
+ "onDelete": "no action",
2820
+ "onUpdate": "no action"
2821
+ }
2822
+ },
2823
+ "compositePrimaryKeys": {
2824
+ "junior_task_executions_kind_namespace_execution_id_pk": {
2825
+ "name": "junior_task_executions_kind_namespace_execution_id_pk",
2826
+ "columns": [
2827
+ "kind",
2828
+ "namespace",
2829
+ "execution_id"
2830
+ ]
2831
+ }
2832
+ },
2833
+ "uniqueConstraints": {},
2834
+ "policies": {},
2835
+ "checkConstraints": {
2836
+ "junior_task_executions_kind_check": {
2837
+ "name": "junior_task_executions_kind_check",
2838
+ "value": "\"junior_task_executions\".\"kind\" in ('scheduled', 'event')"
2839
+ },
2840
+ "junior_task_executions_status_check": {
2841
+ "name": "junior_task_executions_status_check",
2842
+ "value": "\"junior_task_executions\".\"status\" in ('blocked', 'completed', 'failed')"
2843
+ }
2844
+ },
2845
+ "isRLSEnabled": false
2846
+ },
2847
+ "public.junior_users": {
2848
+ "name": "junior_users",
2849
+ "schema": "",
2850
+ "columns": {
2851
+ "id": {
2852
+ "name": "id",
2853
+ "type": "text",
2854
+ "primaryKey": true,
2855
+ "notNull": true
2856
+ },
2857
+ "primary_email": {
2858
+ "name": "primary_email",
2859
+ "type": "text",
2860
+ "primaryKey": false,
2861
+ "notNull": true
2862
+ },
2863
+ "primary_email_normalized": {
2864
+ "name": "primary_email_normalized",
2865
+ "type": "text",
2866
+ "primaryKey": false,
2867
+ "notNull": true
2868
+ },
2869
+ "display_name": {
2870
+ "name": "display_name",
2871
+ "type": "text",
2872
+ "primaryKey": false,
2873
+ "notNull": false
2874
+ },
2875
+ "created_at": {
2876
+ "name": "created_at",
2877
+ "type": "timestamp with time zone",
2878
+ "primaryKey": false,
2879
+ "notNull": true
2880
+ },
2881
+ "updated_at": {
2882
+ "name": "updated_at",
2883
+ "type": "timestamp with time zone",
2884
+ "primaryKey": false,
2885
+ "notNull": true
2886
+ }
2887
+ },
2888
+ "indexes": {
2889
+ "junior_users_primary_email_normalized_uidx": {
2890
+ "name": "junior_users_primary_email_normalized_uidx",
2891
+ "columns": [
2892
+ {
2893
+ "expression": "primary_email_normalized",
2894
+ "isExpression": false,
2895
+ "asc": true,
2896
+ "nulls": "last"
2897
+ }
2898
+ ],
2899
+ "isUnique": true,
2900
+ "concurrently": false,
2901
+ "method": "btree",
2902
+ "with": {}
2903
+ }
2904
+ },
2905
+ "foreignKeys": {},
2906
+ "compositePrimaryKeys": {},
2907
+ "uniqueConstraints": {},
2908
+ "policies": {},
2909
+ "checkConstraints": {},
2910
+ "isRLSEnabled": false
2911
+ },
2912
+ "public.junior_workspace_repos": {
2913
+ "name": "junior_workspace_repos",
2914
+ "schema": "",
2915
+ "columns": {
2916
+ "workspace_id": {
2917
+ "name": "workspace_id",
2918
+ "type": "text",
2919
+ "primaryKey": false,
2920
+ "notNull": true
2921
+ },
2922
+ "provider": {
2923
+ "name": "provider",
2924
+ "type": "text",
2925
+ "primaryKey": false,
2926
+ "notNull": true
2927
+ },
2928
+ "repo": {
2929
+ "name": "repo",
2930
+ "type": "text",
2931
+ "primaryKey": false,
2932
+ "notNull": true
2933
+ }
2934
+ },
2935
+ "indexes": {},
2936
+ "foreignKeys": {
2937
+ "junior_workspace_repos_workspace_id_junior_workspaces_id_fk": {
2938
+ "name": "junior_workspace_repos_workspace_id_junior_workspaces_id_fk",
2939
+ "tableFrom": "junior_workspace_repos",
2940
+ "tableTo": "junior_workspaces",
2941
+ "columnsFrom": [
2942
+ "workspace_id"
2943
+ ],
2944
+ "columnsTo": [
2945
+ "id"
2946
+ ],
2947
+ "onDelete": "cascade",
2948
+ "onUpdate": "no action"
2949
+ }
2950
+ },
2951
+ "compositePrimaryKeys": {
2952
+ "junior_workspace_repos_workspace_id_provider_repo_pk": {
2953
+ "name": "junior_workspace_repos_workspace_id_provider_repo_pk",
2954
+ "columns": [
2955
+ "workspace_id",
2956
+ "provider",
2957
+ "repo"
2958
+ ]
2959
+ }
2960
+ },
2961
+ "uniqueConstraints": {},
2962
+ "policies": {},
2963
+ "checkConstraints": {},
2964
+ "isRLSEnabled": false
2965
+ },
2966
+ "public.junior_workspaces": {
2967
+ "name": "junior_workspaces",
2968
+ "schema": "",
2969
+ "columns": {
2970
+ "id": {
2971
+ "name": "id",
2972
+ "type": "text",
2973
+ "primaryKey": true,
2974
+ "notNull": true
2975
+ },
2976
+ "name": {
2977
+ "name": "name",
2978
+ "type": "text",
2979
+ "primaryKey": false,
2980
+ "notNull": true
2981
+ },
2982
+ "setup_script": {
2983
+ "name": "setup_script",
2984
+ "type": "text",
2985
+ "primaryKey": false,
2986
+ "notNull": true,
2987
+ "default": "''"
2988
+ },
2989
+ "created_at": {
2990
+ "name": "created_at",
2991
+ "type": "timestamp with time zone",
2992
+ "primaryKey": false,
2993
+ "notNull": true
2994
+ },
2995
+ "updated_at": {
2996
+ "name": "updated_at",
2997
+ "type": "timestamp with time zone",
2998
+ "primaryKey": false,
2999
+ "notNull": true
3000
+ }
3001
+ },
3002
+ "indexes": {
3003
+ "junior_workspaces_name_idx": {
3004
+ "name": "junior_workspaces_name_idx",
3005
+ "columns": [
3006
+ {
3007
+ "expression": "name",
3008
+ "isExpression": false,
3009
+ "asc": true,
3010
+ "nulls": "last"
3011
+ }
3012
+ ],
3013
+ "isUnique": true,
3014
+ "concurrently": false,
3015
+ "method": "btree",
3016
+ "with": {}
3017
+ }
3018
+ },
3019
+ "foreignKeys": {},
3020
+ "compositePrimaryKeys": {},
3021
+ "uniqueConstraints": {},
3022
+ "policies": {},
3023
+ "checkConstraints": {},
3024
+ "isRLSEnabled": false
3025
+ }
3026
+ },
3027
+ "enums": {},
3028
+ "schemas": {},
3029
+ "sequences": {},
3030
+ "roles": {},
3031
+ "policies": {},
3032
+ "views": {},
3033
+ "_meta": {
3034
+ "columns": {},
3035
+ "schemas": {},
3036
+ "tables": {}
3037
+ }
3038
+ }