@coffre/db 0.8.2 → 0.10.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 (65) hide show
  1. package/dist/connect.d.ts +1 -1
  2. package/dist/{database-BEnexh-3.d.ts → database-BFnO2b2P.d.ts} +1 -1
  3. package/dist/dialect.d.ts +1 -1
  4. package/dist/grants.d.ts +2 -2
  5. package/dist/hyperdrive.d.ts +1 -1
  6. package/dist/index.d.ts +2 -2
  7. package/dist/log.d.ts +7 -1
  8. package/dist/log.js +11 -1
  9. package/dist/migrations/postgres/0010_handle_places.sql +2 -0
  10. package/dist/migrations/postgres/0011_plain_values.sql +19 -0
  11. package/dist/migrations/postgres/0012_sensitive_values.sql +18 -0
  12. package/dist/migrations/postgres/0013_contributor_role.sql +5 -0
  13. package/dist/migrations/postgres/0014_custom_roles.sql +4 -0
  14. package/dist/migrations/postgres/meta/0010_snapshot.json +2991 -0
  15. package/dist/migrations/postgres/meta/0011_snapshot.json +2997 -0
  16. package/dist/migrations/postgres/meta/0012_snapshot.json +3004 -0
  17. package/dist/migrations/postgres/meta/0013_snapshot.json +3004 -0
  18. package/dist/migrations/postgres/meta/0014_snapshot.json +3000 -0
  19. package/dist/migrations/postgres/meta/_journal.json +35 -0
  20. package/dist/migrations/sqlite/0010_handle_places.sql +2 -0
  21. package/dist/migrations/sqlite/0011_plain_values.sql +14 -0
  22. package/dist/migrations/sqlite/0012_sensitive_values.sql +15 -0
  23. package/dist/migrations/sqlite/0013_contributor_role.sql +28 -0
  24. package/dist/migrations/sqlite/0014_custom_roles.sql +27 -0
  25. package/dist/migrations/sqlite/meta/0010_snapshot.json +2711 -0
  26. package/dist/migrations/sqlite/meta/0011_snapshot.json +2718 -0
  27. package/dist/migrations/sqlite/meta/0012_snapshot.json +2726 -0
  28. package/dist/migrations/sqlite/meta/0013_snapshot.json +2726 -0
  29. package/dist/migrations/sqlite/meta/0014_snapshot.json +2722 -0
  30. package/dist/migrations/sqlite/meta/_journal.json +35 -0
  31. package/dist/portable.d.ts +2 -2
  32. package/dist/{schema-BZRkBJQZ.d.ts → schema-NBVA9q-s.d.ts} +51 -0
  33. package/dist/schema-sqlite.d.ts +55 -0
  34. package/dist/schema-sqlite.js +5 -6
  35. package/dist/schema-version.d.ts +1 -1
  36. package/dist/schema-version.js +70 -0
  37. package/dist/schema.d.ts +1 -1
  38. package/dist/schema.js +5 -7
  39. package/package.json +2 -2
  40. package/src/grants.ts +3 -2
  41. package/src/log.ts +16 -0
  42. package/src/migrations/postgres/0010_handle_places.sql +2 -0
  43. package/src/migrations/postgres/0011_plain_values.sql +19 -0
  44. package/src/migrations/postgres/0012_sensitive_values.sql +18 -0
  45. package/src/migrations/postgres/0013_contributor_role.sql +5 -0
  46. package/src/migrations/postgres/0014_custom_roles.sql +4 -0
  47. package/src/migrations/postgres/meta/0010_snapshot.json +2991 -0
  48. package/src/migrations/postgres/meta/0011_snapshot.json +2997 -0
  49. package/src/migrations/postgres/meta/0012_snapshot.json +3004 -0
  50. package/src/migrations/postgres/meta/0013_snapshot.json +3004 -0
  51. package/src/migrations/postgres/meta/0014_snapshot.json +3000 -0
  52. package/src/migrations/postgres/meta/_journal.json +35 -0
  53. package/src/migrations/sqlite/0010_handle_places.sql +2 -0
  54. package/src/migrations/sqlite/0011_plain_values.sql +14 -0
  55. package/src/migrations/sqlite/0012_sensitive_values.sql +15 -0
  56. package/src/migrations/sqlite/0013_contributor_role.sql +28 -0
  57. package/src/migrations/sqlite/0014_custom_roles.sql +27 -0
  58. package/src/migrations/sqlite/meta/0010_snapshot.json +2711 -0
  59. package/src/migrations/sqlite/meta/0011_snapshot.json +2718 -0
  60. package/src/migrations/sqlite/meta/0012_snapshot.json +2726 -0
  61. package/src/migrations/sqlite/meta/0013_snapshot.json +2726 -0
  62. package/src/migrations/sqlite/meta/0014_snapshot.json +2722 -0
  63. package/src/migrations/sqlite/meta/_journal.json +35 -0
  64. package/src/schema.sqlite.ts +15 -9
  65. package/src/schema.ts +15 -10
