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