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