@coffre/cli 0.1.10 → 0.1.12

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.
@@ -0,0 +1,1707 @@
1
+ {
2
+ "id": "349584fd-2c70-4863-bcd6-d353cc28205a",
3
+ "prevId": "b76d9374-5d86-42d1-9d06-1af17adadd6b",
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
+ },
385
+ "foreignKeys": {
386
+ "audit_log_project_id_fkey": {
387
+ "name": "audit_log_project_id_fkey",
388
+ "tableFrom": "audit_log",
389
+ "tableTo": "projects",
390
+ "columnsFrom": [
391
+ "project_id"
392
+ ],
393
+ "columnsTo": [
394
+ "id"
395
+ ],
396
+ "onDelete": "restrict",
397
+ "onUpdate": "no action"
398
+ },
399
+ "audit_log_environment_id_fkey": {
400
+ "name": "audit_log_environment_id_fkey",
401
+ "tableFrom": "audit_log",
402
+ "tableTo": "environments",
403
+ "columnsFrom": [
404
+ "environment_id"
405
+ ],
406
+ "columnsTo": [
407
+ "id"
408
+ ],
409
+ "onDelete": "restrict",
410
+ "onUpdate": "no action"
411
+ },
412
+ "audit_log_secret_id_fkey": {
413
+ "name": "audit_log_secret_id_fkey",
414
+ "tableFrom": "audit_log",
415
+ "tableTo": "secrets",
416
+ "columnsFrom": [
417
+ "secret_id"
418
+ ],
419
+ "columnsTo": [
420
+ "id"
421
+ ],
422
+ "onDelete": "restrict",
423
+ "onUpdate": "no action"
424
+ },
425
+ "audit_log_secret_version_id_fkey": {
426
+ "name": "audit_log_secret_version_id_fkey",
427
+ "tableFrom": "audit_log",
428
+ "tableTo": "secret_versions",
429
+ "columnsFrom": [
430
+ "secret_version_id"
431
+ ],
432
+ "columnsTo": [
433
+ "id"
434
+ ],
435
+ "onDelete": "restrict",
436
+ "onUpdate": "no action"
437
+ },
438
+ "audit_log_related_seq_fkey": {
439
+ "name": "audit_log_related_seq_fkey",
440
+ "tableFrom": "audit_log",
441
+ "tableTo": "audit_log",
442
+ "columnsFrom": [
443
+ "related_seq"
444
+ ],
445
+ "columnsTo": [
446
+ "seq"
447
+ ],
448
+ "onDelete": "restrict",
449
+ "onUpdate": "no action"
450
+ }
451
+ },
452
+ "compositePrimaryKeys": {},
453
+ "uniqueConstraints": {},
454
+ "policies": {},
455
+ "checkConstraints": {
456
+ "audit_log_author_check": {
457
+ "name": "audit_log_author_check",
458
+ "value": "\"audit_log\".\"author\" IN ('app', 'vault')"
459
+ },
460
+ "audit_log_actor_check": {
461
+ "name": "audit_log_actor_check",
462
+ "value": "\"audit_log\".\"actor\" ~ '^(user|token|sync|system):.+$'"
463
+ },
464
+ "audit_log_decision_check": {
465
+ "name": "audit_log_decision_check",
466
+ "value": "\"audit_log\".\"decision\" IN ('allow', 'deny')"
467
+ },
468
+ "audit_log_metadata_check": {
469
+ "name": "audit_log_metadata_check",
470
+ "value": "\"audit_log\".\"metadata\"::jsonb IS NOT NULL"
471
+ },
472
+ "audit_log_prev_hash_check": {
473
+ "name": "audit_log_prev_hash_check",
474
+ "value": "octet_length(\"audit_log\".\"prev_hash\") = 32"
475
+ },
476
+ "audit_log_mac_check": {
477
+ "name": "audit_log_mac_check",
478
+ "value": "octet_length(\"audit_log\".\"mac\") = 32"
479
+ },
480
+ "audit_log_hash_check": {
481
+ "name": "audit_log_hash_check",
482
+ "value": "octet_length(\"audit_log\".\"hash\") = 32"
483
+ }
484
+ },
485
+ "isRLSEnabled": false
486
+ },
487
+ "public.credentials": {
488
+ "name": "credentials",
489
+ "schema": "",
490
+ "columns": {
491
+ "id": {
492
+ "name": "id",
493
+ "type": "uuid",
494
+ "primaryKey": true,
495
+ "notNull": true,
496
+ "default": "gen_random_uuid()"
497
+ },
498
+ "kind": {
499
+ "name": "kind",
500
+ "type": "text",
501
+ "primaryKey": false,
502
+ "notNull": true
503
+ },
504
+ "auth_mac": {
505
+ "name": "auth_mac",
506
+ "type": "bytea",
507
+ "primaryKey": false,
508
+ "notNull": true
509
+ },
510
+ "token_hash": {
511
+ "name": "token_hash",
512
+ "type": "bytea",
513
+ "primaryKey": false,
514
+ "notNull": true
515
+ },
516
+ "token_hint": {
517
+ "name": "token_hint",
518
+ "type": "text",
519
+ "primaryKey": false,
520
+ "notNull": true
521
+ },
522
+ "generation": {
523
+ "name": "generation",
524
+ "type": "integer",
525
+ "primaryKey": false,
526
+ "notNull": true
527
+ },
528
+ "principal": {
529
+ "name": "principal",
530
+ "type": "text",
531
+ "primaryKey": false,
532
+ "notNull": true
533
+ },
534
+ "identity_id": {
535
+ "name": "identity_id",
536
+ "type": "uuid",
537
+ "primaryKey": false,
538
+ "notNull": false
539
+ },
540
+ "label": {
541
+ "name": "label",
542
+ "type": "text",
543
+ "primaryKey": false,
544
+ "notNull": false
545
+ },
546
+ "created_at": {
547
+ "name": "created_at",
548
+ "type": "timestamp with time zone",
549
+ "primaryKey": false,
550
+ "notNull": true,
551
+ "default": "now()"
552
+ },
553
+ "created_by": {
554
+ "name": "created_by",
555
+ "type": "text",
556
+ "primaryKey": false,
557
+ "notNull": true
558
+ },
559
+ "expires_at": {
560
+ "name": "expires_at",
561
+ "type": "timestamp with time zone",
562
+ "primaryKey": false,
563
+ "notNull": true
564
+ },
565
+ "last_used_at": {
566
+ "name": "last_used_at",
567
+ "type": "timestamp with time zone",
568
+ "primaryKey": false,
569
+ "notNull": false
570
+ },
571
+ "last_used_ip": {
572
+ "name": "last_used_ip",
573
+ "type": "text",
574
+ "primaryKey": false,
575
+ "notNull": false
576
+ },
577
+ "revoked_at": {
578
+ "name": "revoked_at",
579
+ "type": "timestamp with time zone",
580
+ "primaryKey": false,
581
+ "notNull": false
582
+ },
583
+ "revoked_by": {
584
+ "name": "revoked_by",
585
+ "type": "text",
586
+ "primaryKey": false,
587
+ "notNull": false
588
+ }
589
+ },
590
+ "indexes": {
591
+ "credentials_principal_idx": {
592
+ "name": "credentials_principal_idx",
593
+ "columns": [
594
+ {
595
+ "expression": "principal",
596
+ "isExpression": false,
597
+ "asc": true,
598
+ "nulls": "last"
599
+ },
600
+ {
601
+ "expression": "generation",
602
+ "isExpression": false,
603
+ "asc": true,
604
+ "nulls": "last"
605
+ }
606
+ ],
607
+ "isUnique": false,
608
+ "concurrently": false,
609
+ "method": "btree",
610
+ "with": {}
611
+ }
612
+ },
613
+ "foreignKeys": {
614
+ "credentials_principal_fkey": {
615
+ "name": "credentials_principal_fkey",
616
+ "tableFrom": "credentials",
617
+ "tableTo": "vault_members",
618
+ "columnsFrom": [
619
+ "principal"
620
+ ],
621
+ "columnsTo": [
622
+ "principal"
623
+ ],
624
+ "onDelete": "restrict",
625
+ "onUpdate": "no action"
626
+ },
627
+ "credentials_identity_id_fkey": {
628
+ "name": "credentials_identity_id_fkey",
629
+ "tableFrom": "credentials",
630
+ "tableTo": "identities",
631
+ "columnsFrom": [
632
+ "identity_id",
633
+ "principal",
634
+ "generation"
635
+ ],
636
+ "columnsTo": [
637
+ "id",
638
+ "principal",
639
+ "generation"
640
+ ],
641
+ "onDelete": "restrict",
642
+ "onUpdate": "no action"
643
+ }
644
+ },
645
+ "compositePrimaryKeys": {},
646
+ "uniqueConstraints": {
647
+ "credentials_token_hash_key": {
648
+ "name": "credentials_token_hash_key",
649
+ "nullsNotDistinct": false,
650
+ "columns": [
651
+ "token_hash"
652
+ ]
653
+ }
654
+ },
655
+ "policies": {},
656
+ "checkConstraints": {
657
+ "credentials_kind_check": {
658
+ "name": "credentials_kind_check",
659
+ "value": "\"credentials\".\"kind\" IN ('browser', 'cli', 'service')"
660
+ },
661
+ "credentials_principal_check": {
662
+ "name": "credentials_principal_check",
663
+ "value": "\"credentials\".\"principal\" LIKE 'user:%' OR \"credentials\".\"principal\" LIKE 'token:%'"
664
+ },
665
+ "credentials_kind_matches_principal": {
666
+ "name": "credentials_kind_matches_principal",
667
+ "value": "(\"credentials\".\"kind\" = 'service') = (\"credentials\".\"principal\" LIKE 'token:%')"
668
+ },
669
+ "credentials_token_hash_check": {
670
+ "name": "credentials_token_hash_check",
671
+ "value": "octet_length(\"credentials\".\"token_hash\") = 32"
672
+ },
673
+ "credentials_auth_mac_check": {
674
+ "name": "credentials_auth_mac_check",
675
+ "value": "octet_length(\"credentials\".\"auth_mac\") = 32"
676
+ }
677
+ },
678
+ "isRLSEnabled": false
679
+ },
680
+ "public.device_authorizations": {
681
+ "name": "device_authorizations",
682
+ "schema": "",
683
+ "columns": {
684
+ "id": {
685
+ "name": "id",
686
+ "type": "uuid",
687
+ "primaryKey": true,
688
+ "notNull": true,
689
+ "default": "gen_random_uuid()"
690
+ },
691
+ "device_code_hash": {
692
+ "name": "device_code_hash",
693
+ "type": "bytea",
694
+ "primaryKey": false,
695
+ "notNull": true
696
+ },
697
+ "auth_mac": {
698
+ "name": "auth_mac",
699
+ "type": "bytea",
700
+ "primaryKey": false,
701
+ "notNull": true
702
+ },
703
+ "user_code": {
704
+ "name": "user_code",
705
+ "type": "text",
706
+ "primaryKey": false,
707
+ "notNull": true
708
+ },
709
+ "client_label": {
710
+ "name": "client_label",
711
+ "type": "text",
712
+ "primaryKey": false,
713
+ "notNull": false
714
+ },
715
+ "client_ip": {
716
+ "name": "client_ip",
717
+ "type": "text",
718
+ "primaryKey": false,
719
+ "notNull": false
720
+ },
721
+ "created_at": {
722
+ "name": "created_at",
723
+ "type": "timestamp with time zone",
724
+ "primaryKey": false,
725
+ "notNull": true,
726
+ "default": "now()"
727
+ },
728
+ "expires_at": {
729
+ "name": "expires_at",
730
+ "type": "timestamp with time zone",
731
+ "primaryKey": false,
732
+ "notNull": true
733
+ },
734
+ "decided_at": {
735
+ "name": "decided_at",
736
+ "type": "timestamp with time zone",
737
+ "primaryKey": false,
738
+ "notNull": false
739
+ },
740
+ "decision": {
741
+ "name": "decision",
742
+ "type": "text",
743
+ "primaryKey": false,
744
+ "notNull": false
745
+ },
746
+ "generation": {
747
+ "name": "generation",
748
+ "type": "integer",
749
+ "primaryKey": false,
750
+ "notNull": true,
751
+ "default": 0
752
+ },
753
+ "principal": {
754
+ "name": "principal",
755
+ "type": "text",
756
+ "primaryKey": false,
757
+ "notNull": false
758
+ },
759
+ "consumed_at": {
760
+ "name": "consumed_at",
761
+ "type": "timestamp with time zone",
762
+ "primaryKey": false,
763
+ "notNull": false
764
+ }
765
+ },
766
+ "indexes": {},
767
+ "foreignKeys": {
768
+ "device_authorizations_principal_fkey": {
769
+ "name": "device_authorizations_principal_fkey",
770
+ "tableFrom": "device_authorizations",
771
+ "tableTo": "vault_members",
772
+ "columnsFrom": [
773
+ "principal"
774
+ ],
775
+ "columnsTo": [
776
+ "principal"
777
+ ],
778
+ "onDelete": "restrict",
779
+ "onUpdate": "no action"
780
+ }
781
+ },
782
+ "compositePrimaryKeys": {},
783
+ "uniqueConstraints": {
784
+ "device_authorizations_device_code_hash_key": {
785
+ "name": "device_authorizations_device_code_hash_key",
786
+ "nullsNotDistinct": false,
787
+ "columns": [
788
+ "device_code_hash"
789
+ ]
790
+ },
791
+ "device_authorizations_user_code_key": {
792
+ "name": "device_authorizations_user_code_key",
793
+ "nullsNotDistinct": false,
794
+ "columns": [
795
+ "user_code"
796
+ ]
797
+ }
798
+ },
799
+ "policies": {},
800
+ "checkConstraints": {
801
+ "device_authorizations_auth_mac_check": {
802
+ "name": "device_authorizations_auth_mac_check",
803
+ "value": "octet_length(\"device_authorizations\".\"auth_mac\") = 32"
804
+ },
805
+ "device_authorizations_decision_check": {
806
+ "name": "device_authorizations_decision_check",
807
+ "value": "\"device_authorizations\".\"decision\" IS NULL OR \"device_authorizations\".\"decision\" IN ('approved', 'denied')"
808
+ },
809
+ "device_authorizations_approval_names_principal": {
810
+ "name": "device_authorizations_approval_names_principal",
811
+ "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 ))"
812
+ }
813
+ },
814
+ "isRLSEnabled": false
815
+ },
816
+ "public.environments": {
817
+ "name": "environments",
818
+ "schema": "",
819
+ "columns": {
820
+ "id": {
821
+ "name": "id",
822
+ "type": "uuid",
823
+ "primaryKey": true,
824
+ "notNull": true,
825
+ "default": "gen_random_uuid()"
826
+ },
827
+ "project_id": {
828
+ "name": "project_id",
829
+ "type": "uuid",
830
+ "primaryKey": false,
831
+ "notNull": true
832
+ },
833
+ "slug": {
834
+ "name": "slug",
835
+ "type": "text",
836
+ "primaryKey": false,
837
+ "notNull": true
838
+ },
839
+ "name": {
840
+ "name": "name",
841
+ "type": "text",
842
+ "primaryKey": false,
843
+ "notNull": true
844
+ },
845
+ "created_at": {
846
+ "name": "created_at",
847
+ "type": "timestamp with time zone",
848
+ "primaryKey": false,
849
+ "notNull": true,
850
+ "default": "now()"
851
+ },
852
+ "archived_at": {
853
+ "name": "archived_at",
854
+ "type": "timestamp with time zone",
855
+ "primaryKey": false,
856
+ "notNull": false
857
+ }
858
+ },
859
+ "indexes": {},
860
+ "foreignKeys": {
861
+ "environments_project_id_fkey": {
862
+ "name": "environments_project_id_fkey",
863
+ "tableFrom": "environments",
864
+ "tableTo": "projects",
865
+ "columnsFrom": [
866
+ "project_id"
867
+ ],
868
+ "columnsTo": [
869
+ "id"
870
+ ],
871
+ "onDelete": "restrict",
872
+ "onUpdate": "no action"
873
+ }
874
+ },
875
+ "compositePrimaryKeys": {},
876
+ "uniqueConstraints": {
877
+ "environments_project_id_slug_key": {
878
+ "name": "environments_project_id_slug_key",
879
+ "nullsNotDistinct": false,
880
+ "columns": [
881
+ "project_id",
882
+ "slug"
883
+ ]
884
+ },
885
+ "environments_project_scoped": {
886
+ "name": "environments_project_scoped",
887
+ "nullsNotDistinct": false,
888
+ "columns": [
889
+ "id",
890
+ "project_id"
891
+ ]
892
+ }
893
+ },
894
+ "policies": {},
895
+ "checkConstraints": {
896
+ "environments_slug_check": {
897
+ "name": "environments_slug_check",
898
+ "value": "\"environments\".\"slug\" ~ '^[a-z0-9][a-z0-9-]{0,62}$'"
899
+ }
900
+ },
901
+ "isRLSEnabled": false
902
+ },
903
+ "public.identities": {
904
+ "name": "identities",
905
+ "schema": "",
906
+ "columns": {
907
+ "id": {
908
+ "name": "id",
909
+ "type": "uuid",
910
+ "primaryKey": true,
911
+ "notNull": true,
912
+ "default": "gen_random_uuid()"
913
+ },
914
+ "provider": {
915
+ "name": "provider",
916
+ "type": "text",
917
+ "primaryKey": false,
918
+ "notNull": true
919
+ },
920
+ "auth_mac": {
921
+ "name": "auth_mac",
922
+ "type": "bytea",
923
+ "primaryKey": false,
924
+ "notNull": true
925
+ },
926
+ "subject": {
927
+ "name": "subject",
928
+ "type": "text",
929
+ "primaryKey": false,
930
+ "notNull": true
931
+ },
932
+ "issuer_hash": {
933
+ "name": "issuer_hash",
934
+ "type": "text",
935
+ "primaryKey": false,
936
+ "notNull": true
937
+ },
938
+ "generation": {
939
+ "name": "generation",
940
+ "type": "integer",
941
+ "primaryKey": false,
942
+ "notNull": true
943
+ },
944
+ "principal": {
945
+ "name": "principal",
946
+ "type": "text",
947
+ "primaryKey": false,
948
+ "notNull": true
949
+ },
950
+ "email": {
951
+ "name": "email",
952
+ "type": "text",
953
+ "primaryKey": false,
954
+ "notNull": false
955
+ },
956
+ "created_at": {
957
+ "name": "created_at",
958
+ "type": "timestamp with time zone",
959
+ "primaryKey": false,
960
+ "notNull": true,
961
+ "default": "now()"
962
+ },
963
+ "created_by": {
964
+ "name": "created_by",
965
+ "type": "text",
966
+ "primaryKey": false,
967
+ "notNull": true
968
+ },
969
+ "last_sign_in_at": {
970
+ "name": "last_sign_in_at",
971
+ "type": "timestamp with time zone",
972
+ "primaryKey": false,
973
+ "notNull": false
974
+ },
975
+ "revoked_at": {
976
+ "name": "revoked_at",
977
+ "type": "timestamp with time zone",
978
+ "primaryKey": false,
979
+ "notNull": false
980
+ },
981
+ "revoked_by": {
982
+ "name": "revoked_by",
983
+ "type": "text",
984
+ "primaryKey": false,
985
+ "notNull": false
986
+ },
987
+ "active_subject": {
988
+ "name": "active_subject",
989
+ "type": "text",
990
+ "primaryKey": false,
991
+ "notNull": false,
992
+ "generated": {
993
+ "as": "CASE WHEN revoked_at IS NULL THEN subject END",
994
+ "type": "stored"
995
+ }
996
+ }
997
+ },
998
+ "indexes": {
999
+ "identities_active_subject": {
1000
+ "name": "identities_active_subject",
1001
+ "columns": [
1002
+ {
1003
+ "expression": "provider",
1004
+ "isExpression": false,
1005
+ "asc": true,
1006
+ "nulls": "last"
1007
+ },
1008
+ {
1009
+ "expression": "issuer_hash",
1010
+ "isExpression": false,
1011
+ "asc": true,
1012
+ "nulls": "last"
1013
+ },
1014
+ {
1015
+ "expression": "active_subject",
1016
+ "isExpression": false,
1017
+ "asc": true,
1018
+ "nulls": "last"
1019
+ }
1020
+ ],
1021
+ "isUnique": true,
1022
+ "concurrently": false,
1023
+ "method": "btree",
1024
+ "with": {}
1025
+ },
1026
+ "identities_principal_idx": {
1027
+ "name": "identities_principal_idx",
1028
+ "columns": [
1029
+ {
1030
+ "expression": "principal",
1031
+ "isExpression": false,
1032
+ "asc": true,
1033
+ "nulls": "last"
1034
+ },
1035
+ {
1036
+ "expression": "generation",
1037
+ "isExpression": false,
1038
+ "asc": true,
1039
+ "nulls": "last"
1040
+ }
1041
+ ],
1042
+ "isUnique": false,
1043
+ "concurrently": false,
1044
+ "method": "btree",
1045
+ "with": {}
1046
+ }
1047
+ },
1048
+ "foreignKeys": {
1049
+ "identities_principal_fkey": {
1050
+ "name": "identities_principal_fkey",
1051
+ "tableFrom": "identities",
1052
+ "tableTo": "vault_members",
1053
+ "columnsFrom": [
1054
+ "principal"
1055
+ ],
1056
+ "columnsTo": [
1057
+ "principal"
1058
+ ],
1059
+ "onDelete": "restrict",
1060
+ "onUpdate": "no action"
1061
+ }
1062
+ },
1063
+ "compositePrimaryKeys": {},
1064
+ "uniqueConstraints": {
1065
+ "identities_member_generation_key": {
1066
+ "name": "identities_member_generation_key",
1067
+ "nullsNotDistinct": false,
1068
+ "columns": [
1069
+ "id",
1070
+ "principal",
1071
+ "generation"
1072
+ ]
1073
+ }
1074
+ },
1075
+ "policies": {},
1076
+ "checkConstraints": {
1077
+ "identities_principal_check": {
1078
+ "name": "identities_principal_check",
1079
+ "value": "\"identities\".\"principal\" LIKE 'user:%'"
1080
+ },
1081
+ "identities_provider_check": {
1082
+ "name": "identities_provider_check",
1083
+ "value": "\"identities\".\"provider\" ~ '^[a-z0-9][a-z0-9-]{0,31}$'"
1084
+ },
1085
+ "identities_auth_mac_check": {
1086
+ "name": "identities_auth_mac_check",
1087
+ "value": "octet_length(\"identities\".\"auth_mac\") = 32"
1088
+ }
1089
+ },
1090
+ "isRLSEnabled": false
1091
+ },
1092
+ "public.projects": {
1093
+ "name": "projects",
1094
+ "schema": "",
1095
+ "columns": {
1096
+ "id": {
1097
+ "name": "id",
1098
+ "type": "uuid",
1099
+ "primaryKey": true,
1100
+ "notNull": true,
1101
+ "default": "gen_random_uuid()"
1102
+ },
1103
+ "slug": {
1104
+ "name": "slug",
1105
+ "type": "text",
1106
+ "primaryKey": false,
1107
+ "notNull": true
1108
+ },
1109
+ "name": {
1110
+ "name": "name",
1111
+ "type": "text",
1112
+ "primaryKey": false,
1113
+ "notNull": true
1114
+ },
1115
+ "created_at": {
1116
+ "name": "created_at",
1117
+ "type": "timestamp with time zone",
1118
+ "primaryKey": false,
1119
+ "notNull": true,
1120
+ "default": "now()"
1121
+ },
1122
+ "archived_at": {
1123
+ "name": "archived_at",
1124
+ "type": "timestamp with time zone",
1125
+ "primaryKey": false,
1126
+ "notNull": false
1127
+ }
1128
+ },
1129
+ "indexes": {},
1130
+ "foreignKeys": {},
1131
+ "compositePrimaryKeys": {},
1132
+ "uniqueConstraints": {
1133
+ "projects_slug_key": {
1134
+ "name": "projects_slug_key",
1135
+ "nullsNotDistinct": false,
1136
+ "columns": [
1137
+ "slug"
1138
+ ]
1139
+ }
1140
+ },
1141
+ "policies": {},
1142
+ "checkConstraints": {
1143
+ "projects_slug_check": {
1144
+ "name": "projects_slug_check",
1145
+ "value": "\"projects\".\"slug\" ~ '^[a-z0-9][a-z0-9-]{0,62}$'"
1146
+ }
1147
+ },
1148
+ "isRLSEnabled": false
1149
+ },
1150
+ "public.secret_versions": {
1151
+ "name": "secret_versions",
1152
+ "schema": "",
1153
+ "columns": {
1154
+ "id": {
1155
+ "name": "id",
1156
+ "type": "uuid",
1157
+ "primaryKey": true,
1158
+ "notNull": true,
1159
+ "default": "gen_random_uuid()"
1160
+ },
1161
+ "secret_id": {
1162
+ "name": "secret_id",
1163
+ "type": "uuid",
1164
+ "primaryKey": false,
1165
+ "notNull": true
1166
+ },
1167
+ "version": {
1168
+ "name": "version",
1169
+ "type": "integer",
1170
+ "primaryKey": false,
1171
+ "notNull": true
1172
+ },
1173
+ "envelope_version": {
1174
+ "name": "envelope_version",
1175
+ "type": "integer",
1176
+ "primaryKey": false,
1177
+ "notNull": true
1178
+ },
1179
+ "ciphertext": {
1180
+ "name": "ciphertext",
1181
+ "type": "bytea",
1182
+ "primaryKey": false,
1183
+ "notNull": true
1184
+ },
1185
+ "iv": {
1186
+ "name": "iv",
1187
+ "type": "bytea",
1188
+ "primaryKey": false,
1189
+ "notNull": true
1190
+ },
1191
+ "auth_tag": {
1192
+ "name": "auth_tag",
1193
+ "type": "bytea",
1194
+ "primaryKey": false,
1195
+ "notNull": true
1196
+ },
1197
+ "wrapped_dek": {
1198
+ "name": "wrapped_dek",
1199
+ "type": "bytea",
1200
+ "primaryKey": false,
1201
+ "notNull": true
1202
+ },
1203
+ "kek_provider": {
1204
+ "name": "kek_provider",
1205
+ "type": "text",
1206
+ "primaryKey": false,
1207
+ "notNull": true
1208
+ },
1209
+ "kek_id": {
1210
+ "name": "kek_id",
1211
+ "type": "text",
1212
+ "primaryKey": false,
1213
+ "notNull": true
1214
+ },
1215
+ "kek_version": {
1216
+ "name": "kek_version",
1217
+ "type": "text",
1218
+ "primaryKey": false,
1219
+ "notNull": true
1220
+ },
1221
+ "created_at": {
1222
+ "name": "created_at",
1223
+ "type": "timestamp with time zone",
1224
+ "primaryKey": false,
1225
+ "notNull": true,
1226
+ "default": "now()"
1227
+ },
1228
+ "created_by": {
1229
+ "name": "created_by",
1230
+ "type": "text",
1231
+ "primaryKey": false,
1232
+ "notNull": true
1233
+ }
1234
+ },
1235
+ "indexes": {
1236
+ "secret_versions_secret_idx": {
1237
+ "name": "secret_versions_secret_idx",
1238
+ "columns": [
1239
+ {
1240
+ "expression": "secret_id",
1241
+ "isExpression": false,
1242
+ "asc": true,
1243
+ "nulls": "last"
1244
+ },
1245
+ {
1246
+ "expression": "version",
1247
+ "isExpression": false,
1248
+ "asc": false,
1249
+ "nulls": "last"
1250
+ }
1251
+ ],
1252
+ "isUnique": false,
1253
+ "concurrently": false,
1254
+ "method": "btree",
1255
+ "with": {}
1256
+ }
1257
+ },
1258
+ "foreignKeys": {
1259
+ "secret_versions_secret_id_fkey": {
1260
+ "name": "secret_versions_secret_id_fkey",
1261
+ "tableFrom": "secret_versions",
1262
+ "tableTo": "secrets",
1263
+ "columnsFrom": [
1264
+ "secret_id"
1265
+ ],
1266
+ "columnsTo": [
1267
+ "id"
1268
+ ],
1269
+ "onDelete": "restrict",
1270
+ "onUpdate": "no action"
1271
+ }
1272
+ },
1273
+ "compositePrimaryKeys": {},
1274
+ "uniqueConstraints": {
1275
+ "secret_versions_secret_id_version_key": {
1276
+ "name": "secret_versions_secret_id_version_key",
1277
+ "nullsNotDistinct": false,
1278
+ "columns": [
1279
+ "secret_id",
1280
+ "version"
1281
+ ]
1282
+ }
1283
+ },
1284
+ "policies": {},
1285
+ "checkConstraints": {
1286
+ "secret_versions_version_check": {
1287
+ "name": "secret_versions_version_check",
1288
+ "value": "\"secret_versions\".\"version\" > 0"
1289
+ },
1290
+ "secret_versions_iv_check": {
1291
+ "name": "secret_versions_iv_check",
1292
+ "value": "octet_length(\"secret_versions\".\"iv\") = 12"
1293
+ },
1294
+ "secret_versions_auth_tag_check": {
1295
+ "name": "secret_versions_auth_tag_check",
1296
+ "value": "octet_length(\"secret_versions\".\"auth_tag\") = 16"
1297
+ }
1298
+ },
1299
+ "isRLSEnabled": false
1300
+ },
1301
+ "public.secrets": {
1302
+ "name": "secrets",
1303
+ "schema": "",
1304
+ "columns": {
1305
+ "id": {
1306
+ "name": "id",
1307
+ "type": "uuid",
1308
+ "primaryKey": true,
1309
+ "notNull": true,
1310
+ "default": "gen_random_uuid()"
1311
+ },
1312
+ "project_id": {
1313
+ "name": "project_id",
1314
+ "type": "uuid",
1315
+ "primaryKey": false,
1316
+ "notNull": true
1317
+ },
1318
+ "environment_id": {
1319
+ "name": "environment_id",
1320
+ "type": "uuid",
1321
+ "primaryKey": false,
1322
+ "notNull": true
1323
+ },
1324
+ "key": {
1325
+ "name": "key",
1326
+ "type": "text",
1327
+ "primaryKey": false,
1328
+ "notNull": true
1329
+ },
1330
+ "created_at": {
1331
+ "name": "created_at",
1332
+ "type": "timestamp with time zone",
1333
+ "primaryKey": false,
1334
+ "notNull": true,
1335
+ "default": "now()"
1336
+ },
1337
+ "updated_at": {
1338
+ "name": "updated_at",
1339
+ "type": "timestamp with time zone",
1340
+ "primaryKey": false,
1341
+ "notNull": true,
1342
+ "default": "now()"
1343
+ },
1344
+ "current_version_id": {
1345
+ "name": "current_version_id",
1346
+ "type": "uuid",
1347
+ "primaryKey": false,
1348
+ "notNull": false
1349
+ },
1350
+ "current_version": {
1351
+ "name": "current_version",
1352
+ "type": "integer",
1353
+ "primaryKey": false,
1354
+ "notNull": true,
1355
+ "default": 0
1356
+ },
1357
+ "archived_at": {
1358
+ "name": "archived_at",
1359
+ "type": "timestamp with time zone",
1360
+ "primaryKey": false,
1361
+ "notNull": false
1362
+ }
1363
+ },
1364
+ "indexes": {
1365
+ "secrets_lookup_idx": {
1366
+ "name": "secrets_lookup_idx",
1367
+ "columns": [
1368
+ {
1369
+ "expression": "project_id",
1370
+ "isExpression": false,
1371
+ "asc": true,
1372
+ "nulls": "last"
1373
+ },
1374
+ {
1375
+ "expression": "environment_id",
1376
+ "isExpression": false,
1377
+ "asc": true,
1378
+ "nulls": "last"
1379
+ },
1380
+ {
1381
+ "expression": "key",
1382
+ "isExpression": false,
1383
+ "asc": true,
1384
+ "nulls": "last"
1385
+ }
1386
+ ],
1387
+ "isUnique": false,
1388
+ "concurrently": false,
1389
+ "method": "btree",
1390
+ "with": {}
1391
+ }
1392
+ },
1393
+ "foreignKeys": {
1394
+ "secrets_current_version_id_secret_versions_id_fk": {
1395
+ "name": "secrets_current_version_id_secret_versions_id_fk",
1396
+ "tableFrom": "secrets",
1397
+ "tableTo": "secret_versions",
1398
+ "columnsFrom": [
1399
+ "current_version_id"
1400
+ ],
1401
+ "columnsTo": [
1402
+ "id"
1403
+ ],
1404
+ "onDelete": "no action",
1405
+ "onUpdate": "no action"
1406
+ },
1407
+ "secrets_project_id_fkey": {
1408
+ "name": "secrets_project_id_fkey",
1409
+ "tableFrom": "secrets",
1410
+ "tableTo": "projects",
1411
+ "columnsFrom": [
1412
+ "project_id"
1413
+ ],
1414
+ "columnsTo": [
1415
+ "id"
1416
+ ],
1417
+ "onDelete": "restrict",
1418
+ "onUpdate": "no action"
1419
+ },
1420
+ "secrets_environment_id_fkey": {
1421
+ "name": "secrets_environment_id_fkey",
1422
+ "tableFrom": "secrets",
1423
+ "tableTo": "environments",
1424
+ "columnsFrom": [
1425
+ "environment_id"
1426
+ ],
1427
+ "columnsTo": [
1428
+ "id"
1429
+ ],
1430
+ "onDelete": "restrict",
1431
+ "onUpdate": "no action"
1432
+ },
1433
+ "secrets_environment_in_project": {
1434
+ "name": "secrets_environment_in_project",
1435
+ "tableFrom": "secrets",
1436
+ "tableTo": "environments",
1437
+ "columnsFrom": [
1438
+ "environment_id",
1439
+ "project_id"
1440
+ ],
1441
+ "columnsTo": [
1442
+ "id",
1443
+ "project_id"
1444
+ ],
1445
+ "onDelete": "no action",
1446
+ "onUpdate": "no action"
1447
+ }
1448
+ },
1449
+ "compositePrimaryKeys": {},
1450
+ "uniqueConstraints": {
1451
+ "secrets_project_id_environment_id_key_key": {
1452
+ "name": "secrets_project_id_environment_id_key_key",
1453
+ "nullsNotDistinct": false,
1454
+ "columns": [
1455
+ "project_id",
1456
+ "environment_id",
1457
+ "key"
1458
+ ]
1459
+ }
1460
+ },
1461
+ "policies": {},
1462
+ "checkConstraints": {
1463
+ "secrets_key_check": {
1464
+ "name": "secrets_key_check",
1465
+ "value": "\"secrets\".\"key\" ~ '^[A-Za-z_][A-Za-z0-9_]{0,127}$'"
1466
+ }
1467
+ },
1468
+ "isRLSEnabled": false
1469
+ },
1470
+ "public.vault_grants": {
1471
+ "name": "vault_grants",
1472
+ "schema": "",
1473
+ "columns": {
1474
+ "principal": {
1475
+ "name": "principal",
1476
+ "type": "text",
1477
+ "primaryKey": false,
1478
+ "notNull": true
1479
+ },
1480
+ "project_id": {
1481
+ "name": "project_id",
1482
+ "type": "uuid",
1483
+ "primaryKey": false,
1484
+ "notNull": false
1485
+ },
1486
+ "environment_id": {
1487
+ "name": "environment_id",
1488
+ "type": "uuid",
1489
+ "primaryKey": false,
1490
+ "notNull": false
1491
+ },
1492
+ "role": {
1493
+ "name": "role",
1494
+ "type": "text",
1495
+ "primaryKey": false,
1496
+ "notNull": true
1497
+ },
1498
+ "expires_at": {
1499
+ "name": "expires_at",
1500
+ "type": "bigint",
1501
+ "primaryKey": false,
1502
+ "notNull": false
1503
+ },
1504
+ "granted_at": {
1505
+ "name": "granted_at",
1506
+ "type": "bigint",
1507
+ "primaryKey": false,
1508
+ "notNull": true
1509
+ },
1510
+ "granted_by": {
1511
+ "name": "granted_by",
1512
+ "type": "text",
1513
+ "primaryKey": false,
1514
+ "notNull": true
1515
+ }
1516
+ },
1517
+ "indexes": {},
1518
+ "foreignKeys": {
1519
+ "vault_grants_principal_fkey": {
1520
+ "name": "vault_grants_principal_fkey",
1521
+ "tableFrom": "vault_grants",
1522
+ "tableTo": "vault_members",
1523
+ "columnsFrom": [
1524
+ "principal"
1525
+ ],
1526
+ "columnsTo": [
1527
+ "principal"
1528
+ ],
1529
+ "onDelete": "restrict",
1530
+ "onUpdate": "no action"
1531
+ },
1532
+ "vault_grants_project_id_fkey": {
1533
+ "name": "vault_grants_project_id_fkey",
1534
+ "tableFrom": "vault_grants",
1535
+ "tableTo": "projects",
1536
+ "columnsFrom": [
1537
+ "project_id"
1538
+ ],
1539
+ "columnsTo": [
1540
+ "id"
1541
+ ],
1542
+ "onDelete": "restrict",
1543
+ "onUpdate": "no action"
1544
+ },
1545
+ "vault_grants_environment_id_fkey": {
1546
+ "name": "vault_grants_environment_id_fkey",
1547
+ "tableFrom": "vault_grants",
1548
+ "tableTo": "environments",
1549
+ "columnsFrom": [
1550
+ "environment_id"
1551
+ ],
1552
+ "columnsTo": [
1553
+ "id"
1554
+ ],
1555
+ "onDelete": "restrict",
1556
+ "onUpdate": "no action"
1557
+ }
1558
+ },
1559
+ "compositePrimaryKeys": {},
1560
+ "uniqueConstraints": {
1561
+ "vault_grants_on_project": {
1562
+ "name": "vault_grants_on_project",
1563
+ "nullsNotDistinct": false,
1564
+ "columns": [
1565
+ "principal",
1566
+ "project_id"
1567
+ ]
1568
+ },
1569
+ "vault_grants_on_environment": {
1570
+ "name": "vault_grants_on_environment",
1571
+ "nullsNotDistinct": false,
1572
+ "columns": [
1573
+ "principal",
1574
+ "environment_id"
1575
+ ]
1576
+ }
1577
+ },
1578
+ "policies": {},
1579
+ "checkConstraints": {
1580
+ "vault_grants_one_place": {
1581
+ "name": "vault_grants_one_place",
1582
+ "value": "(\"vault_grants\".\"project_id\" IS NULL) <> (\"vault_grants\".\"environment_id\" IS NULL)"
1583
+ },
1584
+ "vault_grants_role_check": {
1585
+ "name": "vault_grants_role_check",
1586
+ "value": "\"vault_grants\".\"role\" IN ('viewer', 'developer', 'maintainer', 'access-manager', 'auditor', 'owner')"
1587
+ },
1588
+ "vault_grants_environment_role_check": {
1589
+ "name": "vault_grants_environment_role_check",
1590
+ "value": "\"vault_grants\".\"environment_id\" IS NULL OR \"vault_grants\".\"role\" IN ('viewer', 'developer', 'auditor')"
1591
+ }
1592
+ },
1593
+ "isRLSEnabled": false
1594
+ },
1595
+ "public.vault_members": {
1596
+ "name": "vault_members",
1597
+ "schema": "",
1598
+ "columns": {
1599
+ "principal": {
1600
+ "name": "principal",
1601
+ "type": "text",
1602
+ "primaryKey": true,
1603
+ "notNull": true
1604
+ },
1605
+ "status": {
1606
+ "name": "status",
1607
+ "type": "text",
1608
+ "primaryKey": false,
1609
+ "notNull": true
1610
+ },
1611
+ "owner": {
1612
+ "name": "owner",
1613
+ "type": "boolean",
1614
+ "primaryKey": false,
1615
+ "notNull": true,
1616
+ "default": false
1617
+ },
1618
+ "generation": {
1619
+ "name": "generation",
1620
+ "type": "integer",
1621
+ "primaryKey": false,
1622
+ "notNull": true,
1623
+ "default": 0
1624
+ },
1625
+ "created_at": {
1626
+ "name": "created_at",
1627
+ "type": "bigint",
1628
+ "primaryKey": false,
1629
+ "notNull": true
1630
+ },
1631
+ "created_by": {
1632
+ "name": "created_by",
1633
+ "type": "text",
1634
+ "primaryKey": false,
1635
+ "notNull": true
1636
+ },
1637
+ "status_changed_at": {
1638
+ "name": "status_changed_at",
1639
+ "type": "bigint",
1640
+ "primaryKey": false,
1641
+ "notNull": true
1642
+ },
1643
+ "status_changed_by": {
1644
+ "name": "status_changed_by",
1645
+ "type": "text",
1646
+ "primaryKey": false,
1647
+ "notNull": true
1648
+ },
1649
+ "access_seq": {
1650
+ "name": "access_seq",
1651
+ "type": "bigint",
1652
+ "primaryKey": false,
1653
+ "notNull": true
1654
+ },
1655
+ "mac": {
1656
+ "name": "mac",
1657
+ "type": "bytea",
1658
+ "primaryKey": false,
1659
+ "notNull": true
1660
+ }
1661
+ },
1662
+ "indexes": {},
1663
+ "foreignKeys": {},
1664
+ "compositePrimaryKeys": {},
1665
+ "uniqueConstraints": {},
1666
+ "policies": {},
1667
+ "checkConstraints": {
1668
+ "vault_members_mac_check": {
1669
+ "name": "vault_members_mac_check",
1670
+ "value": "octet_length(\"vault_members\".\"mac\") = 32"
1671
+ },
1672
+ "vault_members_principal_check": {
1673
+ "name": "vault_members_principal_check",
1674
+ "value": "\"vault_members\".\"principal\" ~ '^(user|token|sync):[^[:space:]:][^[:space:]]*$'"
1675
+ },
1676
+ "vault_members_user_lowercase": {
1677
+ "name": "vault_members_user_lowercase",
1678
+ "value": "\"vault_members\".\"principal\" NOT LIKE 'user:%' OR \"vault_members\".\"principal\" = lower(\"vault_members\".\"principal\")"
1679
+ },
1680
+ "vault_members_status_check": {
1681
+ "name": "vault_members_status_check",
1682
+ "value": "\"vault_members\".\"status\" IN ('active', 'removed')"
1683
+ },
1684
+ "vault_members_owner_check": {
1685
+ "name": "vault_members_owner_check",
1686
+ "value": "NOT \"vault_members\".\"owner\" OR (\"vault_members\".\"status\" = 'active' AND \"vault_members\".\"principal\" LIKE 'user:%')"
1687
+ },
1688
+ "vault_members_generation_check": {
1689
+ "name": "vault_members_generation_check",
1690
+ "value": "\"vault_members\".\"generation\" >= 0"
1691
+ }
1692
+ },
1693
+ "isRLSEnabled": false
1694
+ }
1695
+ },
1696
+ "enums": {},
1697
+ "schemas": {},
1698
+ "sequences": {},
1699
+ "roles": {},
1700
+ "policies": {},
1701
+ "views": {},
1702
+ "_meta": {
1703
+ "columns": {},
1704
+ "schemas": {},
1705
+ "tables": {}
1706
+ }
1707
+ }