@@ -0,0 +1,2718 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "e6685d65-1e2e-4edd-b768-c129b5f77dc2",
5
+ "prevId": "751c081b-c903-47a2-97fa-ebb29729f1f6",
6
+ "tables": {
7
+ "audit_chain_head": {
8
+ "name": "audit_chain_head",
9
+ "columns": {
10
+ "only_row": {
11
+ "name": "only_row",
12
+ "type": "integer",
13
+ "primaryKey": true,
14
+ "notNull": true,
15
+ "autoincrement": false,
16
+ "default": true
17
+ },
18
+ "next_seq": {
19
+ "name": "next_seq",
20
+ "type": "integer",
21
+ "primaryKey": false,
22
+ "notNull": true,
23
+ "autoincrement": false,
24
+ "default": "0"
25
+ },
26
+ "head_hash": {
27
+ "name": "head_hash",
28
+ "type": "blob",
29
+ "primaryKey": false,
30
+ "notNull": true,
31
+ "autoincrement": false
32
+ }
33
+ },
34
+ "indexes": {},
35
+ "foreignKeys": {},
36
+ "compositePrimaryKeys": {},
37
+ "uniqueConstraints": {},
38
+ "checkConstraints": {
39
+ "audit_chain_head_only_row_check": {
40
+ "name": "audit_chain_head_only_row_check",
41
+ "value": "\"audit_chain_head\".\"only_row\""
42
+ },
43
+ "audit_chain_head_next_seq_check": {
44
+ "name": "audit_chain_head_next_seq_check",
45
+ "value": "\"audit_chain_head\".\"next_seq\" >= 0"
46
+ },
47
+ "audit_chain_head_head_hash_check": {
48
+ "name": "audit_chain_head_head_hash_check",
49
+ "value": "octet_length(\"audit_chain_head\".\"head_hash\") = 32"
50
+ }
51
+ }
52
+ },
53
+ "audit_log": {
54
+ "name": "audit_log",
55
+ "columns": {
56
+ "seq": {
57
+ "name": "seq",
58
+ "type": "integer",
59
+ "primaryKey": true,
60
+ "notNull": true,
61
+ "autoincrement": false
62
+ },
63
+ "author": {
64
+ "name": "author",
65
+ "type": "text",
66
+ "primaryKey": false,
67
+ "notNull": true,
68
+ "autoincrement": false
69
+ },
70
+ "key_id": {
71
+ "name": "key_id",
72
+ "type": "text",
73
+ "primaryKey": false,
74
+ "notNull": true,
75
+ "autoincrement": false
76
+ },
77
+ "occurred_at": {
78
+ "name": "occurred_at",
79
+ "type": "integer",
80
+ "primaryKey": false,
81
+ "notNull": true,
82
+ "autoincrement": false
83
+ },
84
+ "actor": {
85
+ "name": "actor",
86
+ "type": "text",
87
+ "primaryKey": false,
88
+ "notNull": true,
89
+ "autoincrement": false
90
+ },
91
+ "action": {
92
+ "name": "action",
93
+ "type": "text",
94
+ "primaryKey": false,
95
+ "notNull": true,
96
+ "autoincrement": false
97
+ },
98
+ "decision": {
99
+ "name": "decision",
100
+ "type": "text",
101
+ "primaryKey": false,
102
+ "notNull": true,
103
+ "autoincrement": false
104
+ },
105
+ "code": {
106
+ "name": "code",
107
+ "type": "text",
108
+ "primaryKey": false,
109
+ "notNull": false,
110
+ "autoincrement": false
111
+ },
112
+ "subject_principal": {
113
+ "name": "subject_principal",
114
+ "type": "text",
115
+ "primaryKey": false,
116
+ "notNull": false,
117
+ "autoincrement": false
118
+ },
119
+ "project_id": {
120
+ "name": "project_id",
121
+ "type": "text",
122
+ "primaryKey": false,
123
+ "notNull": false,
124
+ "autoincrement": false
125
+ },
126
+ "environment_id": {
127
+ "name": "environment_id",
128
+ "type": "text",
129
+ "primaryKey": false,
130
+ "notNull": false,
131
+ "autoincrement": false
132
+ },
133
+ "secret_id": {
134
+ "name": "secret_id",
135
+ "type": "text",
136
+ "primaryKey": false,
137
+ "notNull": false,
138
+ "autoincrement": false
139
+ },
140
+ "secret_version_id": {
141
+ "name": "secret_version_id",
142
+ "type": "text",
143
+ "primaryKey": false,
144
+ "notNull": false,
145
+ "autoincrement": false
146
+ },
147
+ "operation_id": {
148
+ "name": "operation_id",
149
+ "type": "text",
150
+ "primaryKey": false,
151
+ "notNull": false,
152
+ "autoincrement": false
153
+ },
154
+ "request_id": {
155
+ "name": "request_id",
156
+ "type": "text",
157
+ "primaryKey": false,
158
+ "notNull": false,
159
+ "autoincrement": false
160
+ },
161
+ "source_ip": {
162
+ "name": "source_ip",
163
+ "type": "text",
164
+ "primaryKey": false,
165
+ "notNull": false,
166
+ "autoincrement": false
167
+ },
168
+ "related_seq": {
169
+ "name": "related_seq",
170
+ "type": "integer",
171
+ "primaryKey": false,
172
+ "notNull": false,
173
+ "autoincrement": false
174
+ },
175
+ "metadata": {
176
+ "name": "metadata",
177
+ "type": "text",
178
+ "primaryKey": false,
179
+ "notNull": true,
180
+ "autoincrement": false,
181
+ "default": "'{}'"
182
+ },
183
+ "prev_hash": {
184
+ "name": "prev_hash",
185
+ "type": "blob",
186
+ "primaryKey": false,
187
+ "notNull": true,
188
+ "autoincrement": false
189
+ },
190
+ "mac": {
191
+ "name": "mac",
192
+ "type": "blob",
193
+ "primaryKey": false,
194
+ "notNull": true,
195
+ "autoincrement": false
196
+ },
197
+ "hash": {
198
+ "name": "hash",
199
+ "type": "blob",
200
+ "primaryKey": false,
201
+ "notNull": true,
202
+ "autoincrement": false
203
+ }
204
+ },
205
+ "indexes": {
206
+ "audit_log_project_idx": {
207
+ "name": "audit_log_project_idx",
208
+ "columns": [
209
+ "project_id",
210
+ "seq"
211
+ ],
212
+ "isUnique": false
213
+ },
214
+ "audit_log_environment_idx": {
215
+ "name": "audit_log_environment_idx",
216
+ "columns": [
217
+ "environment_id",
218
+ "seq"
219
+ ],
220
+ "isUnique": false
221
+ },
222
+ "audit_log_secret_idx": {
223
+ "name": "audit_log_secret_idx",
224
+ "columns": [
225
+ "secret_id",
226
+ "seq"
227
+ ],
228
+ "isUnique": false
229
+ },
230
+ "audit_log_actor_idx": {
231
+ "name": "audit_log_actor_idx",
232
+ "columns": [
233
+ "actor",
234
+ "seq"
235
+ ],
236
+ "isUnique": false
237
+ },
238
+ "audit_log_operation_idx": {
239
+ "name": "audit_log_operation_idx",
240
+ "columns": [
241
+ "operation_id",
242
+ "seq"
243
+ ],
244
+ "isUnique": false
245
+ },
246
+ "audit_log_action_idx": {
247
+ "name": "audit_log_action_idx",
248
+ "columns": [
249
+ "author",
250
+ "action",
251
+ "seq"
252
+ ],
253
+ "isUnique": false
254
+ },
255
+ "audit_log_releases_idx": {
256
+ "name": "audit_log_releases_idx",
257
+ "columns": [
258
+ "author",
259
+ "actor",
260
+ "action",
261
+ "decision",
262
+ "occurred_at"
263
+ ],
264
+ "isUnique": false
265
+ },
266
+ "audit_log_subject_idx": {
267
+ "name": "audit_log_subject_idx",
268
+ "columns": [
269
+ "author",
270
+ "subject_principal",
271
+ "seq"
272
+ ],
273
+ "isUnique": false
274
+ },
275
+ "audit_log_unbind_idx": {
276
+ "name": "audit_log_unbind_idx",
277
+ "columns": [
278
+ "json_extract(\"metadata\", '$.bindingId')"
279
+ ],
280
+ "isUnique": false,
281
+ "where": "\"audit_log\".\"author\" = 'app' AND \"audit_log\".\"action\" = 'token.unbind' AND \"audit_log\".\"decision\" = 'allow'"
282
+ },
283
+ "audit_log_exchange_idx": {
284
+ "name": "audit_log_exchange_idx",
285
+ "columns": [
286
+ "json_extract(\"metadata\", '$.credentialId')"
287
+ ],
288
+ "isUnique": false,
289
+ "where": "\"audit_log\".\"author\" = 'app' AND \"audit_log\".\"action\" = 'token.exchange' AND \"audit_log\".\"decision\" = 'allow'"
290
+ },
291
+ "audit_log_token_create_idx": {
292
+ "name": "audit_log_token_create_idx",
293
+ "columns": [
294
+ "json_extract(\"metadata\", '$.targetCredentialId')"
295
+ ],
296
+ "isUnique": false,
297
+ "where": "\"audit_log\".\"author\" = 'app' AND \"audit_log\".\"action\" = 'token.create' AND \"audit_log\".\"decision\" = 'allow'"
298
+ },
299
+ "audit_log_reference_end_idx": {
300
+ "name": "audit_log_reference_end_idx",
301
+ "columns": [
302
+ "related_seq"
303
+ ],
304
+ "isUnique": false,
305
+ "where": "\"audit_log\".\"author\" = 'vault' AND \"audit_log\".\"action\" = 'reference.end' AND \"audit_log\".\"decision\" = 'allow'"
306
+ },
307
+ "audit_log_also_project_idx": {
308
+ "name": "audit_log_also_project_idx",
309
+ "columns": [
310
+ "json_extract(\"metadata\", '$.also.projectId')",
311
+ "seq"
312
+ ],
313
+ "isUnique": false,
314
+ "where": "json_extract(\"audit_log\".\"metadata\", '$.also') IS NOT NULL"
315
+ },
316
+ "audit_log_also_environment_idx": {
317
+ "name": "audit_log_also_environment_idx",
318
+ "columns": [
319
+ "json_extract(\"metadata\", '$.also.environmentId')",
320
+ "seq"
321
+ ],
322
+ "isUnique": false,
323
+ "where": "json_extract(\"audit_log\".\"metadata\", '$.also') IS NOT NULL"
324
+ },
325
+ "audit_log_also_secret_idx": {
326
+ "name": "audit_log_also_secret_idx",
327
+ "columns": [
328
+ "json_extract(\"metadata\", '$.also.secretId')",
329
+ "seq"
330
+ ],
331
+ "isUnique": false,
332
+ "where": "json_extract(\"audit_log\".\"metadata\", '$.also') IS NOT NULL"
333
+ }
334
+ },
335
+ "foreignKeys": {
336
+ "audit_log_project_id_fkey": {
337
+ "name": "audit_log_project_id_fkey",
338
+ "tableFrom": "audit_log",
339
+ "tableTo": "projects",
340
+ "columnsFrom": [
341
+ "project_id"
342
+ ],
343
+ "columnsTo": [
344
+ "id"
345
+ ],
346
+ "onDelete": "restrict",
347
+ "onUpdate": "no action"
348
+ },
349
+ "audit_log_environment_id_fkey": {
350
+ "name": "audit_log_environment_id_fkey",
351
+ "tableFrom": "audit_log",
352
+ "tableTo": "environments",
353
+ "columnsFrom": [
354
+ "environment_id"
355
+ ],
356
+ "columnsTo": [
357
+ "id"
358
+ ],
359
+ "onDelete": "restrict",
360
+ "onUpdate": "no action"
361
+ },
362
+ "audit_log_secret_id_fkey": {
363
+ "name": "audit_log_secret_id_fkey",
364
+ "tableFrom": "audit_log",
365
+ "tableTo": "secrets",
366
+ "columnsFrom": [
367
+ "secret_id"
368
+ ],
369
+ "columnsTo": [
370
+ "id"
371
+ ],
372
+ "onDelete": "restrict",
373
+ "onUpdate": "no action"
374
+ },
375
+ "audit_log_secret_version_id_fkey": {
376
+ "name": "audit_log_secret_version_id_fkey",
377
+ "tableFrom": "audit_log",
378
+ "tableTo": "secret_versions",
379
+ "columnsFrom": [
380
+ "secret_version_id"
381
+ ],
382
+ "columnsTo": [
383
+ "id"
384
+ ],
385
+ "onDelete": "restrict",
386
+ "onUpdate": "no action"
387
+ },
388
+ "audit_log_related_seq_fkey": {
389
+ "name": "audit_log_related_seq_fkey",
390
+ "tableFrom": "audit_log",
391
+ "tableTo": "audit_log",
392
+ "columnsFrom": [
393
+ "related_seq"
394
+ ],
395
+ "columnsTo": [
396
+ "seq"
397
+ ],
398
+ "onDelete": "restrict",
399
+ "onUpdate": "no action"
400
+ }
401
+ },
402
+ "compositePrimaryKeys": {},
403
+ "uniqueConstraints": {},
404
+ "checkConstraints": {
405
+ "audit_log_author_check": {
406
+ "name": "audit_log_author_check",
407
+ "value": "\"audit_log\".\"author\" IN ('app', 'vault')"
408
+ },
409
+ "audit_log_actor_check": {
410
+ "name": "audit_log_actor_check",
411
+ "value": "\"audit_log\".\"actor\" GLOB 'user:?*' OR \"audit_log\".\"actor\" GLOB 'token:?*' OR \"audit_log\".\"actor\" GLOB 'system:?*'"
412
+ },
413
+ "audit_log_decision_check": {
414
+ "name": "audit_log_decision_check",
415
+ "value": "\"audit_log\".\"decision\" IN ('allow', 'deny')"
416
+ },
417
+ "audit_log_metadata_check": {
418
+ "name": "audit_log_metadata_check",
419
+ "value": "json_valid(\"audit_log\".\"metadata\")"
420
+ },
421
+ "audit_log_prev_hash_check": {
422
+ "name": "audit_log_prev_hash_check",
423
+ "value": "octet_length(\"audit_log\".\"prev_hash\") = 32"
424
+ },
425
+ "audit_log_mac_check": {
426
+ "name": "audit_log_mac_check",
427
+ "value": "octet_length(\"audit_log\".\"mac\") = 32"
428
+ },
429
+ "audit_log_hash_check": {
430
+ "name": "audit_log_hash_check",
431
+ "value": "octet_length(\"audit_log\".\"hash\") = 32"
432
+ }
433
+ }
434
+ },
435
+ "consumed_tokens": {
436
+ "name": "consumed_tokens",
437
+ "columns": {
438
+ "hash": {
439
+ "name": "hash",
440
+ "type": "blob",
441
+ "primaryKey": true,
442
+ "notNull": true,
443
+ "autoincrement": false
444
+ },
445
+ "consumed_at": {
446
+ "name": "consumed_at",
447
+ "type": "integer",
448
+ "primaryKey": false,
449
+ "notNull": true,
450
+ "autoincrement": false,
451
+ "default": "(CAST(unixepoch('subsec') * 1000 AS INTEGER))"
452
+ }
453
+ },
454
+ "indexes": {},
455
+ "foreignKeys": {},
456
+ "compositePrimaryKeys": {},
457
+ "uniqueConstraints": {},
458
+ "checkConstraints": {
459
+ "consumed_tokens_hash_check": {
460
+ "name": "consumed_tokens_hash_check",
461
+ "value": "octet_length(\"consumed_tokens\".\"hash\") = 32"
462
+ }
463
+ }
464
+ },
465
+ "credentials": {
466
+ "name": "credentials",
467
+ "columns": {
468
+ "id": {
469
+ "name": "id",
470
+ "type": "text",
471
+ "primaryKey": true,
472
+ "notNull": true,
473
+ "autoincrement": false
474
+ },
475
+ "kind": {
476
+ "name": "kind",
477
+ "type": "text",
478
+ "primaryKey": false,
479
+ "notNull": true,
480
+ "autoincrement": false
481
+ },
482
+ "auth_mac": {
483
+ "name": "auth_mac",
484
+ "type": "blob",
485
+ "primaryKey": false,
486
+ "notNull": true,
487
+ "autoincrement": false
488
+ },
489
+ "token_hash": {
490
+ "name": "token_hash",
491
+ "type": "blob",
492
+ "primaryKey": false,
493
+ "notNull": true,
494
+ "autoincrement": false
495
+ },
496
+ "token_hint": {
497
+ "name": "token_hint",
498
+ "type": "text",
499
+ "primaryKey": false,
500
+ "notNull": true,
501
+ "autoincrement": false
502
+ },
503
+ "generation": {
504
+ "name": "generation",
505
+ "type": "integer",
506
+ "primaryKey": false,
507
+ "notNull": true,
508
+ "autoincrement": false
509
+ },
510
+ "principal": {
511
+ "name": "principal",
512
+ "type": "text",
513
+ "primaryKey": false,
514
+ "notNull": true,
515
+ "autoincrement": false
516
+ },
517
+ "identity_id": {
518
+ "name": "identity_id",
519
+ "type": "text",
520
+ "primaryKey": false,
521
+ "notNull": false,
522
+ "autoincrement": false
523
+ },
524
+ "scope": {
525
+ "name": "scope",
526
+ "type": "text",
527
+ "primaryKey": false,
528
+ "notNull": false,
529
+ "autoincrement": false
530
+ },
531
+ "places": {
532
+ "name": "places",
533
+ "type": "text",
534
+ "primaryKey": false,
535
+ "notNull": false,
536
+ "autoincrement": false
537
+ },
538
+ "label": {
539
+ "name": "label",
540
+ "type": "text",
541
+ "primaryKey": false,
542
+ "notNull": false,
543
+ "autoincrement": false
544
+ },
545
+ "created_at": {
546
+ "name": "created_at",
547
+ "type": "integer",
548
+ "primaryKey": false,
549
+ "notNull": true,
550
+ "autoincrement": false,
551
+ "default": "(CAST(unixepoch('subsec') * 1000 AS INTEGER))"
552
+ },
553
+ "created_by": {
554
+ "name": "created_by",
555
+ "type": "text",
556
+ "primaryKey": false,
557
+ "notNull": true,
558
+ "autoincrement": false
559
+ },
560
+ "expires_at": {
561
+ "name": "expires_at",
562
+ "type": "integer",
563
+ "primaryKey": false,
564
+ "notNull": true,
565
+ "autoincrement": false
566
+ },
567
+ "last_used_at": {
568
+ "name": "last_used_at",
569
+ "type": "integer",
570
+ "primaryKey": false,
571
+ "notNull": false,
572
+ "autoincrement": false
573
+ },
574
+ "last_used_ip": {
575
+ "name": "last_used_ip",
576
+ "type": "text",
577
+ "primaryKey": false,
578
+ "notNull": false,
579
+ "autoincrement": false
580
+ },
581
+ "revoked_at": {
582
+ "name": "revoked_at",
583
+ "type": "integer",
584
+ "primaryKey": false,
585
+ "notNull": false,
586
+ "autoincrement": false
587
+ },
588
+ "revoked_by": {
589
+ "name": "revoked_by",
590
+ "type": "text",
591
+ "primaryKey": false,
592
+ "notNull": false,
593
+ "autoincrement": false
594
+ }
595
+ },
596
+ "indexes": {
597
+ "credentials_principal_idx": {
598
+ "name": "credentials_principal_idx",
599
+ "columns": [
600
+ "principal",
601
+ "generation"
602
+ ],
603
+ "isUnique": false
604
+ },
605
+ "credentials_live_idx": {
606
+ "name": "credentials_live_idx",
607
+ "columns": [
608
+ "principal",
609
+ "expires_at"
610
+ ],
611
+ "isUnique": false,
612
+ "where": "\"credentials\".\"revoked_at\" IS NULL"
613
+ },
614
+ "credentials_issued_by_idx": {
615
+ "name": "credentials_issued_by_idx",
616
+ "columns": [
617
+ "principal",
618
+ "created_by",
619
+ "created_at"
620
+ ],
621
+ "isUnique": false
622
+ },
623
+ "credentials_token_hash_key": {
624
+ "name": "credentials_token_hash_key",
625
+ "columns": [
626
+ "token_hash"
627
+ ],
628
+ "isUnique": true
629
+ }
630
+ },
631
+ "foreignKeys": {
632
+ "credentials_principal_fkey": {
633
+ "name": "credentials_principal_fkey",
634
+ "tableFrom": "credentials",
635
+ "tableTo": "vault_members",
636
+ "columnsFrom": [
637
+ "principal"
638
+ ],
639
+ "columnsTo": [
640
+ "principal"
641
+ ],
642
+ "onDelete": "restrict",
643
+ "onUpdate": "no action"
644
+ },
645
+ "credentials_identity_id_fkey": {
646
+ "name": "credentials_identity_id_fkey",
647
+ "tableFrom": "credentials",
648
+ "tableTo": "identities",
649
+ "columnsFrom": [
650
+ "identity_id",
651
+ "principal",
652
+ "generation"
653
+ ],
654
+ "columnsTo": [
655
+ "id",
656
+ "principal",
657
+ "generation"
658
+ ],
659
+ "onDelete": "restrict",
660
+ "onUpdate": "no action"
661
+ }
662
+ },
663
+ "compositePrimaryKeys": {},
664
+ "uniqueConstraints": {},
665
+ "checkConstraints": {
666
+ "credentials_kind_check": {
667
+ "name": "credentials_kind_check",
668
+ "value": "\"credentials\".\"kind\" IN ('browser', 'cli', 'service', 'personal', 'handle')"
669
+ },
670
+ "credentials_principal_check": {
671
+ "name": "credentials_principal_check",
672
+ "value": "\"credentials\".\"principal\" LIKE 'user:%' OR \"credentials\".\"principal\" LIKE 'token:%'"
673
+ },
674
+ "credentials_kind_matches_principal": {
675
+ "name": "credentials_kind_matches_principal",
676
+ "value": "(\"credentials\".\"kind\" = 'service') = (\"credentials\".\"principal\" LIKE 'token:%')"
677
+ },
678
+ "credentials_token_hash_check": {
679
+ "name": "credentials_token_hash_check",
680
+ "value": "octet_length(\"credentials\".\"token_hash\") = 32"
681
+ },
682
+ "credentials_auth_mac_check": {
683
+ "name": "credentials_auth_mac_check",
684
+ "value": "octet_length(\"credentials\".\"auth_mac\") = 32"
685
+ }
686
+ }
687
+ },
688
+ "device_authorizations": {
689
+ "name": "device_authorizations",
690
+ "columns": {
691
+ "id": {
692
+ "name": "id",
693
+ "type": "text",
694
+ "primaryKey": true,
695
+ "notNull": true,
696
+ "autoincrement": false
697
+ },
698
+ "device_code_hash": {
699
+ "name": "device_code_hash",
700
+ "type": "blob",
701
+ "primaryKey": false,
702
+ "notNull": true,
703
+ "autoincrement": false
704
+ },
705
+ "auth_mac": {
706
+ "name": "auth_mac",
707
+ "type": "blob",
708
+ "primaryKey": false,
709
+ "notNull": true,
710
+ "autoincrement": false
711
+ },
712
+ "user_code": {
713
+ "name": "user_code",
714
+ "type": "text",
715
+ "primaryKey": false,
716
+ "notNull": true,
717
+ "autoincrement": false
718
+ },
719
+ "client_label": {
720
+ "name": "client_label",
721
+ "type": "text",
722
+ "primaryKey": false,
723
+ "notNull": false,
724
+ "autoincrement": false
725
+ },
726
+ "client_ip": {
727
+ "name": "client_ip",
728
+ "type": "text",
729
+ "primaryKey": false,
730
+ "notNull": false,
731
+ "autoincrement": false
732
+ },
733
+ "created_at": {
734
+ "name": "created_at",
735
+ "type": "integer",
736
+ "primaryKey": false,
737
+ "notNull": true,
738
+ "autoincrement": false,
739
+ "default": "(CAST(unixepoch('subsec') * 1000 AS INTEGER))"
740
+ },
741
+ "expires_at": {
742
+ "name": "expires_at",
743
+ "type": "integer",
744
+ "primaryKey": false,
745
+ "notNull": true,
746
+ "autoincrement": false
747
+ },
748
+ "decided_at": {
749
+ "name": "decided_at",
750
+ "type": "integer",
751
+ "primaryKey": false,
752
+ "notNull": false,
753
+ "autoincrement": false
754
+ },
755
+ "decision": {
756
+ "name": "decision",
757
+ "type": "text",
758
+ "primaryKey": false,
759
+ "notNull": false,
760
+ "autoincrement": false
761
+ },
762
+ "generation": {
763
+ "name": "generation",
764
+ "type": "integer",
765
+ "primaryKey": false,
766
+ "notNull": true,
767
+ "autoincrement": false,
768
+ "default": 0
769
+ },
770
+ "principal": {
771
+ "name": "principal",
772
+ "type": "text",
773
+ "primaryKey": false,
774
+ "notNull": false,
775
+ "autoincrement": false
776
+ },
777
+ "consumed_at": {
778
+ "name": "consumed_at",
779
+ "type": "integer",
780
+ "primaryKey": false,
781
+ "notNull": false,
782
+ "autoincrement": false
783
+ }
784
+ },
785
+ "indexes": {
786
+ "device_authorizations_device_code_hash_key": {
787
+ "name": "device_authorizations_device_code_hash_key",
788
+ "columns": [
789
+ "device_code_hash"
790
+ ],
791
+ "isUnique": true
792
+ },
793
+ "device_authorizations_user_code_key": {
794
+ "name": "device_authorizations_user_code_key",
795
+ "columns": [
796
+ "user_code"
797
+ ],
798
+ "isUnique": true
799
+ }
800
+ },
801
+ "foreignKeys": {
802
+ "device_authorizations_principal_fkey": {
803
+ "name": "device_authorizations_principal_fkey",
804
+ "tableFrom": "device_authorizations",
805
+ "tableTo": "vault_members",
806
+ "columnsFrom": [
807
+ "principal"
808
+ ],
809
+ "columnsTo": [
810
+ "principal"
811
+ ],
812
+ "onDelete": "restrict",
813
+ "onUpdate": "no action"
814
+ }
815
+ },
816
+ "compositePrimaryKeys": {},
817
+ "uniqueConstraints": {},
818
+ "checkConstraints": {
819
+ "device_authorizations_auth_mac_check": {
820
+ "name": "device_authorizations_auth_mac_check",
821
+ "value": "octet_length(\"device_authorizations\".\"auth_mac\") = 32"
822
+ },
823
+ "device_authorizations_decision_check": {
824
+ "name": "device_authorizations_decision_check",
825
+ "value": "\"device_authorizations\".\"decision\" IS NULL OR \"device_authorizations\".\"decision\" IN ('approved', 'denied')"
826
+ },
827
+ "device_authorizations_approval_names_principal": {
828
+ "name": "device_authorizations_approval_names_principal",
829
+ "value": "(\"device_authorizations\".\"decision\" IS NULL AND \"device_authorizations\".\"decided_at\" IS NULL AND \"device_authorizations\".\"principal\" IS NULL AND \"device_authorizations\".\"generation\" = 0 AND \"device_authorizations\".\"consumed_at\" IS NULL)\n OR (\"device_authorizations\".\"decision\" IS NOT NULL AND \"device_authorizations\".\"decided_at\" IS NOT NULL AND (\n (\"device_authorizations\".\"decision\" = 'denied' AND \"device_authorizations\".\"principal\" IS NULL AND \"device_authorizations\".\"generation\" = 0 AND \"device_authorizations\".\"consumed_at\" IS NULL)\n OR (\"device_authorizations\".\"decision\" = 'approved' AND \"device_authorizations\".\"principal\" IS NOT NULL AND \"device_authorizations\".\"principal\" LIKE 'user:%')\n ))"
830
+ }
831
+ }
832
+ },
833
+ "dismissed_keys": {
834
+ "name": "dismissed_keys",
835
+ "columns": {
836
+ "environment_id": {
837
+ "name": "environment_id",
838
+ "type": "text",
839
+ "primaryKey": false,
840
+ "notNull": true,
841
+ "autoincrement": false
842
+ },
843
+ "key": {
844
+ "name": "key",
845
+ "type": "text",
846
+ "primaryKey": false,
847
+ "notNull": true,
848
+ "autoincrement": false
849
+ },
850
+ "dismissed_at": {
851
+ "name": "dismissed_at",
852
+ "type": "integer",
853
+ "primaryKey": false,
854
+ "notNull": true,
855
+ "autoincrement": false,
856
+ "default": "(CAST(unixepoch('subsec') * 1000 AS INTEGER))"
857
+ },
858
+ "dismissed_by": {
859
+ "name": "dismissed_by",
860
+ "type": "text",
861
+ "primaryKey": false,
862
+ "notNull": true,
863
+ "autoincrement": false
864
+ },
865
+ "restored_at": {
866
+ "name": "restored_at",
867
+ "type": "integer",
868
+ "primaryKey": false,
869
+ "notNull": false,
870
+ "autoincrement": false
871
+ },
872
+ "restored_by": {
873
+ "name": "restored_by",
874
+ "type": "text",
875
+ "primaryKey": false,
876
+ "notNull": false,
877
+ "autoincrement": false
878
+ }
879
+ },
880
+ "indexes": {},
881
+ "foreignKeys": {
882
+ "dismissed_keys_environment_id_fkey": {
883
+ "name": "dismissed_keys_environment_id_fkey",
884
+ "tableFrom": "dismissed_keys",
885
+ "tableTo": "environments",
886
+ "columnsFrom": [
887
+ "environment_id"
888
+ ],
889
+ "columnsTo": [
890
+ "id"
891
+ ],
892
+ "onDelete": "restrict",
893
+ "onUpdate": "no action"
894
+ }
895
+ },
896
+ "compositePrimaryKeys": {
897
+ "dismissed_keys_pkey": {
898
+ "columns": [
899
+ "environment_id",
900
+ "key"
901
+ ],
902
+ "name": "dismissed_keys_pkey"
903
+ }
904
+ },
905
+ "uniqueConstraints": {},
906
+ "checkConstraints": {
907
+ "dismissed_keys_key_check": {
908
+ "name": "dismissed_keys_key_check",
909
+ "value": "length(\"dismissed_keys\".\"key\") BETWEEN 1 AND 128 AND \"dismissed_keys\".\"key\" GLOB '[A-Za-z_]*' AND \"dismissed_keys\".\"key\" NOT GLOB '*[^A-Za-z0-9_]*'"
910
+ }
911
+ }
912
+ },
913
+ "environments": {
914
+ "name": "environments",
915
+ "columns": {
916
+ "id": {
917
+ "name": "id",
918
+ "type": "text",
919
+ "primaryKey": true,
920
+ "notNull": true,
921
+ "autoincrement": false
922
+ },
923
+ "project_id": {
924
+ "name": "project_id",
925
+ "type": "text",
926
+ "primaryKey": false,
927
+ "notNull": true,
928
+ "autoincrement": false
929
+ },
930
+ "slug": {
931
+ "name": "slug",
932
+ "type": "text",
933
+ "primaryKey": false,
934
+ "notNull": true,
935
+ "autoincrement": false
936
+ },
937
+ "name": {
938
+ "name": "name",
939
+ "type": "text",
940
+ "primaryKey": false,
941
+ "notNull": true,
942
+ "autoincrement": false
943
+ },
944
+ "created_at": {
945
+ "name": "created_at",
946
+ "type": "integer",
947
+ "primaryKey": false,
948
+ "notNull": true,
949
+ "autoincrement": false,
950
+ "default": "(CAST(unixepoch('subsec') * 1000 AS INTEGER))"
951
+ },
952
+ "archived_at": {
953
+ "name": "archived_at",
954
+ "type": "integer",
955
+ "primaryKey": false,
956
+ "notNull": false,
957
+ "autoincrement": false
958
+ },
959
+ "parent_id": {
960
+ "name": "parent_id",
961
+ "type": "text",
962
+ "primaryKey": false,
963
+ "notNull": false,
964
+ "autoincrement": false
965
+ },
966
+ "owner": {
967
+ "name": "owner",
968
+ "type": "text",
969
+ "primaryKey": false,
970
+ "notNull": false,
971
+ "autoincrement": false
972
+ }
973
+ },
974
+ "indexes": {
975
+ "environments_parent_id_owner_key": {
976
+ "name": "environments_parent_id_owner_key",
977
+ "columns": [
978
+ "parent_id",
979
+ "owner"
980
+ ],
981
+ "isUnique": true,
982
+ "where": "instr(\"environments\".\"slug\", '~') = 0"
983
+ },
984
+ "environments_parent_idx": {
985
+ "name": "environments_parent_idx",
986
+ "columns": [
987
+ "parent_id"
988
+ ],
989
+ "isUnique": false
990
+ },
991
+ "environments_project_id_slug_key": {
992
+ "name": "environments_project_id_slug_key",
993
+ "columns": [
994
+ "project_id",
995
+ "slug"
996
+ ],
997
+ "isUnique": true
998
+ },
999
+ "environments_project_scoped": {
1000
+ "name": "environments_project_scoped",
1001
+ "columns": [
1002
+ "id",
1003
+ "project_id"
1004
+ ],
1005
+ "isUnique": true
1006
+ }
1007
+ },
1008
+ "foreignKeys": {
1009
+ "environments_project_id_fkey": {
1010
+ "name": "environments_project_id_fkey",
1011
+ "tableFrom": "environments",
1012
+ "tableTo": "projects",
1013
+ "columnsFrom": [
1014
+ "project_id"
1015
+ ],
1016
+ "columnsTo": [
1017
+ "id"
1018
+ ],
1019
+ "onDelete": "restrict",
1020
+ "onUpdate": "no action"
1021
+ },
1022
+ "environments_parent_in_project": {
1023
+ "name": "environments_parent_in_project",
1024
+ "tableFrom": "environments",
1025
+ "tableTo": "environments",
1026
+ "columnsFrom": [
1027
+ "parent_id",
1028
+ "project_id"
1029
+ ],
1030
+ "columnsTo": [
1031
+ "id",
1032
+ "project_id"
1033
+ ],
1034
+ "onDelete": "no action",
1035
+ "onUpdate": "no action"
1036
+ }
1037
+ },
1038
+ "compositePrimaryKeys": {},
1039
+ "uniqueConstraints": {},
1040
+ "checkConstraints": {
1041
+ "environments_slug_check": {
1042
+ "name": "environments_slug_check",
1043
+ "value": "(length(\"environments\".\"slug\") BETWEEN 1 AND 63 AND \"environments\".\"slug\" GLOB '[a-z0-9]*' AND \"environments\".\"slug\" NOT GLOB '*[^a-z0-9-]*') OR (instr(\"environments\".\"slug\", '~') BETWEEN 2 AND 64 AND substr(\"environments\".\"slug\", 1, instr(\"environments\".\"slug\", '~') - 1) GLOB '[a-z0-9]*' AND substr(\"environments\".\"slug\", 1, instr(\"environments\".\"slug\", '~') - 1) NOT GLOB '*[^a-z0-9-]*' AND length(substr(\"environments\".\"slug\", instr(\"environments\".\"slug\", '~') + 1)) BETWEEN 1 AND 40 AND substr(\"environments\".\"slug\", instr(\"environments\".\"slug\", '~') + 1) NOT GLOB '*[^a-z0-9-]*')"
1044
+ },
1045
+ "environments_parent_check": {
1046
+ "name": "environments_parent_check",
1047
+ "value": "\"environments\".\"parent_id\" IS NULL OR \"environments\".\"parent_id\" <> \"environments\".\"id\""
1048
+ },
1049
+ "environments_owner_check": {
1050
+ "name": "environments_owner_check",
1051
+ "value": "\"environments\".\"owner\" IS NULL OR (\"environments\".\"parent_id\" IS NOT NULL AND \"environments\".\"owner\" LIKE 'user:_%')"
1052
+ }
1053
+ }
1054
+ },
1055
+ "identities": {
1056
+ "name": "identities",
1057
+ "columns": {
1058
+ "id": {
1059
+ "name": "id",
1060
+ "type": "text",
1061
+ "primaryKey": true,
1062
+ "notNull": true,
1063
+ "autoincrement": false
1064
+ },
1065
+ "provider": {
1066
+ "name": "provider",
1067
+ "type": "text",
1068
+ "primaryKey": false,
1069
+ "notNull": true,
1070
+ "autoincrement": false
1071
+ },
1072
+ "auth_mac": {
1073
+ "name": "auth_mac",
1074
+ "type": "blob",
1075
+ "primaryKey": false,
1076
+ "notNull": true,
1077
+ "autoincrement": false
1078
+ },
1079
+ "subject": {
1080
+ "name": "subject",
1081
+ "type": "text",
1082
+ "primaryKey": false,
1083
+ "notNull": true,
1084
+ "autoincrement": false
1085
+ },
1086
+ "issuer_hash": {
1087
+ "name": "issuer_hash",
1088
+ "type": "text",
1089
+ "primaryKey": false,
1090
+ "notNull": true,
1091
+ "autoincrement": false
1092
+ },
1093
+ "generation": {
1094
+ "name": "generation",
1095
+ "type": "integer",
1096
+ "primaryKey": false,
1097
+ "notNull": true,
1098
+ "autoincrement": false
1099
+ },
1100
+ "principal": {
1101
+ "name": "principal",
1102
+ "type": "text",
1103
+ "primaryKey": false,
1104
+ "notNull": true,
1105
+ "autoincrement": false
1106
+ },
1107
+ "email": {
1108
+ "name": "email",
1109
+ "type": "text",
1110
+ "primaryKey": false,
1111
+ "notNull": false,
1112
+ "autoincrement": false
1113
+ },
1114
+ "created_at": {
1115
+ "name": "created_at",
1116
+ "type": "integer",
1117
+ "primaryKey": false,
1118
+ "notNull": true,
1119
+ "autoincrement": false,
1120
+ "default": "(CAST(unixepoch('subsec') * 1000 AS INTEGER))"
1121
+ },
1122
+ "created_by": {
1123
+ "name": "created_by",
1124
+ "type": "text",
1125
+ "primaryKey": false,
1126
+ "notNull": true,
1127
+ "autoincrement": false
1128
+ },
1129
+ "last_sign_in_at": {
1130
+ "name": "last_sign_in_at",
1131
+ "type": "integer",
1132
+ "primaryKey": false,
1133
+ "notNull": false,
1134
+ "autoincrement": false
1135
+ },
1136
+ "revoked_at": {
1137
+ "name": "revoked_at",
1138
+ "type": "integer",
1139
+ "primaryKey": false,
1140
+ "notNull": false,
1141
+ "autoincrement": false
1142
+ },
1143
+ "revoked_by": {
1144
+ "name": "revoked_by",
1145
+ "type": "text",
1146
+ "primaryKey": false,
1147
+ "notNull": false,
1148
+ "autoincrement": false
1149
+ },
1150
+ "active_subject": {
1151
+ "name": "active_subject",
1152
+ "type": "text",
1153
+ "primaryKey": false,
1154
+ "notNull": false,
1155
+ "autoincrement": false,
1156
+ "generated": {
1157
+ "as": "(CASE WHEN revoked_at IS NULL THEN subject END)",
1158
+ "type": "stored"
1159
+ }
1160
+ }
1161
+ },
1162
+ "indexes": {
1163
+ "identities_active_subject": {
1164
+ "name": "identities_active_subject",
1165
+ "columns": [
1166
+ "provider",
1167
+ "issuer_hash",
1168
+ "active_subject"
1169
+ ],
1170
+ "isUnique": true
1171
+ },
1172
+ "identities_principal_idx": {
1173
+ "name": "identities_principal_idx",
1174
+ "columns": [
1175
+ "principal",
1176
+ "generation"
1177
+ ],
1178
+ "isUnique": false
1179
+ },
1180
+ "identities_member_generation_key": {
1181
+ "name": "identities_member_generation_key",
1182
+ "columns": [
1183
+ "id",
1184
+ "principal",
1185
+ "generation"
1186
+ ],
1187
+ "isUnique": true
1188
+ }
1189
+ },
1190
+ "foreignKeys": {
1191
+ "identities_principal_fkey": {
1192
+ "name": "identities_principal_fkey",
1193
+ "tableFrom": "identities",
1194
+ "tableTo": "vault_members",
1195
+ "columnsFrom": [
1196
+ "principal"
1197
+ ],
1198
+ "columnsTo": [
1199
+ "principal"
1200
+ ],
1201
+ "onDelete": "restrict",
1202
+ "onUpdate": "no action"
1203
+ }
1204
+ },
1205
+ "compositePrimaryKeys": {},
1206
+ "uniqueConstraints": {},
1207
+ "checkConstraints": {
1208
+ "identities_principal_check": {
1209
+ "name": "identities_principal_check",
1210
+ "value": "\"identities\".\"principal\" LIKE 'user:%'"
1211
+ },
1212
+ "identities_provider_check": {
1213
+ "name": "identities_provider_check",
1214
+ "value": "length(\"identities\".\"provider\") BETWEEN 1 AND 32 AND \"identities\".\"provider\" GLOB '[a-z0-9]*' AND \"identities\".\"provider\" NOT GLOB '*[^a-z0-9-]*'"
1215
+ },
1216
+ "identities_auth_mac_check": {
1217
+ "name": "identities_auth_mac_check",
1218
+ "value": "octet_length(\"identities\".\"auth_mac\") = 32"
1219
+ }
1220
+ }
1221
+ },
1222
+ "mcp_approvals": {
1223
+ "name": "mcp_approvals",
1224
+ "columns": {
1225
+ "id": {
1226
+ "name": "id",
1227
+ "type": "text",
1228
+ "primaryKey": true,
1229
+ "notNull": true,
1230
+ "autoincrement": false
1231
+ },
1232
+ "connection_id": {
1233
+ "name": "connection_id",
1234
+ "type": "text",
1235
+ "primaryKey": false,
1236
+ "notNull": true,
1237
+ "autoincrement": false
1238
+ },
1239
+ "tool": {
1240
+ "name": "tool",
1241
+ "type": "text",
1242
+ "primaryKey": false,
1243
+ "notNull": true,
1244
+ "autoincrement": false
1245
+ },
1246
+ "arguments": {
1247
+ "name": "arguments",
1248
+ "type": "text",
1249
+ "primaryKey": false,
1250
+ "notNull": true,
1251
+ "autoincrement": false
1252
+ },
1253
+ "digest": {
1254
+ "name": "digest",
1255
+ "type": "blob",
1256
+ "primaryKey": false,
1257
+ "notNull": true,
1258
+ "autoincrement": false
1259
+ },
1260
+ "status": {
1261
+ "name": "status",
1262
+ "type": "text",
1263
+ "primaryKey": false,
1264
+ "notNull": true,
1265
+ "autoincrement": false,
1266
+ "default": "'pending'"
1267
+ },
1268
+ "outcome": {
1269
+ "name": "outcome",
1270
+ "type": "text",
1271
+ "primaryKey": false,
1272
+ "notNull": false,
1273
+ "autoincrement": false
1274
+ },
1275
+ "created_at": {
1276
+ "name": "created_at",
1277
+ "type": "integer",
1278
+ "primaryKey": false,
1279
+ "notNull": true,
1280
+ "autoincrement": false,
1281
+ "default": "(CAST(unixepoch('subsec') * 1000 AS INTEGER))"
1282
+ },
1283
+ "expires_at": {
1284
+ "name": "expires_at",
1285
+ "type": "integer",
1286
+ "primaryKey": false,
1287
+ "notNull": true,
1288
+ "autoincrement": false
1289
+ },
1290
+ "decided_at": {
1291
+ "name": "decided_at",
1292
+ "type": "integer",
1293
+ "primaryKey": false,
1294
+ "notNull": false,
1295
+ "autoincrement": false
1296
+ },
1297
+ "reported_at": {
1298
+ "name": "reported_at",
1299
+ "type": "integer",
1300
+ "primaryKey": false,
1301
+ "notNull": false,
1302
+ "autoincrement": false
1303
+ }
1304
+ },
1305
+ "indexes": {
1306
+ "mcp_approvals_open_idx": {
1307
+ "name": "mcp_approvals_open_idx",
1308
+ "columns": [
1309
+ "connection_id",
1310
+ "digest"
1311
+ ],
1312
+ "isUnique": false,
1313
+ "where": "\"mcp_approvals\".\"reported_at\" IS NULL"
1314
+ }
1315
+ },
1316
+ "foreignKeys": {
1317
+ "mcp_approvals_connection_fkey": {
1318
+ "name": "mcp_approvals_connection_fkey",
1319
+ "tableFrom": "mcp_approvals",
1320
+ "tableTo": "mcp_connections",
1321
+ "columnsFrom": [
1322
+ "connection_id"
1323
+ ],
1324
+ "columnsTo": [
1325
+ "id"
1326
+ ],
1327
+ "onDelete": "restrict",
1328
+ "onUpdate": "no action"
1329
+ }
1330
+ },
1331
+ "compositePrimaryKeys": {},
1332
+ "uniqueConstraints": {},
1333
+ "checkConstraints": {
1334
+ "mcp_approvals_status_check": {
1335
+ "name": "mcp_approvals_status_check",
1336
+ "value": "\"mcp_approvals\".\"status\" IN ('pending', 'approved', 'denied', 'cancelled', 'failed')"
1337
+ },
1338
+ "mcp_approvals_digest_check": {
1339
+ "name": "mcp_approvals_digest_check",
1340
+ "value": "octet_length(\"mcp_approvals\".\"digest\") = 32"
1341
+ },
1342
+ "mcp_approvals_arguments_check": {
1343
+ "name": "mcp_approvals_arguments_check",
1344
+ "value": "json_valid(\"mcp_approvals\".\"arguments\")"
1345
+ }
1346
+ }
1347
+ },
1348
+ "mcp_connections": {
1349
+ "name": "mcp_connections",
1350
+ "columns": {
1351
+ "id": {
1352
+ "name": "id",
1353
+ "type": "text",
1354
+ "primaryKey": true,
1355
+ "notNull": true,
1356
+ "autoincrement": false
1357
+ },
1358
+ "auth_mac": {
1359
+ "name": "auth_mac",
1360
+ "type": "blob",
1361
+ "primaryKey": false,
1362
+ "notNull": true,
1363
+ "autoincrement": false
1364
+ },
1365
+ "principal": {
1366
+ "name": "principal",
1367
+ "type": "text",
1368
+ "primaryKey": false,
1369
+ "notNull": true,
1370
+ "autoincrement": false
1371
+ },
1372
+ "generation": {
1373
+ "name": "generation",
1374
+ "type": "integer",
1375
+ "primaryKey": false,
1376
+ "notNull": true,
1377
+ "autoincrement": false
1378
+ },
1379
+ "client_id": {
1380
+ "name": "client_id",
1381
+ "type": "text",
1382
+ "primaryKey": false,
1383
+ "notNull": true,
1384
+ "autoincrement": false
1385
+ },
1386
+ "client_name": {
1387
+ "name": "client_name",
1388
+ "type": "text",
1389
+ "primaryKey": false,
1390
+ "notNull": true,
1391
+ "autoincrement": false
1392
+ },
1393
+ "client_host": {
1394
+ "name": "client_host",
1395
+ "type": "text",
1396
+ "primaryKey": false,
1397
+ "notNull": false,
1398
+ "autoincrement": false
1399
+ },
1400
+ "registration": {
1401
+ "name": "registration",
1402
+ "type": "text",
1403
+ "primaryKey": false,
1404
+ "notNull": true,
1405
+ "autoincrement": false
1406
+ },
1407
+ "scopes": {
1408
+ "name": "scopes",
1409
+ "type": "text",
1410
+ "primaryKey": false,
1411
+ "notNull": true,
1412
+ "autoincrement": false
1413
+ },
1414
+ "redirect_uri": {
1415
+ "name": "redirect_uri",
1416
+ "type": "text",
1417
+ "primaryKey": false,
1418
+ "notNull": true,
1419
+ "autoincrement": false
1420
+ },
1421
+ "code_hash": {
1422
+ "name": "code_hash",
1423
+ "type": "blob",
1424
+ "primaryKey": false,
1425
+ "notNull": false,
1426
+ "autoincrement": false
1427
+ },
1428
+ "code_challenge": {
1429
+ "name": "code_challenge",
1430
+ "type": "text",
1431
+ "primaryKey": false,
1432
+ "notNull": false,
1433
+ "autoincrement": false
1434
+ },
1435
+ "code_expires_at": {
1436
+ "name": "code_expires_at",
1437
+ "type": "integer",
1438
+ "primaryKey": false,
1439
+ "notNull": false,
1440
+ "autoincrement": false
1441
+ },
1442
+ "refresh_hash": {
1443
+ "name": "refresh_hash",
1444
+ "type": "blob",
1445
+ "primaryKey": false,
1446
+ "notNull": false,
1447
+ "autoincrement": false
1448
+ },
1449
+ "refresh_previous_hash": {
1450
+ "name": "refresh_previous_hash",
1451
+ "type": "blob",
1452
+ "primaryKey": false,
1453
+ "notNull": false,
1454
+ "autoincrement": false
1455
+ },
1456
+ "expires_at": {
1457
+ "name": "expires_at",
1458
+ "type": "integer",
1459
+ "primaryKey": false,
1460
+ "notNull": true,
1461
+ "autoincrement": false
1462
+ },
1463
+ "created_at": {
1464
+ "name": "created_at",
1465
+ "type": "integer",
1466
+ "primaryKey": false,
1467
+ "notNull": true,
1468
+ "autoincrement": false,
1469
+ "default": "(CAST(unixepoch('subsec') * 1000 AS INTEGER))"
1470
+ },
1471
+ "last_used_at": {
1472
+ "name": "last_used_at",
1473
+ "type": "integer",
1474
+ "primaryKey": false,
1475
+ "notNull": false,
1476
+ "autoincrement": false
1477
+ },
1478
+ "last_used_ip": {
1479
+ "name": "last_used_ip",
1480
+ "type": "text",
1481
+ "primaryKey": false,
1482
+ "notNull": false,
1483
+ "autoincrement": false
1484
+ },
1485
+ "revoked_at": {
1486
+ "name": "revoked_at",
1487
+ "type": "integer",
1488
+ "primaryKey": false,
1489
+ "notNull": false,
1490
+ "autoincrement": false
1491
+ },
1492
+ "revoked_by": {
1493
+ "name": "revoked_by",
1494
+ "type": "text",
1495
+ "primaryKey": false,
1496
+ "notNull": false,
1497
+ "autoincrement": false
1498
+ }
1499
+ },
1500
+ "indexes": {
1501
+ "mcp_connections_refresh_previous_idx": {
1502
+ "name": "mcp_connections_refresh_previous_idx",
1503
+ "columns": [
1504
+ "refresh_previous_hash"
1505
+ ],
1506
+ "isUnique": false
1507
+ },
1508
+ "mcp_connections_live_idx": {
1509
+ "name": "mcp_connections_live_idx",
1510
+ "columns": [
1511
+ "principal",
1512
+ "expires_at"
1513
+ ],
1514
+ "isUnique": false,
1515
+ "where": "\"mcp_connections\".\"revoked_at\" IS NULL"
1516
+ },
1517
+ "mcp_connections_code_hash_key": {
1518
+ "name": "mcp_connections_code_hash_key",
1519
+ "columns": [
1520
+ "code_hash"
1521
+ ],
1522
+ "isUnique": true
1523
+ },
1524
+ "mcp_connections_refresh_hash_key": {
1525
+ "name": "mcp_connections_refresh_hash_key",
1526
+ "columns": [
1527
+ "refresh_hash"
1528
+ ],
1529
+ "isUnique": true
1530
+ }
1531
+ },
1532
+ "foreignKeys": {
1533
+ "mcp_connections_principal_fkey": {
1534
+ "name": "mcp_connections_principal_fkey",
1535
+ "tableFrom": "mcp_connections",
1536
+ "tableTo": "vault_members",
1537
+ "columnsFrom": [
1538
+ "principal"
1539
+ ],
1540
+ "columnsTo": [
1541
+ "principal"
1542
+ ],
1543
+ "onDelete": "restrict",
1544
+ "onUpdate": "no action"
1545
+ }
1546
+ },
1547
+ "compositePrimaryKeys": {},
1548
+ "uniqueConstraints": {},
1549
+ "checkConstraints": {
1550
+ "mcp_connections_principal_check": {
1551
+ "name": "mcp_connections_principal_check",
1552
+ "value": "\"mcp_connections\".\"principal\" LIKE 'user:%'"
1553
+ },
1554
+ "mcp_connections_registration_check": {
1555
+ "name": "mcp_connections_registration_check",
1556
+ "value": "\"mcp_connections\".\"registration\" IN ('cimd', 'dcr')"
1557
+ },
1558
+ "mcp_connections_auth_mac_check": {
1559
+ "name": "mcp_connections_auth_mac_check",
1560
+ "value": "octet_length(\"mcp_connections\".\"auth_mac\") = 32"
1561
+ },
1562
+ "mcp_connections_code_hash_check": {
1563
+ "name": "mcp_connections_code_hash_check",
1564
+ "value": "\"mcp_connections\".\"code_hash\" IS NULL OR octet_length(\"mcp_connections\".\"code_hash\") = 32"
1565
+ },
1566
+ "mcp_connections_refresh_hash_check": {
1567
+ "name": "mcp_connections_refresh_hash_check",
1568
+ "value": "\"mcp_connections\".\"refresh_hash\" IS NULL OR octet_length(\"mcp_connections\".\"refresh_hash\") = 32"
1569
+ }
1570
+ }
1571
+ },
1572
+ "oauth_clients": {
1573
+ "name": "oauth_clients",
1574
+ "columns": {
1575
+ "id": {
1576
+ "name": "id",
1577
+ "type": "text",
1578
+ "primaryKey": true,
1579
+ "notNull": true,
1580
+ "autoincrement": false
1581
+ },
1582
+ "auth_mac": {
1583
+ "name": "auth_mac",
1584
+ "type": "blob",
1585
+ "primaryKey": false,
1586
+ "notNull": true,
1587
+ "autoincrement": false
1588
+ },
1589
+ "name": {
1590
+ "name": "name",
1591
+ "type": "text",
1592
+ "primaryKey": false,
1593
+ "notNull": true,
1594
+ "autoincrement": false
1595
+ },
1596
+ "redirect_uris": {
1597
+ "name": "redirect_uris",
1598
+ "type": "text",
1599
+ "primaryKey": false,
1600
+ "notNull": true,
1601
+ "autoincrement": false
1602
+ },
1603
+ "created_at": {
1604
+ "name": "created_at",
1605
+ "type": "integer",
1606
+ "primaryKey": false,
1607
+ "notNull": true,
1608
+ "autoincrement": false,
1609
+ "default": "(CAST(unixepoch('subsec') * 1000 AS INTEGER))"
1610
+ },
1611
+ "created_ip": {
1612
+ "name": "created_ip",
1613
+ "type": "text",
1614
+ "primaryKey": false,
1615
+ "notNull": false,
1616
+ "autoincrement": false
1617
+ },
1618
+ "revoked_at": {
1619
+ "name": "revoked_at",
1620
+ "type": "integer",
1621
+ "primaryKey": false,
1622
+ "notNull": false,
1623
+ "autoincrement": false
1624
+ }
1625
+ },
1626
+ "indexes": {},
1627
+ "foreignKeys": {},
1628
+ "compositePrimaryKeys": {},
1629
+ "uniqueConstraints": {},
1630
+ "checkConstraints": {
1631
+ "oauth_clients_auth_mac_check": {
1632
+ "name": "oauth_clients_auth_mac_check",
1633
+ "value": "octet_length(\"oauth_clients\".\"auth_mac\") = 32"
1634
+ },
1635
+ "oauth_clients_redirect_uris_check": {
1636
+ "name": "oauth_clients_redirect_uris_check",
1637
+ "value": "json_valid(\"oauth_clients\".\"redirect_uris\")"
1638
+ }
1639
+ }
1640
+ },
1641
+ "projects": {
1642
+ "name": "projects",
1643
+ "columns": {
1644
+ "id": {
1645
+ "name": "id",
1646
+ "type": "text",
1647
+ "primaryKey": true,
1648
+ "notNull": true,
1649
+ "autoincrement": false
1650
+ },
1651
+ "slug": {
1652
+ "name": "slug",
1653
+ "type": "text",
1654
+ "primaryKey": false,
1655
+ "notNull": true,
1656
+ "autoincrement": false
1657
+ },
1658
+ "name": {
1659
+ "name": "name",
1660
+ "type": "text",
1661
+ "primaryKey": false,
1662
+ "notNull": true,
1663
+ "autoincrement": false
1664
+ },
1665
+ "created_at": {
1666
+ "name": "created_at",
1667
+ "type": "integer",
1668
+ "primaryKey": false,
1669
+ "notNull": true,
1670
+ "autoincrement": false,
1671
+ "default": "(CAST(unixepoch('subsec') * 1000 AS INTEGER))"
1672
+ },
1673
+ "archived_at": {
1674
+ "name": "archived_at",
1675
+ "type": "integer",
1676
+ "primaryKey": false,
1677
+ "notNull": false,
1678
+ "autoincrement": false
1679
+ },
1680
+ "folder": {
1681
+ "name": "folder",
1682
+ "type": "text",
1683
+ "primaryKey": false,
1684
+ "notNull": false,
1685
+ "autoincrement": false
1686
+ }
1687
+ },
1688
+ "indexes": {
1689
+ "projects_slug_key": {
1690
+ "name": "projects_slug_key",
1691
+ "columns": [
1692
+ "slug"
1693
+ ],
1694
+ "isUnique": true
1695
+ }
1696
+ },
1697
+ "foreignKeys": {},
1698
+ "compositePrimaryKeys": {},
1699
+ "uniqueConstraints": {},
1700
+ "checkConstraints": {
1701
+ "projects_slug_check": {
1702
+ "name": "projects_slug_check",
1703
+ "value": "(length(\"projects\".\"slug\") BETWEEN 1 AND 63 AND \"projects\".\"slug\" GLOB '[a-z0-9]*' AND \"projects\".\"slug\" NOT GLOB '*[^a-z0-9-]*') OR (instr(\"projects\".\"slug\", '~') BETWEEN 2 AND 64 AND substr(\"projects\".\"slug\", 1, instr(\"projects\".\"slug\", '~') - 1) GLOB '[a-z0-9]*' AND substr(\"projects\".\"slug\", 1, instr(\"projects\".\"slug\", '~') - 1) NOT GLOB '*[^a-z0-9-]*' AND length(substr(\"projects\".\"slug\", instr(\"projects\".\"slug\", '~') + 1)) BETWEEN 1 AND 40 AND substr(\"projects\".\"slug\", instr(\"projects\".\"slug\", '~') + 1) NOT GLOB '*[^a-z0-9-]*')"
1704
+ },
1705
+ "projects_folder_check": {
1706
+ "name": "projects_folder_check",
1707
+ "value": "\"projects\".\"folder\" IS NULL OR (length(\"projects\".\"folder\") BETWEEN 1 AND 64 AND \"projects\".\"folder\" NOT GLOB '*/*' AND \"projects\".\"folder\" = trim(\"projects\".\"folder\"))"
1708
+ }
1709
+ }
1710
+ },
1711
+ "secret_references": {
1712
+ "name": "secret_references",
1713
+ "columns": {
1714
+ "id": {
1715
+ "name": "id",
1716
+ "type": "text",
1717
+ "primaryKey": true,
1718
+ "notNull": true,
1719
+ "autoincrement": false
1720
+ },
1721
+ "project_id": {
1722
+ "name": "project_id",
1723
+ "type": "text",
1724
+ "primaryKey": false,
1725
+ "notNull": true,
1726
+ "autoincrement": false
1727
+ },
1728
+ "environment_id": {
1729
+ "name": "environment_id",
1730
+ "type": "text",
1731
+ "primaryKey": false,
1732
+ "notNull": true,
1733
+ "autoincrement": false
1734
+ },
1735
+ "secret_id": {
1736
+ "name": "secret_id",
1737
+ "type": "text",
1738
+ "primaryKey": false,
1739
+ "notNull": true,
1740
+ "autoincrement": false
1741
+ },
1742
+ "source_project_id": {
1743
+ "name": "source_project_id",
1744
+ "type": "text",
1745
+ "primaryKey": false,
1746
+ "notNull": true,
1747
+ "autoincrement": false
1748
+ },
1749
+ "source_environment_id": {
1750
+ "name": "source_environment_id",
1751
+ "type": "text",
1752
+ "primaryKey": false,
1753
+ "notNull": true,
1754
+ "autoincrement": false
1755
+ },
1756
+ "source_secret_id": {
1757
+ "name": "source_secret_id",
1758
+ "type": "text",
1759
+ "primaryKey": false,
1760
+ "notNull": true,
1761
+ "autoincrement": false
1762
+ },
1763
+ "created_seq": {
1764
+ "name": "created_seq",
1765
+ "type": "integer",
1766
+ "primaryKey": false,
1767
+ "notNull": true,
1768
+ "autoincrement": false
1769
+ },
1770
+ "created_at": {
1771
+ "name": "created_at",
1772
+ "type": "integer",
1773
+ "primaryKey": false,
1774
+ "notNull": true,
1775
+ "autoincrement": false,
1776
+ "default": "(CAST(unixepoch('subsec') * 1000 AS INTEGER))"
1777
+ },
1778
+ "created_by": {
1779
+ "name": "created_by",
1780
+ "type": "text",
1781
+ "primaryKey": false,
1782
+ "notNull": true,
1783
+ "autoincrement": false
1784
+ }
1785
+ },
1786
+ "indexes": {
1787
+ "secret_references_holder_idx": {
1788
+ "name": "secret_references_holder_idx",
1789
+ "columns": [
1790
+ "secret_id",
1791
+ "created_seq"
1792
+ ],
1793
+ "isUnique": false
1794
+ },
1795
+ "secret_references_source_idx": {
1796
+ "name": "secret_references_source_idx",
1797
+ "columns": [
1798
+ "source_secret_id"
1799
+ ],
1800
+ "isUnique": false
1801
+ },
1802
+ "secret_references_project_idx": {
1803
+ "name": "secret_references_project_idx",
1804
+ "columns": [
1805
+ "project_id"
1806
+ ],
1807
+ "isUnique": false
1808
+ },
1809
+ "secret_references_source_project_idx": {
1810
+ "name": "secret_references_source_project_idx",
1811
+ "columns": [
1812
+ "source_project_id"
1813
+ ],
1814
+ "isUnique": false
1815
+ },
1816
+ "secret_references_created_by_idx": {
1817
+ "name": "secret_references_created_by_idx",
1818
+ "columns": [
1819
+ "created_by"
1820
+ ],
1821
+ "isUnique": false
1822
+ },
1823
+ "secret_references_created_seq_key": {
1824
+ "name": "secret_references_created_seq_key",
1825
+ "columns": [
1826
+ "created_seq"
1827
+ ],
1828
+ "isUnique": true
1829
+ }
1830
+ },
1831
+ "foreignKeys": {
1832
+ "secret_references_secret_id_fkey": {
1833
+ "name": "secret_references_secret_id_fkey",
1834
+ "tableFrom": "secret_references",
1835
+ "tableTo": "secrets",
1836
+ "columnsFrom": [
1837
+ "secret_id"
1838
+ ],
1839
+ "columnsTo": [
1840
+ "id"
1841
+ ],
1842
+ "onDelete": "restrict",
1843
+ "onUpdate": "no action"
1844
+ },
1845
+ "secret_references_source_secret_id_fkey": {
1846
+ "name": "secret_references_source_secret_id_fkey",
1847
+ "tableFrom": "secret_references",
1848
+ "tableTo": "secrets",
1849
+ "columnsFrom": [
1850
+ "source_secret_id"
1851
+ ],
1852
+ "columnsTo": [
1853
+ "id"
1854
+ ],
1855
+ "onDelete": "restrict",
1856
+ "onUpdate": "no action"
1857
+ },
1858
+ "secret_references_created_seq_fkey": {
1859
+ "name": "secret_references_created_seq_fkey",
1860
+ "tableFrom": "secret_references",
1861
+ "tableTo": "audit_log",
1862
+ "columnsFrom": [
1863
+ "created_seq"
1864
+ ],
1865
+ "columnsTo": [
1866
+ "seq"
1867
+ ],
1868
+ "onDelete": "restrict",
1869
+ "onUpdate": "no action"
1870
+ }
1871
+ },
1872
+ "compositePrimaryKeys": {},
1873
+ "uniqueConstraints": {},
1874
+ "checkConstraints": {}
1875
+ },
1876
+ "secret_versions": {
1877
+ "name": "secret_versions",
1878
+ "columns": {
1879
+ "id": {
1880
+ "name": "id",
1881
+ "type": "text",
1882
+ "primaryKey": true,
1883
+ "notNull": true,
1884
+ "autoincrement": false
1885
+ },
1886
+ "secret_id": {
1887
+ "name": "secret_id",
1888
+ "type": "text",
1889
+ "primaryKey": false,
1890
+ "notNull": true,
1891
+ "autoincrement": false
1892
+ },
1893
+ "version": {
1894
+ "name": "version",
1895
+ "type": "integer",
1896
+ "primaryKey": false,
1897
+ "notNull": true,
1898
+ "autoincrement": false
1899
+ },
1900
+ "envelope_version": {
1901
+ "name": "envelope_version",
1902
+ "type": "integer",
1903
+ "primaryKey": false,
1904
+ "notNull": true,
1905
+ "autoincrement": false
1906
+ },
1907
+ "ciphertext": {
1908
+ "name": "ciphertext",
1909
+ "type": "blob",
1910
+ "primaryKey": false,
1911
+ "notNull": true,
1912
+ "autoincrement": false
1913
+ },
1914
+ "iv": {
1915
+ "name": "iv",
1916
+ "type": "blob",
1917
+ "primaryKey": false,
1918
+ "notNull": true,
1919
+ "autoincrement": false
1920
+ },
1921
+ "auth_tag": {
1922
+ "name": "auth_tag",
1923
+ "type": "blob",
1924
+ "primaryKey": false,
1925
+ "notNull": true,
1926
+ "autoincrement": false
1927
+ },
1928
+ "wrapped_dek": {
1929
+ "name": "wrapped_dek",
1930
+ "type": "blob",
1931
+ "primaryKey": false,
1932
+ "notNull": true,
1933
+ "autoincrement": false
1934
+ },
1935
+ "kek_provider": {
1936
+ "name": "kek_provider",
1937
+ "type": "text",
1938
+ "primaryKey": false,
1939
+ "notNull": true,
1940
+ "autoincrement": false
1941
+ },
1942
+ "kek_id": {
1943
+ "name": "kek_id",
1944
+ "type": "text",
1945
+ "primaryKey": false,
1946
+ "notNull": true,
1947
+ "autoincrement": false
1948
+ },
1949
+ "kek_version": {
1950
+ "name": "kek_version",
1951
+ "type": "text",
1952
+ "primaryKey": false,
1953
+ "notNull": true,
1954
+ "autoincrement": false
1955
+ },
1956
+ "created_at": {
1957
+ "name": "created_at",
1958
+ "type": "integer",
1959
+ "primaryKey": false,
1960
+ "notNull": true,
1961
+ "autoincrement": false,
1962
+ "default": "(CAST(unixepoch('subsec') * 1000 AS INTEGER))"
1963
+ },
1964
+ "created_by": {
1965
+ "name": "created_by",
1966
+ "type": "text",
1967
+ "primaryKey": false,
1968
+ "notNull": true,
1969
+ "autoincrement": false
1970
+ },
1971
+ "recipe": {
1972
+ "name": "recipe",
1973
+ "type": "text",
1974
+ "primaryKey": false,
1975
+ "notNull": false,
1976
+ "autoincrement": false
1977
+ },
1978
+ "pair_id": {
1979
+ "name": "pair_id",
1980
+ "type": "text",
1981
+ "primaryKey": false,
1982
+ "notNull": false,
1983
+ "autoincrement": false
1984
+ },
1985
+ "pair_half": {
1986
+ "name": "pair_half",
1987
+ "type": "text",
1988
+ "primaryKey": false,
1989
+ "notNull": false,
1990
+ "autoincrement": false
1991
+ },
1992
+ "plaintext": {
1993
+ "name": "plaintext",
1994
+ "type": "text",
1995
+ "primaryKey": false,
1996
+ "notNull": false,
1997
+ "autoincrement": false
1998
+ }
1999
+ },
2000
+ "indexes": {
2001
+ "secret_versions_secret_idx": {
2002
+ "name": "secret_versions_secret_idx",
2003
+ "columns": [
2004
+ "secret_id",
2005
+ "version"
2006
+ ],
2007
+ "isUnique": false
2008
+ },
2009
+ "secret_versions_secret_id_version_key": {
2010
+ "name": "secret_versions_secret_id_version_key",
2011
+ "columns": [
2012
+ "secret_id",
2013
+ "version"
2014
+ ],
2015
+ "isUnique": true
2016
+ }
2017
+ },
2018
+ "foreignKeys": {
2019
+ "secret_versions_secret_id_fkey": {
2020
+ "name": "secret_versions_secret_id_fkey",
2021
+ "tableFrom": "secret_versions",
2022
+ "tableTo": "secrets",
2023
+ "columnsFrom": [
2024
+ "secret_id"
2025
+ ],
2026
+ "columnsTo": [
2027
+ "id"
2028
+ ],
2029
+ "onDelete": "restrict",
2030
+ "onUpdate": "no action"
2031
+ }
2032
+ },
2033
+ "compositePrimaryKeys": {},
2034
+ "uniqueConstraints": {},
2035
+ "checkConstraints": {
2036
+ "secret_versions_version_check": {
2037
+ "name": "secret_versions_version_check",
2038
+ "value": "\"secret_versions\".\"version\" > 0"
2039
+ },
2040
+ "secret_versions_iv_check": {
2041
+ "name": "secret_versions_iv_check",
2042
+ "value": "octet_length(\"secret_versions\".\"iv\") = 12"
2043
+ },
2044
+ "secret_versions_auth_tag_check": {
2045
+ "name": "secret_versions_auth_tag_check",
2046
+ "value": "octet_length(\"secret_versions\".\"auth_tag\") = 16"
2047
+ }
2048
+ }
2049
+ },
2050
+ "secrets": {
2051
+ "name": "secrets",
2052
+ "columns": {
2053
+ "id": {
2054
+ "name": "id",
2055
+ "type": "text",
2056
+ "primaryKey": true,
2057
+ "notNull": true,
2058
+ "autoincrement": false
2059
+ },
2060
+ "project_id": {
2061
+ "name": "project_id",
2062
+ "type": "text",
2063
+ "primaryKey": false,
2064
+ "notNull": true,
2065
+ "autoincrement": false
2066
+ },
2067
+ "environment_id": {
2068
+ "name": "environment_id",
2069
+ "type": "text",
2070
+ "primaryKey": false,
2071
+ "notNull": true,
2072
+ "autoincrement": false
2073
+ },
2074
+ "key": {
2075
+ "name": "key",
2076
+ "type": "text",
2077
+ "primaryKey": false,
2078
+ "notNull": true,
2079
+ "autoincrement": false
2080
+ },
2081
+ "created_at": {
2082
+ "name": "created_at",
2083
+ "type": "integer",
2084
+ "primaryKey": false,
2085
+ "notNull": true,
2086
+ "autoincrement": false,
2087
+ "default": "(CAST(unixepoch('subsec') * 1000 AS INTEGER))"
2088
+ },
2089
+ "updated_at": {
2090
+ "name": "updated_at",
2091
+ "type": "integer",
2092
+ "primaryKey": false,
2093
+ "notNull": true,
2094
+ "autoincrement": false,
2095
+ "default": "(CAST(unixepoch('subsec') * 1000 AS INTEGER))"
2096
+ },
2097
+ "current_version_id": {
2098
+ "name": "current_version_id",
2099
+ "type": "text",
2100
+ "primaryKey": false,
2101
+ "notNull": false,
2102
+ "autoincrement": false
2103
+ },
2104
+ "current_version": {
2105
+ "name": "current_version",
2106
+ "type": "integer",
2107
+ "primaryKey": false,
2108
+ "notNull": true,
2109
+ "autoincrement": false,
2110
+ "default": 0
2111
+ },
2112
+ "archived_at": {
2113
+ "name": "archived_at",
2114
+ "type": "integer",
2115
+ "primaryKey": false,
2116
+ "notNull": false,
2117
+ "autoincrement": false
2118
+ },
2119
+ "folder": {
2120
+ "name": "folder",
2121
+ "type": "text",
2122
+ "primaryKey": false,
2123
+ "notNull": false,
2124
+ "autoincrement": false
2125
+ }
2126
+ },
2127
+ "indexes": {
2128
+ "secrets_lookup_idx": {
2129
+ "name": "secrets_lookup_idx",
2130
+ "columns": [
2131
+ "project_id",
2132
+ "environment_id",
2133
+ "key"
2134
+ ],
2135
+ "isUnique": false
2136
+ },
2137
+ "secrets_project_id_environment_id_key_key": {
2138
+ "name": "secrets_project_id_environment_id_key_key",
2139
+ "columns": [
2140
+ "project_id",
2141
+ "environment_id",
2142
+ "key"
2143
+ ],
2144
+ "isUnique": true
2145
+ }
2146
+ },
2147
+ "foreignKeys": {
2148
+ "secrets_current_version_id_secret_versions_id_fk": {
2149
+ "name": "secrets_current_version_id_secret_versions_id_fk",
2150
+ "tableFrom": "secrets",
2151
+ "tableTo": "secret_versions",
2152
+ "columnsFrom": [
2153
+ "current_version_id"
2154
+ ],
2155
+ "columnsTo": [
2156
+ "id"
2157
+ ],
2158
+ "onDelete": "no action",
2159
+ "onUpdate": "no action"
2160
+ },
2161
+ "secrets_project_id_fkey": {
2162
+ "name": "secrets_project_id_fkey",
2163
+ "tableFrom": "secrets",
2164
+ "tableTo": "projects",
2165
+ "columnsFrom": [
2166
+ "project_id"
2167
+ ],
2168
+ "columnsTo": [
2169
+ "id"
2170
+ ],
2171
+ "onDelete": "restrict",
2172
+ "onUpdate": "no action"
2173
+ },
2174
+ "secrets_environment_id_fkey": {
2175
+ "name": "secrets_environment_id_fkey",
2176
+ "tableFrom": "secrets",
2177
+ "tableTo": "environments",
2178
+ "columnsFrom": [
2179
+ "environment_id"
2180
+ ],
2181
+ "columnsTo": [
2182
+ "id"
2183
+ ],
2184
+ "onDelete": "restrict",
2185
+ "onUpdate": "no action"
2186
+ },
2187
+ "secrets_environment_in_project": {
2188
+ "name": "secrets_environment_in_project",
2189
+ "tableFrom": "secrets",
2190
+ "tableTo": "environments",
2191
+ "columnsFrom": [
2192
+ "environment_id",
2193
+ "project_id"
2194
+ ],
2195
+ "columnsTo": [
2196
+ "id",
2197
+ "project_id"
2198
+ ],
2199
+ "onDelete": "no action",
2200
+ "onUpdate": "no action"
2201
+ }
2202
+ },
2203
+ "compositePrimaryKeys": {},
2204
+ "uniqueConstraints": {},
2205
+ "checkConstraints": {
2206
+ "secrets_key_check": {
2207
+ "name": "secrets_key_check",
2208
+ "value": "length(\"secrets\".\"key\") BETWEEN 1 AND 128 AND \"secrets\".\"key\" GLOB '[A-Za-z_]*' AND \"secrets\".\"key\" NOT GLOB '*[^A-Za-z0-9_]*'"
2209
+ },
2210
+ "secrets_folder_check": {
2211
+ "name": "secrets_folder_check",
2212
+ "value": "\"secrets\".\"folder\" IS NULL OR (length(\"secrets\".\"folder\") BETWEEN 1 AND 64 AND \"secrets\".\"folder\" NOT GLOB '*/*' AND \"secrets\".\"folder\" = trim(\"secrets\".\"folder\"))"
2213
+ }
2214
+ }
2215
+ },
2216
+ "service_bindings": {
2217
+ "name": "service_bindings",
2218
+ "columns": {
2219
+ "id": {
2220
+ "name": "id",
2221
+ "type": "text",
2222
+ "primaryKey": true,
2223
+ "notNull": true,
2224
+ "autoincrement": false
2225
+ },
2226
+ "auth_mac": {
2227
+ "name": "auth_mac",
2228
+ "type": "blob",
2229
+ "primaryKey": false,
2230
+ "notNull": true,
2231
+ "autoincrement": false
2232
+ },
2233
+ "principal": {
2234
+ "name": "principal",
2235
+ "type": "text",
2236
+ "primaryKey": false,
2237
+ "notNull": true,
2238
+ "autoincrement": false
2239
+ },
2240
+ "generation": {
2241
+ "name": "generation",
2242
+ "type": "integer",
2243
+ "primaryKey": false,
2244
+ "notNull": true,
2245
+ "autoincrement": false
2246
+ },
2247
+ "profile": {
2248
+ "name": "profile",
2249
+ "type": "text",
2250
+ "primaryKey": false,
2251
+ "notNull": true,
2252
+ "autoincrement": false
2253
+ },
2254
+ "issuer": {
2255
+ "name": "issuer",
2256
+ "type": "text",
2257
+ "primaryKey": false,
2258
+ "notNull": true,
2259
+ "autoincrement": false
2260
+ },
2261
+ "jwks_uri": {
2262
+ "name": "jwks_uri",
2263
+ "type": "text",
2264
+ "primaryKey": false,
2265
+ "notNull": true,
2266
+ "autoincrement": false
2267
+ },
2268
+ "jwks": {
2269
+ "name": "jwks",
2270
+ "type": "text",
2271
+ "primaryKey": false,
2272
+ "notNull": false,
2273
+ "autoincrement": false
2274
+ },
2275
+ "claims": {
2276
+ "name": "claims",
2277
+ "type": "text",
2278
+ "primaryKey": false,
2279
+ "notNull": true,
2280
+ "autoincrement": false
2281
+ },
2282
+ "scope": {
2283
+ "name": "scope",
2284
+ "type": "text",
2285
+ "primaryKey": false,
2286
+ "notNull": false,
2287
+ "autoincrement": false
2288
+ },
2289
+ "label": {
2290
+ "name": "label",
2291
+ "type": "text",
2292
+ "primaryKey": false,
2293
+ "notNull": false,
2294
+ "autoincrement": false
2295
+ },
2296
+ "created_at": {
2297
+ "name": "created_at",
2298
+ "type": "integer",
2299
+ "primaryKey": false,
2300
+ "notNull": true,
2301
+ "autoincrement": false,
2302
+ "default": "(CAST(unixepoch('subsec') * 1000 AS INTEGER))"
2303
+ },
2304
+ "created_by": {
2305
+ "name": "created_by",
2306
+ "type": "text",
2307
+ "primaryKey": false,
2308
+ "notNull": true,
2309
+ "autoincrement": false
2310
+ },
2311
+ "last_used_at": {
2312
+ "name": "last_used_at",
2313
+ "type": "integer",
2314
+ "primaryKey": false,
2315
+ "notNull": false,
2316
+ "autoincrement": false
2317
+ },
2318
+ "revoked_at": {
2319
+ "name": "revoked_at",
2320
+ "type": "integer",
2321
+ "primaryKey": false,
2322
+ "notNull": false,
2323
+ "autoincrement": false
2324
+ },
2325
+ "revoked_by": {
2326
+ "name": "revoked_by",
2327
+ "type": "text",
2328
+ "primaryKey": false,
2329
+ "notNull": false,
2330
+ "autoincrement": false
2331
+ }
2332
+ },
2333
+ "indexes": {
2334
+ "service_bindings_principal_idx": {
2335
+ "name": "service_bindings_principal_idx",
2336
+ "columns": [
2337
+ "principal",
2338
+ "issuer"
2339
+ ],
2340
+ "isUnique": false
2341
+ },
2342
+ "service_bindings_live_idx": {
2343
+ "name": "service_bindings_live_idx",
2344
+ "columns": [
2345
+ "principal",
2346
+ "issuer",
2347
+ "generation",
2348
+ "created_at",
2349
+ "id"
2350
+ ],
2351
+ "isUnique": false,
2352
+ "where": "\"service_bindings\".\"revoked_at\" IS NULL"
2353
+ }
2354
+ },
2355
+ "foreignKeys": {
2356
+ "service_bindings_principal_fkey": {
2357
+ "name": "service_bindings_principal_fkey",
2358
+ "tableFrom": "service_bindings",
2359
+ "tableTo": "vault_members",
2360
+ "columnsFrom": [
2361
+ "principal"
2362
+ ],
2363
+ "columnsTo": [
2364
+ "principal"
2365
+ ],
2366
+ "onDelete": "restrict",
2367
+ "onUpdate": "no action"
2368
+ }
2369
+ },
2370
+ "compositePrimaryKeys": {},
2371
+ "uniqueConstraints": {},
2372
+ "checkConstraints": {
2373
+ "service_bindings_principal_check": {
2374
+ "name": "service_bindings_principal_check",
2375
+ "value": "\"service_bindings\".\"principal\" LIKE 'token:%'"
2376
+ },
2377
+ "service_bindings_auth_mac_check": {
2378
+ "name": "service_bindings_auth_mac_check",
2379
+ "value": "octet_length(\"service_bindings\".\"auth_mac\") = 32"
2380
+ },
2381
+ "service_bindings_claims_check": {
2382
+ "name": "service_bindings_claims_check",
2383
+ "value": "json_valid(\"service_bindings\".\"claims\")"
2384
+ }
2385
+ }
2386
+ },
2387
+ "vault_grants": {
2388
+ "name": "vault_grants",
2389
+ "columns": {
2390
+ "principal": {
2391
+ "name": "principal",
2392
+ "type": "text",
2393
+ "primaryKey": false,
2394
+ "notNull": true,
2395
+ "autoincrement": false
2396
+ },
2397
+ "project_id": {
2398
+ "name": "project_id",
2399
+ "type": "text",
2400
+ "primaryKey": false,
2401
+ "notNull": false,
2402
+ "autoincrement": false
2403
+ },
2404
+ "environment_id": {
2405
+ "name": "environment_id",
2406
+ "type": "text",
2407
+ "primaryKey": false,
2408
+ "notNull": false,
2409
+ "autoincrement": false
2410
+ },
2411
+ "environment_slug": {
2412
+ "name": "environment_slug",
2413
+ "type": "text",
2414
+ "primaryKey": false,
2415
+ "notNull": false,
2416
+ "autoincrement": false
2417
+ },
2418
+ "role": {
2419
+ "name": "role",
2420
+ "type": "text",
2421
+ "primaryKey": false,
2422
+ "notNull": true,
2423
+ "autoincrement": false
2424
+ },
2425
+ "expires_at": {
2426
+ "name": "expires_at",
2427
+ "type": "integer",
2428
+ "primaryKey": false,
2429
+ "notNull": false,
2430
+ "autoincrement": false
2431
+ },
2432
+ "granted_at": {
2433
+ "name": "granted_at",
2434
+ "type": "integer",
2435
+ "primaryKey": false,
2436
+ "notNull": true,
2437
+ "autoincrement": false
2438
+ },
2439
+ "granted_by": {
2440
+ "name": "granted_by",
2441
+ "type": "text",
2442
+ "primaryKey": false,
2443
+ "notNull": true,
2444
+ "autoincrement": false
2445
+ }
2446
+ },
2447
+ "indexes": {
2448
+ "vault_grants_on_every_project": {
2449
+ "name": "vault_grants_on_every_project",
2450
+ "columns": [
2451
+ "principal"
2452
+ ],
2453
+ "isUnique": true,
2454
+ "where": "\"vault_grants\".\"project_id\" IS NULL AND \"vault_grants\".\"environment_id\" IS NULL AND \"vault_grants\".\"environment_slug\" IS NULL"
2455
+ },
2456
+ "vault_grants_on_project": {
2457
+ "name": "vault_grants_on_project",
2458
+ "columns": [
2459
+ "principal",
2460
+ "project_id"
2461
+ ],
2462
+ "isUnique": true
2463
+ },
2464
+ "vault_grants_on_environment": {
2465
+ "name": "vault_grants_on_environment",
2466
+ "columns": [
2467
+ "principal",
2468
+ "environment_id"
2469
+ ],
2470
+ "isUnique": true
2471
+ },
2472
+ "vault_grants_on_environment_slug": {
2473
+ "name": "vault_grants_on_environment_slug",
2474
+ "columns": [
2475
+ "principal",
2476
+ "environment_slug"
2477
+ ],
2478
+ "isUnique": true
2479
+ }
2480
+ },
2481
+ "foreignKeys": {
2482
+ "vault_grants_principal_fkey": {
2483
+ "name": "vault_grants_principal_fkey",
2484
+ "tableFrom": "vault_grants",
2485
+ "tableTo": "vault_members",
2486
+ "columnsFrom": [
2487
+ "principal"
2488
+ ],
2489
+ "columnsTo": [
2490
+ "principal"
2491
+ ],
2492
+ "onDelete": "restrict",
2493
+ "onUpdate": "no action"
2494
+ },
2495
+ "vault_grants_project_id_fkey": {
2496
+ "name": "vault_grants_project_id_fkey",
2497
+ "tableFrom": "vault_grants",
2498
+ "tableTo": "projects",
2499
+ "columnsFrom": [
2500
+ "project_id"
2501
+ ],
2502
+ "columnsTo": [
2503
+ "id"
2504
+ ],
2505
+ "onDelete": "restrict",
2506
+ "onUpdate": "no action"
2507
+ },
2508
+ "vault_grants_environment_id_fkey": {
2509
+ "name": "vault_grants_environment_id_fkey",
2510
+ "tableFrom": "vault_grants",
2511
+ "tableTo": "environments",
2512
+ "columnsFrom": [
2513
+ "environment_id"
2514
+ ],
2515
+ "columnsTo": [
2516
+ "id"
2517
+ ],
2518
+ "onDelete": "restrict",
2519
+ "onUpdate": "no action"
2520
+ }
2521
+ },
2522
+ "compositePrimaryKeys": {},
2523
+ "uniqueConstraints": {},
2524
+ "checkConstraints": {
2525
+ "vault_grants_one_place": {
2526
+ "name": "vault_grants_one_place",
2527
+ "value": "((\"vault_grants\".\"project_id\" IS NULL) <> (\"vault_grants\".\"environment_id\" IS NULL) AND \"vault_grants\".\"environment_slug\" IS NULL) OR (\"vault_grants\".\"project_id\" IS NULL AND \"vault_grants\".\"environment_id\" IS NULL)"
2528
+ },
2529
+ "vault_grants_environment_slug_check": {
2530
+ "name": "vault_grants_environment_slug_check",
2531
+ "value": "\"vault_grants\".\"environment_slug\" IS NULL OR (length(\"vault_grants\".\"environment_slug\") BETWEEN 1 AND 63 AND \"vault_grants\".\"environment_slug\" GLOB '[a-z0-9]*' AND \"vault_grants\".\"environment_slug\" NOT GLOB '*[^a-z0-9-]*')"
2532
+ },
2533
+ "vault_grants_role_check": {
2534
+ "name": "vault_grants_role_check",
2535
+ "value": "\"vault_grants\".\"role\" IN ('viewer', 'developer', 'maintainer', 'access-manager', 'auditor', 'owner')"
2536
+ },
2537
+ "vault_grants_environment_role_check": {
2538
+ "name": "vault_grants_environment_role_check",
2539
+ "value": "(\"vault_grants\".\"environment_id\" IS NULL AND \"vault_grants\".\"environment_slug\" IS NULL) OR \"vault_grants\".\"role\" IN ('viewer', 'developer', 'auditor')"
2540
+ }
2541
+ }
2542
+ },
2543
+ "vault_members": {
2544
+ "name": "vault_members",
2545
+ "columns": {
2546
+ "principal": {
2547
+ "name": "principal",
2548
+ "type": "text",
2549
+ "primaryKey": true,
2550
+ "notNull": true,
2551
+ "autoincrement": false
2552
+ },
2553
+ "status": {
2554
+ "name": "status",
2555
+ "type": "text",
2556
+ "primaryKey": false,
2557
+ "notNull": true,
2558
+ "autoincrement": false
2559
+ },
2560
+ "owner": {
2561
+ "name": "owner",
2562
+ "type": "integer",
2563
+ "primaryKey": false,
2564
+ "notNull": true,
2565
+ "autoincrement": false,
2566
+ "default": false
2567
+ },
2568
+ "role": {
2569
+ "name": "role",
2570
+ "type": "text",
2571
+ "primaryKey": false,
2572
+ "notNull": false,
2573
+ "autoincrement": false
2574
+ },
2575
+ "scope": {
2576
+ "name": "scope",
2577
+ "type": "text",
2578
+ "primaryKey": false,
2579
+ "notNull": false,
2580
+ "autoincrement": false
2581
+ },
2582
+ "generation": {
2583
+ "name": "generation",
2584
+ "type": "integer",
2585
+ "primaryKey": false,
2586
+ "notNull": true,
2587
+ "autoincrement": false,
2588
+ "default": 0
2589
+ },
2590
+ "created_at": {
2591
+ "name": "created_at",
2592
+ "type": "integer",
2593
+ "primaryKey": false,
2594
+ "notNull": true,
2595
+ "autoincrement": false
2596
+ },
2597
+ "created_by": {
2598
+ "name": "created_by",
2599
+ "type": "text",
2600
+ "primaryKey": false,
2601
+ "notNull": true,
2602
+ "autoincrement": false
2603
+ },
2604
+ "status_changed_at": {
2605
+ "name": "status_changed_at",
2606
+ "type": "integer",
2607
+ "primaryKey": false,
2608
+ "notNull": true,
2609
+ "autoincrement": false
2610
+ },
2611
+ "status_changed_by": {
2612
+ "name": "status_changed_by",
2613
+ "type": "text",
2614
+ "primaryKey": false,
2615
+ "notNull": true,
2616
+ "autoincrement": false
2617
+ },
2618
+ "access_seq": {
2619
+ "name": "access_seq",
2620
+ "type": "integer",
2621
+ "primaryKey": false,
2622
+ "notNull": true,
2623
+ "autoincrement": false
2624
+ },
2625
+ "mac": {
2626
+ "name": "mac",
2627
+ "type": "blob",
2628
+ "primaryKey": false,
2629
+ "notNull": true,
2630
+ "autoincrement": false
2631
+ }
2632
+ },
2633
+ "indexes": {},
2634
+ "foreignKeys": {},
2635
+ "compositePrimaryKeys": {},
2636
+ "uniqueConstraints": {},
2637
+ "checkConstraints": {
2638
+ "vault_members_mac_check": {
2639
+ "name": "vault_members_mac_check",
2640
+ "value": "octet_length(\"vault_members\".\"mac\") = 32"
2641
+ },
2642
+ "vault_members_principal_check": {
2643
+ "name": "vault_members_principal_check",
2644
+ "value": "(\"vault_members\".\"principal\" GLOB 'user:?*' OR \"vault_members\".\"principal\" GLOB 'token:?*')\n AND substr(\"vault_members\".\"principal\", instr(\"vault_members\".\"principal\", ':') + 1, 1) <> ':'\n AND instr(\"vault_members\".\"principal\", ' ') = 0 AND instr(\"vault_members\".\"principal\", char(9)) = 0\n AND instr(\"vault_members\".\"principal\", char(10)) = 0 AND instr(\"vault_members\".\"principal\", char(13)) = 0"
2645
+ },
2646
+ "vault_members_user_lowercase": {
2647
+ "name": "vault_members_user_lowercase",
2648
+ "value": "\"vault_members\".\"principal\" NOT LIKE 'user:%' OR \"vault_members\".\"principal\" = lower(\"vault_members\".\"principal\")"
2649
+ },
2650
+ "vault_members_status_check": {
2651
+ "name": "vault_members_status_check",
2652
+ "value": "\"vault_members\".\"status\" IN ('active', 'removed')"
2653
+ },
2654
+ "vault_members_owner_check": {
2655
+ "name": "vault_members_owner_check",
2656
+ "value": "NOT \"vault_members\".\"owner\" OR (\"vault_members\".\"status\" = 'active' AND \"vault_members\".\"principal\" LIKE 'user:%')"
2657
+ },
2658
+ "vault_members_generation_check": {
2659
+ "name": "vault_members_generation_check",
2660
+ "value": "\"vault_members\".\"generation\" >= 0"
2661
+ }
2662
+ }
2663
+ }
2664
+ },
2665
+ "views": {},
2666
+ "enums": {},
2667
+ "_meta": {
2668
+ "schemas": {},
2669
+ "tables": {},
2670
+ "columns": {}
2671
+ },
2672
+ "internal": {
2673
+ "indexes": {
2674
+ "audit_log_unbind_idx": {
2675
+ "columns": {
2676
+ "json_extract(\"metadata\", '$.bindingId')": {
2677
+ "isExpression": true
2678
+ }
2679
+ }
2680
+ },
2681
+ "audit_log_exchange_idx": {
2682
+ "columns": {
2683
+ "json_extract(\"metadata\", '$.credentialId')": {
2684
+ "isExpression": true
2685
+ }
2686
+ }
2687
+ },
2688
+ "audit_log_token_create_idx": {
2689
+ "columns": {
2690
+ "json_extract(\"metadata\", '$.targetCredentialId')": {
2691
+ "isExpression": true
2692
+ }
2693
+ }
2694
+ },
2695
+ "audit_log_also_project_idx": {
2696
+ "columns": {
2697
+ "json_extract(\"metadata\", '$.also.projectId')": {
2698
+ "isExpression": true
2699
+ }
2700
+ }
2701
+ },
2702
+ "audit_log_also_environment_idx": {
2703
+ "columns": {
2704
+ "json_extract(\"metadata\", '$.also.environmentId')": {
2705
+ "isExpression": true
2706
+ }
2707
+ }
2708
+ },
2709
+ "audit_log_also_secret_idx": {
2710
+ "columns": {
2711
+ "json_extract(\"metadata\", '$.also.secretId')": {
2712
+ "isExpression": true
2713
+ }
2714
+ }
2715
+ }
2716
+ }
2717
+ }
2718
+ }