@coffre/db 0.14.4 → 0.15.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 (218) hide show
  1. package/README.md +2 -1
  2. package/dist/change-records-_fKvahvs.js +55 -0
  3. package/dist/connect.d.ts +22 -10
  4. package/dist/connect.js +74 -12
  5. package/dist/database-CVteLhp1.d.ts +410 -0
  6. package/dist/{database-BadNeeN-.js → database-D55ENPX-.js} +46 -25
  7. package/dist/dialect.d.ts +4 -3
  8. package/dist/dialect.js +14 -5
  9. package/dist/grants.d.ts +4 -4
  10. package/dist/grants.js +4 -4
  11. package/dist/hyperdrive.d.ts +48 -23
  12. package/dist/hyperdrive.js +168 -91
  13. package/dist/index.d.ts +3 -3
  14. package/dist/index.js +1 -1
  15. package/dist/log-DaD7fyUq.d.ts +722 -0
  16. package/dist/log.d.ts +2 -596
  17. package/dist/log.js +224 -10
  18. package/dist/migrate.d.ts +43 -3
  19. package/dist/migrate.js +149 -29
  20. package/dist/migrations/postgres/0021_prune_vault_releases.sql +19 -0
  21. package/dist/migrations/postgres/0022_log_015.sql +672 -0
  22. package/dist/migrations/postgres/0023_change_path.sql +153 -0
  23. package/dist/migrations/postgres/0024_use_015.sql +556 -0
  24. package/dist/migrations/postgres/0025_app_change.sql +221 -0
  25. package/dist/migrations/postgres/0026_issue_lock.sql +106 -0
  26. package/dist/migrations/postgres/0027_retention.sql +118 -0
  27. package/dist/migrations/postgres/0028_use_stalls.sql +594 -0
  28. package/dist/migrations/postgres/0029_use_objects.sql +887 -0
  29. package/dist/migrations/postgres/0030_unarchive_restores.sql +259 -0
  30. package/dist/migrations/postgres/0031_app_read.sql +65 -0
  31. package/dist/migrations/postgres/0032_secrets_live_index.sql +4 -0
  32. package/dist/migrations/postgres/0033_use_generations.sql +582 -0
  33. package/dist/migrations/postgres/0034_vault_credentials.sql +153 -0
  34. package/dist/migrations/postgres/0035_first_days.sql +3 -0
  35. package/dist/migrations/postgres/0036_vault_issues.sql +91 -0
  36. package/dist/migrations/postgres/0037_vault_bindings.sql +271 -0
  37. package/dist/migrations/postgres/0040_binding_origin.sql +159 -0
  38. package/dist/migrations/postgres/0041_cutover.sql +132 -0
  39. package/dist/migrations/postgres/0042_sign_in_index.sql +7 -0
  40. package/dist/migrations/postgres/0043_issue_revoke_index.sql +4 -0
  41. package/dist/migrations/postgres/0044_use_by_name.sql +705 -0
  42. package/dist/migrations/postgres/0045_decide_first.sql +878 -0
  43. package/dist/migrations/postgres/0046_way_in_uses.sql +1149 -0
  44. package/dist/migrations/postgres/0047_cutover_finish.sql +268 -0
  45. package/dist/migrations/postgres/0048_use_batch.sql +59 -0
  46. package/dist/migrations/postgres/0049_reads.sql +171 -0
  47. package/dist/migrations/postgres/meta/0021_snapshot.json +3334 -0
  48. package/dist/migrations/postgres/meta/0022_snapshot.json +3831 -0
  49. package/dist/migrations/postgres/meta/0023_snapshot.json +3831 -0
  50. package/dist/migrations/postgres/meta/0024_snapshot.json +3831 -0
  51. package/dist/migrations/postgres/meta/0025_snapshot.json +3831 -0
  52. package/dist/migrations/postgres/meta/0026_snapshot.json +3831 -0
  53. package/dist/migrations/postgres/meta/0027_snapshot.json +3853 -0
  54. package/dist/migrations/postgres/meta/0028_snapshot.json +3853 -0
  55. package/dist/migrations/postgres/meta/0029_snapshot.json +3859 -0
  56. package/dist/migrations/postgres/meta/0030_snapshot.json +3859 -0
  57. package/dist/migrations/postgres/meta/0031_snapshot.json +3859 -0
  58. package/dist/migrations/postgres/meta/0032_snapshot.json +3875 -0
  59. package/dist/migrations/postgres/meta/0033_snapshot.json +3875 -0
  60. package/dist/migrations/postgres/meta/0034_snapshot.json +3875 -0
  61. package/dist/migrations/postgres/meta/0035_snapshot.json +3875 -0
  62. package/dist/migrations/postgres/meta/0036_snapshot.json +3875 -0
  63. package/dist/migrations/postgres/meta/0037_snapshot.json +3875 -0
  64. package/dist/migrations/postgres/meta/0038_snapshot.json +3881 -0
  65. package/dist/migrations/postgres/meta/0039_snapshot.json +3881 -0
  66. package/dist/migrations/postgres/meta/0040_snapshot.json +3931 -0
  67. package/dist/migrations/postgres/meta/0041_snapshot.json +3981 -0
  68. package/dist/migrations/postgres/meta/0042_snapshot.json +3981 -0
  69. package/dist/migrations/postgres/meta/0043_snapshot.json +3981 -0
  70. package/dist/migrations/postgres/meta/0044_snapshot.json +3991 -0
  71. package/dist/migrations/postgres/meta/0045_snapshot.json +3997 -0
  72. package/dist/migrations/postgres/meta/0046_snapshot.json +3997 -0
  73. package/dist/migrations/postgres/meta/0047_snapshot.json +4234 -0
  74. package/dist/migrations/postgres/meta/_journal.json +189 -0
  75. package/dist/migrations/sqlite/0018_log_015.sql +84 -0
  76. package/dist/migrations/sqlite/0019_retention.sql +2 -0
  77. package/dist/migrations/sqlite/0020_ended_references.sql +1 -0
  78. package/dist/migrations/sqlite/0021_secrets_live_index.sql +1 -0
  79. package/dist/migrations/sqlite/0022_binding_origin.sql +1 -0
  80. package/dist/migrations/sqlite/0023_sign_in_index.sql +2 -0
  81. package/dist/migrations/sqlite/0024_issue_revoke_index.sql +2 -0
  82. package/dist/migrations/sqlite/0025_way_in_uses.sql +42 -0
  83. package/dist/migrations/sqlite/0026_cutover_finish.sql +11 -0
  84. package/dist/migrations/sqlite/0027_reads.sql +38 -0
  85. package/dist/migrations/sqlite/meta/0018_snapshot.json +3529 -0
  86. package/dist/migrations/sqlite/meta/0019_snapshot.json +3538 -0
  87. package/dist/migrations/sqlite/meta/0020_snapshot.json +3545 -0
  88. package/dist/migrations/sqlite/meta/0021_snapshot.json +3553 -0
  89. package/dist/migrations/sqlite/meta/0022_snapshot.json +3560 -0
  90. package/dist/migrations/sqlite/meta/0023_snapshot.json +3579 -0
  91. package/dist/migrations/sqlite/meta/0024_snapshot.json +3598 -0
  92. package/dist/migrations/sqlite/meta/0025_snapshot.json +3609 -0
  93. package/dist/migrations/sqlite/meta/0026_snapshot.json +3616 -0
  94. package/dist/migrations/sqlite/meta/0027_snapshot.json +3834 -0
  95. package/dist/migrations/sqlite/meta/_journal.json +70 -0
  96. package/dist/platform-Y3gICK6n.d.ts +58 -0
  97. package/dist/portable.d.ts +2 -2
  98. package/dist/postgres-BI3xTnyw.js +1718 -0
  99. package/dist/postgres-platform-node.d.ts +14 -0
  100. package/dist/postgres-platform-node.js +21 -0
  101. package/dist/postgres-platform-workerd.d.ts +61 -0
  102. package/dist/postgres-platform-workerd.js +163 -0
  103. package/dist/{schema-z8GcN_Xu.d.ts → schema-DgoPqqsI.d.ts} +1329 -9
  104. package/dist/schema-sqlite.d.ts +1308 -8
  105. package/dist/schema-sqlite.js +156 -20
  106. package/dist/schema-version.d.ts +1 -1
  107. package/dist/schema-version.js +261 -2
  108. package/dist/schema.d.ts +2 -2
  109. package/dist/schema.js +229 -22
  110. package/package.json +13 -5
  111. package/src/active-subject.ts +9 -0
  112. package/src/change-records.ts +38 -0
  113. package/src/connect.ts +67 -13
  114. package/src/database.ts +67 -51
  115. package/src/dialect.ts +17 -8
  116. package/src/grants.ts +3 -3
  117. package/src/hyperdrive.ts +181 -104
  118. package/src/log.ts +244 -11
  119. package/src/migrate.ts +157 -30
  120. package/src/migrations/postgres/0021_prune_vault_releases.sql +19 -0
  121. package/src/migrations/postgres/0022_log_015.sql +672 -0
  122. package/src/migrations/postgres/0023_change_path.sql +153 -0
  123. package/src/migrations/postgres/0024_use_015.sql +556 -0
  124. package/src/migrations/postgres/0025_app_change.sql +221 -0
  125. package/src/migrations/postgres/0026_issue_lock.sql +106 -0
  126. package/src/migrations/postgres/0027_retention.sql +118 -0
  127. package/src/migrations/postgres/0028_use_stalls.sql +594 -0
  128. package/src/migrations/postgres/0029_use_objects.sql +887 -0
  129. package/src/migrations/postgres/0030_unarchive_restores.sql +259 -0
  130. package/src/migrations/postgres/0031_app_read.sql +65 -0
  131. package/src/migrations/postgres/0032_secrets_live_index.sql +4 -0
  132. package/src/migrations/postgres/0033_use_generations.sql +582 -0
  133. package/src/migrations/postgres/0034_vault_credentials.sql +153 -0
  134. package/src/migrations/postgres/0035_first_days.sql +3 -0
  135. package/src/migrations/postgres/0036_vault_issues.sql +91 -0
  136. package/src/migrations/postgres/0037_vault_bindings.sql +271 -0
  137. package/src/migrations/postgres/0040_binding_origin.sql +159 -0
  138. package/src/migrations/postgres/0041_cutover.sql +132 -0
  139. package/src/migrations/postgres/0042_sign_in_index.sql +7 -0
  140. package/src/migrations/postgres/0043_issue_revoke_index.sql +4 -0
  141. package/src/migrations/postgres/0044_use_by_name.sql +705 -0
  142. package/src/migrations/postgres/0045_decide_first.sql +878 -0
  143. package/src/migrations/postgres/0046_way_in_uses.sql +1149 -0
  144. package/src/migrations/postgres/0047_cutover_finish.sql +268 -0
  145. package/src/migrations/postgres/0048_use_batch.sql +59 -0
  146. package/src/migrations/postgres/0049_reads.sql +171 -0
  147. package/src/migrations/postgres/meta/0021_snapshot.json +3334 -0
  148. package/src/migrations/postgres/meta/0022_snapshot.json +3831 -0
  149. package/src/migrations/postgres/meta/0023_snapshot.json +3831 -0
  150. package/src/migrations/postgres/meta/0024_snapshot.json +3831 -0
  151. package/src/migrations/postgres/meta/0025_snapshot.json +3831 -0
  152. package/src/migrations/postgres/meta/0026_snapshot.json +3831 -0
  153. package/src/migrations/postgres/meta/0027_snapshot.json +3853 -0
  154. package/src/migrations/postgres/meta/0028_snapshot.json +3853 -0
  155. package/src/migrations/postgres/meta/0029_snapshot.json +3859 -0
  156. package/src/migrations/postgres/meta/0030_snapshot.json +3859 -0
  157. package/src/migrations/postgres/meta/0031_snapshot.json +3859 -0
  158. package/src/migrations/postgres/meta/0032_snapshot.json +3875 -0
  159. package/src/migrations/postgres/meta/0033_snapshot.json +3875 -0
  160. package/src/migrations/postgres/meta/0034_snapshot.json +3875 -0
  161. package/src/migrations/postgres/meta/0035_snapshot.json +3875 -0
  162. package/src/migrations/postgres/meta/0036_snapshot.json +3875 -0
  163. package/src/migrations/postgres/meta/0037_snapshot.json +3875 -0
  164. package/src/migrations/postgres/meta/0038_snapshot.json +3881 -0
  165. package/src/migrations/postgres/meta/0039_snapshot.json +3881 -0
  166. package/src/migrations/postgres/meta/0040_snapshot.json +3931 -0
  167. package/src/migrations/postgres/meta/0041_snapshot.json +3981 -0
  168. package/src/migrations/postgres/meta/0042_snapshot.json +3981 -0
  169. package/src/migrations/postgres/meta/0043_snapshot.json +3981 -0
  170. package/src/migrations/postgres/meta/0044_snapshot.json +3991 -0
  171. package/src/migrations/postgres/meta/0045_snapshot.json +3997 -0
  172. package/src/migrations/postgres/meta/0046_snapshot.json +3997 -0
  173. package/src/migrations/postgres/meta/0047_snapshot.json +4234 -0
  174. package/src/migrations/postgres/meta/_journal.json +189 -0
  175. package/src/migrations/sqlite/0018_log_015.sql +84 -0
  176. package/src/migrations/sqlite/0019_retention.sql +2 -0
  177. package/src/migrations/sqlite/0020_ended_references.sql +1 -0
  178. package/src/migrations/sqlite/0021_secrets_live_index.sql +1 -0
  179. package/src/migrations/sqlite/0022_binding_origin.sql +1 -0
  180. package/src/migrations/sqlite/0023_sign_in_index.sql +2 -0
  181. package/src/migrations/sqlite/0024_issue_revoke_index.sql +2 -0
  182. package/src/migrations/sqlite/0025_way_in_uses.sql +42 -0
  183. package/src/migrations/sqlite/0026_cutover_finish.sql +11 -0
  184. package/src/migrations/sqlite/0027_reads.sql +38 -0
  185. package/src/migrations/sqlite/meta/0018_snapshot.json +3529 -0
  186. package/src/migrations/sqlite/meta/0019_snapshot.json +3538 -0
  187. package/src/migrations/sqlite/meta/0020_snapshot.json +3545 -0
  188. package/src/migrations/sqlite/meta/0021_snapshot.json +3553 -0
  189. package/src/migrations/sqlite/meta/0022_snapshot.json +3560 -0
  190. package/src/migrations/sqlite/meta/0023_snapshot.json +3579 -0
  191. package/src/migrations/sqlite/meta/0024_snapshot.json +3598 -0
  192. package/src/migrations/sqlite/meta/0025_snapshot.json +3609 -0
  193. package/src/migrations/sqlite/meta/0026_snapshot.json +3616 -0
  194. package/src/migrations/sqlite/meta/0027_snapshot.json +3834 -0
  195. package/src/migrations/sqlite/meta/_journal.json +70 -0
  196. package/src/postgres-js/README.md +183 -0
  197. package/src/postgres-js/UNLICENSE +24 -0
  198. package/src/postgres-js/bytes.ts +89 -0
  199. package/src/postgres-js/connection.ts +882 -0
  200. package/src/postgres-js/errors.ts +84 -0
  201. package/src/postgres-js/index.ts +516 -0
  202. package/src/postgres-js/platform.node.ts +29 -0
  203. package/src/postgres-js/platform.ts +60 -0
  204. package/src/postgres-js/platform.workerd.ts +225 -0
  205. package/src/postgres-js/query.ts +123 -0
  206. package/src/postgres-js/queue.ts +42 -0
  207. package/src/postgres-js/result.ts +46 -0
  208. package/src/postgres-js/types.ts +52 -0
  209. package/src/postgres.ts +375 -26
  210. package/src/schema-version.ts +2 -2
  211. package/src/schema.sqlite.ts +200 -9
  212. package/src/schema.ts +294 -8
  213. package/src/verify-runtime.ts +18 -29
  214. package/LICENSE +0 -21
  215. package/dist/database-CFhTnnzM.d.ts +0 -73
  216. package/dist/postgres-Bmar8y0q.js +0 -29
  217. package/dist/relations-BfR3JjT1.js +0 -38
  218. package/src/relations.ts +0 -40
@@ -0,0 +1,4234 @@
1
+ {
2
+ "id": "afcf086c-d7b8-4145-a339-3a8555577833",
3
+ "prevId": "cd759e62-bb1e-45f0-be77-0ff113ce74d7",
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
+ "log015": {
185
+ "name": "log015",
186
+ "type": "boolean",
187
+ "primaryKey": false,
188
+ "notNull": false
189
+ }
190
+ },
191
+ "indexes": {
192
+ "audit_log_project_idx": {
193
+ "name": "audit_log_project_idx",
194
+ "columns": [
195
+ {
196
+ "expression": "project_id",
197
+ "isExpression": false,
198
+ "asc": true,
199
+ "nulls": "last"
200
+ },
201
+ {
202
+ "expression": "seq",
203
+ "isExpression": false,
204
+ "asc": true,
205
+ "nulls": "last"
206
+ }
207
+ ],
208
+ "isUnique": false,
209
+ "concurrently": false,
210
+ "method": "btree",
211
+ "with": {}
212
+ },
213
+ "audit_log_environment_idx": {
214
+ "name": "audit_log_environment_idx",
215
+ "columns": [
216
+ {
217
+ "expression": "environment_id",
218
+ "isExpression": false,
219
+ "asc": true,
220
+ "nulls": "last"
221
+ },
222
+ {
223
+ "expression": "seq",
224
+ "isExpression": false,
225
+ "asc": true,
226
+ "nulls": "last"
227
+ }
228
+ ],
229
+ "isUnique": false,
230
+ "concurrently": false,
231
+ "method": "btree",
232
+ "with": {}
233
+ },
234
+ "audit_log_secret_idx": {
235
+ "name": "audit_log_secret_idx",
236
+ "columns": [
237
+ {
238
+ "expression": "secret_id",
239
+ "isExpression": false,
240
+ "asc": true,
241
+ "nulls": "last"
242
+ },
243
+ {
244
+ "expression": "seq",
245
+ "isExpression": false,
246
+ "asc": true,
247
+ "nulls": "last"
248
+ }
249
+ ],
250
+ "isUnique": false,
251
+ "concurrently": false,
252
+ "method": "btree",
253
+ "with": {}
254
+ },
255
+ "audit_log_actor_idx": {
256
+ "name": "audit_log_actor_idx",
257
+ "columns": [
258
+ {
259
+ "expression": "actor",
260
+ "isExpression": false,
261
+ "asc": true,
262
+ "nulls": "last"
263
+ },
264
+ {
265
+ "expression": "seq",
266
+ "isExpression": false,
267
+ "asc": true,
268
+ "nulls": "last"
269
+ }
270
+ ],
271
+ "isUnique": false,
272
+ "concurrently": false,
273
+ "method": "btree",
274
+ "with": {}
275
+ },
276
+ "audit_log_operation_idx": {
277
+ "name": "audit_log_operation_idx",
278
+ "columns": [
279
+ {
280
+ "expression": "operation_id",
281
+ "isExpression": false,
282
+ "asc": true,
283
+ "nulls": "last"
284
+ },
285
+ {
286
+ "expression": "seq",
287
+ "isExpression": false,
288
+ "asc": true,
289
+ "nulls": "last"
290
+ }
291
+ ],
292
+ "isUnique": false,
293
+ "concurrently": false,
294
+ "method": "btree",
295
+ "with": {}
296
+ },
297
+ "audit_log_action_idx": {
298
+ "name": "audit_log_action_idx",
299
+ "columns": [
300
+ {
301
+ "expression": "author",
302
+ "isExpression": false,
303
+ "asc": true,
304
+ "nulls": "last"
305
+ },
306
+ {
307
+ "expression": "action",
308
+ "isExpression": false,
309
+ "asc": true,
310
+ "nulls": "last"
311
+ },
312
+ {
313
+ "expression": "seq",
314
+ "isExpression": false,
315
+ "asc": true,
316
+ "nulls": "last"
317
+ }
318
+ ],
319
+ "isUnique": false,
320
+ "concurrently": false,
321
+ "method": "btree",
322
+ "with": {}
323
+ },
324
+ "audit_log_releases_idx": {
325
+ "name": "audit_log_releases_idx",
326
+ "columns": [
327
+ {
328
+ "expression": "author",
329
+ "isExpression": false,
330
+ "asc": true,
331
+ "nulls": "last"
332
+ },
333
+ {
334
+ "expression": "actor",
335
+ "isExpression": false,
336
+ "asc": true,
337
+ "nulls": "last"
338
+ },
339
+ {
340
+ "expression": "action",
341
+ "isExpression": false,
342
+ "asc": true,
343
+ "nulls": "last"
344
+ },
345
+ {
346
+ "expression": "decision",
347
+ "isExpression": false,
348
+ "asc": true,
349
+ "nulls": "last"
350
+ },
351
+ {
352
+ "expression": "occurred_at",
353
+ "isExpression": false,
354
+ "asc": true,
355
+ "nulls": "last"
356
+ }
357
+ ],
358
+ "isUnique": false,
359
+ "concurrently": false,
360
+ "method": "btree",
361
+ "with": {}
362
+ },
363
+ "audit_log_subject_idx": {
364
+ "name": "audit_log_subject_idx",
365
+ "columns": [
366
+ {
367
+ "expression": "author",
368
+ "isExpression": false,
369
+ "asc": true,
370
+ "nulls": "last"
371
+ },
372
+ {
373
+ "expression": "subject_principal",
374
+ "isExpression": false,
375
+ "asc": true,
376
+ "nulls": "last"
377
+ },
378
+ {
379
+ "expression": "seq",
380
+ "isExpression": false,
381
+ "asc": true,
382
+ "nulls": "last"
383
+ }
384
+ ],
385
+ "isUnique": false,
386
+ "concurrently": false,
387
+ "method": "btree",
388
+ "with": {}
389
+ },
390
+ "audit_log_unbind_idx": {
391
+ "name": "audit_log_unbind_idx",
392
+ "columns": [
393
+ {
394
+ "expression": "((\"metadata\")::jsonb ->> 'bindingId')",
395
+ "asc": true,
396
+ "isExpression": true,
397
+ "nulls": "last"
398
+ }
399
+ ],
400
+ "isUnique": false,
401
+ "where": "\"audit_log\".\"author\" = 'app' AND \"audit_log\".\"action\" = 'token.unbind' AND \"audit_log\".\"decision\" = 'allow'",
402
+ "concurrently": false,
403
+ "method": "btree",
404
+ "with": {}
405
+ },
406
+ "audit_log_freeze_idx": {
407
+ "name": "audit_log_freeze_idx",
408
+ "columns": [
409
+ {
410
+ "expression": "((\"metadata\")::jsonb ->> 'target')",
411
+ "asc": true,
412
+ "isExpression": true,
413
+ "nulls": "last"
414
+ },
415
+ {
416
+ "expression": "seq",
417
+ "isExpression": false,
418
+ "asc": false,
419
+ "nulls": "last"
420
+ }
421
+ ],
422
+ "isUnique": false,
423
+ "where": "\"audit_log\".\"author\" = 'app' AND \"audit_log\".\"action\" IN ('workload.freeze', 'workload.unfreeze') AND \"audit_log\".\"decision\" = 'allow'",
424
+ "concurrently": false,
425
+ "method": "btree",
426
+ "with": {}
427
+ },
428
+ "audit_log_supersede_idx": {
429
+ "name": "audit_log_supersede_idx",
430
+ "columns": [
431
+ {
432
+ "expression": "((\"metadata\")::jsonb ->> 'enrollmentId')",
433
+ "asc": true,
434
+ "isExpression": true,
435
+ "nulls": "last"
436
+ }
437
+ ],
438
+ "isUnique": false,
439
+ "where": "\"audit_log\".\"author\" = 'app' AND \"audit_log\".\"action\" = 'enrollment.supersede' AND \"audit_log\".\"decision\" = 'allow'",
440
+ "concurrently": false,
441
+ "method": "btree",
442
+ "with": {}
443
+ },
444
+ "audit_log_exchange_idx": {
445
+ "name": "audit_log_exchange_idx",
446
+ "columns": [
447
+ {
448
+ "expression": "((\"metadata\")::jsonb ->> 'credentialId')",
449
+ "asc": true,
450
+ "isExpression": true,
451
+ "nulls": "last"
452
+ }
453
+ ],
454
+ "isUnique": false,
455
+ "where": "\"audit_log\".\"author\" = 'app' AND \"audit_log\".\"action\" = 'token.exchange' AND \"audit_log\".\"decision\" = 'allow'",
456
+ "concurrently": false,
457
+ "method": "btree",
458
+ "with": {}
459
+ },
460
+ "audit_log_token_create_idx": {
461
+ "name": "audit_log_token_create_idx",
462
+ "columns": [
463
+ {
464
+ "expression": "((\"metadata\")::jsonb ->> 'targetCredentialId')",
465
+ "asc": true,
466
+ "isExpression": true,
467
+ "nulls": "last"
468
+ }
469
+ ],
470
+ "isUnique": false,
471
+ "where": "\"audit_log\".\"author\" = 'app' AND \"audit_log\".\"action\" = 'token.create' AND \"audit_log\".\"decision\" = 'allow'",
472
+ "concurrently": false,
473
+ "method": "btree",
474
+ "with": {}
475
+ },
476
+ "audit_log_reference_end_idx": {
477
+ "name": "audit_log_reference_end_idx",
478
+ "columns": [
479
+ {
480
+ "expression": "related_seq",
481
+ "isExpression": false,
482
+ "asc": true,
483
+ "nulls": "last"
484
+ }
485
+ ],
486
+ "isUnique": false,
487
+ "where": "\"audit_log\".\"author\" = 'vault' AND \"audit_log\".\"action\" = 'reference.end' AND \"audit_log\".\"decision\" = 'allow'",
488
+ "concurrently": false,
489
+ "method": "btree",
490
+ "with": {}
491
+ },
492
+ "audit_log_also_project_idx": {
493
+ "name": "audit_log_also_project_idx",
494
+ "columns": [
495
+ {
496
+ "expression": "(((\"metadata\")::jsonb -> 'also') ->> 'projectId')",
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
+ "audit_log_also_environment_idx": {
515
+ "name": "audit_log_also_environment_idx",
516
+ "columns": [
517
+ {
518
+ "expression": "(((\"metadata\")::jsonb -> 'also') ->> 'environmentId')",
519
+ "asc": true,
520
+ "isExpression": true,
521
+ "nulls": "last"
522
+ },
523
+ {
524
+ "expression": "seq",
525
+ "isExpression": false,
526
+ "asc": true,
527
+ "nulls": "last"
528
+ }
529
+ ],
530
+ "isUnique": false,
531
+ "where": "((\"audit_log\".\"metadata\")::jsonb -> 'also') IS NOT NULL",
532
+ "concurrently": false,
533
+ "method": "btree",
534
+ "with": {}
535
+ },
536
+ "audit_log_also_secret_idx": {
537
+ "name": "audit_log_also_secret_idx",
538
+ "columns": [
539
+ {
540
+ "expression": "(((\"metadata\")::jsonb -> 'also') ->> 'secretId')",
541
+ "asc": true,
542
+ "isExpression": true,
543
+ "nulls": "last"
544
+ },
545
+ {
546
+ "expression": "seq",
547
+ "isExpression": false,
548
+ "asc": true,
549
+ "nulls": "last"
550
+ }
551
+ ],
552
+ "isUnique": false,
553
+ "where": "((\"audit_log\".\"metadata\")::jsonb -> 'also') IS NOT NULL",
554
+ "concurrently": false,
555
+ "method": "btree",
556
+ "with": {}
557
+ }
558
+ },
559
+ "foreignKeys": {
560
+ "audit_log_project_id_fkey": {
561
+ "name": "audit_log_project_id_fkey",
562
+ "tableFrom": "audit_log",
563
+ "tableTo": "projects",
564
+ "columnsFrom": [
565
+ "project_id"
566
+ ],
567
+ "columnsTo": [
568
+ "id"
569
+ ],
570
+ "onDelete": "restrict",
571
+ "onUpdate": "no action"
572
+ },
573
+ "audit_log_environment_id_fkey": {
574
+ "name": "audit_log_environment_id_fkey",
575
+ "tableFrom": "audit_log",
576
+ "tableTo": "environments",
577
+ "columnsFrom": [
578
+ "environment_id"
579
+ ],
580
+ "columnsTo": [
581
+ "id"
582
+ ],
583
+ "onDelete": "restrict",
584
+ "onUpdate": "no action"
585
+ },
586
+ "audit_log_secret_id_fkey": {
587
+ "name": "audit_log_secret_id_fkey",
588
+ "tableFrom": "audit_log",
589
+ "tableTo": "secrets",
590
+ "columnsFrom": [
591
+ "secret_id"
592
+ ],
593
+ "columnsTo": [
594
+ "id"
595
+ ],
596
+ "onDelete": "restrict",
597
+ "onUpdate": "no action"
598
+ },
599
+ "audit_log_secret_version_id_fkey": {
600
+ "name": "audit_log_secret_version_id_fkey",
601
+ "tableFrom": "audit_log",
602
+ "tableTo": "secret_versions",
603
+ "columnsFrom": [
604
+ "secret_version_id"
605
+ ],
606
+ "columnsTo": [
607
+ "id"
608
+ ],
609
+ "onDelete": "restrict",
610
+ "onUpdate": "no action"
611
+ },
612
+ "audit_log_related_seq_fkey": {
613
+ "name": "audit_log_related_seq_fkey",
614
+ "tableFrom": "audit_log",
615
+ "tableTo": "audit_log",
616
+ "columnsFrom": [
617
+ "related_seq"
618
+ ],
619
+ "columnsTo": [
620
+ "seq"
621
+ ],
622
+ "onDelete": "restrict",
623
+ "onUpdate": "no action"
624
+ }
625
+ },
626
+ "compositePrimaryKeys": {},
627
+ "uniqueConstraints": {},
628
+ "policies": {},
629
+ "checkConstraints": {
630
+ "audit_log_author_check": {
631
+ "name": "audit_log_author_check",
632
+ "value": "\"audit_log\".\"author\" IN ('app', 'vault')"
633
+ },
634
+ "audit_log_actor_check": {
635
+ "name": "audit_log_actor_check",
636
+ "value": "\"audit_log\".\"actor\" ~ '^(user|token|system):.+$'"
637
+ },
638
+ "audit_log_decision_check": {
639
+ "name": "audit_log_decision_check",
640
+ "value": "\"audit_log\".\"decision\" IN ('allow', 'deny')"
641
+ },
642
+ "audit_log_metadata_check": {
643
+ "name": "audit_log_metadata_check",
644
+ "value": "\"audit_log\".\"metadata\"::jsonb IS NOT NULL"
645
+ },
646
+ "audit_log_prev_hash_check": {
647
+ "name": "audit_log_prev_hash_check",
648
+ "value": "octet_length(\"audit_log\".\"prev_hash\") = 32"
649
+ },
650
+ "audit_log_mac_check": {
651
+ "name": "audit_log_mac_check",
652
+ "value": "octet_length(\"audit_log\".\"mac\") = 32"
653
+ },
654
+ "audit_log_hash_check": {
655
+ "name": "audit_log_hash_check",
656
+ "value": "octet_length(\"audit_log\".\"hash\") = 32"
657
+ }
658
+ },
659
+ "isRLSEnabled": false
660
+ },
661
+ "public.capped_alerts": {
662
+ "name": "capped_alerts",
663
+ "schema": "",
664
+ "columns": {
665
+ "service": {
666
+ "name": "service",
667
+ "type": "text",
668
+ "primaryKey": false,
669
+ "notNull": true
670
+ },
671
+ "kind": {
672
+ "name": "kind",
673
+ "type": "text",
674
+ "primaryKey": false,
675
+ "notNull": true
676
+ },
677
+ "raised_at": {
678
+ "name": "raised_at",
679
+ "type": "timestamp with time zone",
680
+ "primaryKey": false,
681
+ "notNull": true
682
+ }
683
+ },
684
+ "indexes": {},
685
+ "foreignKeys": {},
686
+ "compositePrimaryKeys": {
687
+ "capped_alerts_pkey": {
688
+ "name": "capped_alerts_pkey",
689
+ "columns": [
690
+ "service",
691
+ "kind"
692
+ ]
693
+ }
694
+ },
695
+ "uniqueConstraints": {},
696
+ "policies": {},
697
+ "checkConstraints": {},
698
+ "isRLSEnabled": false
699
+ },
700
+ "public.consumed_tokens": {
701
+ "name": "consumed_tokens",
702
+ "schema": "",
703
+ "columns": {
704
+ "hash": {
705
+ "name": "hash",
706
+ "type": "bytea",
707
+ "primaryKey": true,
708
+ "notNull": true
709
+ },
710
+ "consumed_at": {
711
+ "name": "consumed_at",
712
+ "type": "timestamp with time zone",
713
+ "primaryKey": false,
714
+ "notNull": true,
715
+ "default": "now()"
716
+ }
717
+ },
718
+ "indexes": {},
719
+ "foreignKeys": {},
720
+ "compositePrimaryKeys": {},
721
+ "uniqueConstraints": {},
722
+ "policies": {},
723
+ "checkConstraints": {
724
+ "consumed_tokens_hash_check": {
725
+ "name": "consumed_tokens_hash_check",
726
+ "value": "octet_length(\"consumed_tokens\".\"hash\") = 32"
727
+ }
728
+ },
729
+ "isRLSEnabled": false
730
+ },
731
+ "public.credentials": {
732
+ "name": "credentials",
733
+ "schema": "",
734
+ "columns": {
735
+ "id": {
736
+ "name": "id",
737
+ "type": "uuid",
738
+ "primaryKey": true,
739
+ "notNull": true,
740
+ "default": "gen_random_uuid()"
741
+ },
742
+ "kind": {
743
+ "name": "kind",
744
+ "type": "text",
745
+ "primaryKey": false,
746
+ "notNull": true
747
+ },
748
+ "auth_mac": {
749
+ "name": "auth_mac",
750
+ "type": "bytea",
751
+ "primaryKey": false,
752
+ "notNull": true
753
+ },
754
+ "token_hash": {
755
+ "name": "token_hash",
756
+ "type": "bytea",
757
+ "primaryKey": false,
758
+ "notNull": true
759
+ },
760
+ "token_hint": {
761
+ "name": "token_hint",
762
+ "type": "text",
763
+ "primaryKey": false,
764
+ "notNull": true
765
+ },
766
+ "generation": {
767
+ "name": "generation",
768
+ "type": "integer",
769
+ "primaryKey": false,
770
+ "notNull": true
771
+ },
772
+ "principal": {
773
+ "name": "principal",
774
+ "type": "text",
775
+ "primaryKey": false,
776
+ "notNull": true
777
+ },
778
+ "identity_id": {
779
+ "name": "identity_id",
780
+ "type": "uuid",
781
+ "primaryKey": false,
782
+ "notNull": false
783
+ },
784
+ "scope": {
785
+ "name": "scope",
786
+ "type": "text",
787
+ "primaryKey": false,
788
+ "notNull": false
789
+ },
790
+ "places": {
791
+ "name": "places",
792
+ "type": "text",
793
+ "primaryKey": false,
794
+ "notNull": false
795
+ },
796
+ "label": {
797
+ "name": "label",
798
+ "type": "text",
799
+ "primaryKey": false,
800
+ "notNull": false
801
+ },
802
+ "created_at": {
803
+ "name": "created_at",
804
+ "type": "timestamp with time zone",
805
+ "primaryKey": false,
806
+ "notNull": true,
807
+ "default": "now()"
808
+ },
809
+ "created_by": {
810
+ "name": "created_by",
811
+ "type": "text",
812
+ "primaryKey": false,
813
+ "notNull": true
814
+ },
815
+ "expires_at": {
816
+ "name": "expires_at",
817
+ "type": "timestamp with time zone",
818
+ "primaryKey": false,
819
+ "notNull": true
820
+ },
821
+ "last_used_at": {
822
+ "name": "last_used_at",
823
+ "type": "timestamp with time zone",
824
+ "primaryKey": false,
825
+ "notNull": false
826
+ },
827
+ "last_used_ip": {
828
+ "name": "last_used_ip",
829
+ "type": "text",
830
+ "primaryKey": false,
831
+ "notNull": false
832
+ },
833
+ "revoked_at": {
834
+ "name": "revoked_at",
835
+ "type": "timestamp with time zone",
836
+ "primaryKey": false,
837
+ "notNull": false
838
+ },
839
+ "revoked_by": {
840
+ "name": "revoked_by",
841
+ "type": "text",
842
+ "primaryKey": false,
843
+ "notNull": false
844
+ },
845
+ "jkt": {
846
+ "name": "jkt",
847
+ "type": "text",
848
+ "primaryKey": false,
849
+ "notNull": false
850
+ },
851
+ "not_after": {
852
+ "name": "not_after",
853
+ "type": "timestamp with time zone",
854
+ "primaryKey": false,
855
+ "notNull": false
856
+ },
857
+ "ancestors": {
858
+ "name": "ancestors",
859
+ "type": "text",
860
+ "primaryKey": false,
861
+ "notNull": false
862
+ },
863
+ "constraints": {
864
+ "name": "constraints",
865
+ "type": "text",
866
+ "primaryKey": false,
867
+ "notNull": false
868
+ },
869
+ "enrollment_id": {
870
+ "name": "enrollment_id",
871
+ "type": "uuid",
872
+ "primaryKey": false,
873
+ "notNull": false
874
+ },
875
+ "approved_at": {
876
+ "name": "approved_at",
877
+ "type": "timestamp with time zone",
878
+ "primaryKey": false,
879
+ "notNull": false
880
+ },
881
+ "approved_by": {
882
+ "name": "approved_by",
883
+ "type": "text",
884
+ "primaryKey": false,
885
+ "notNull": false
886
+ },
887
+ "seal": {
888
+ "name": "seal",
889
+ "type": "bytea",
890
+ "primaryKey": false,
891
+ "notNull": false
892
+ }
893
+ },
894
+ "indexes": {
895
+ "credentials_principal_idx": {
896
+ "name": "credentials_principal_idx",
897
+ "columns": [
898
+ {
899
+ "expression": "principal",
900
+ "isExpression": false,
901
+ "asc": true,
902
+ "nulls": "last"
903
+ },
904
+ {
905
+ "expression": "generation",
906
+ "isExpression": false,
907
+ "asc": true,
908
+ "nulls": "last"
909
+ }
910
+ ],
911
+ "isUnique": false,
912
+ "concurrently": false,
913
+ "method": "btree",
914
+ "with": {}
915
+ },
916
+ "credentials_live_idx": {
917
+ "name": "credentials_live_idx",
918
+ "columns": [
919
+ {
920
+ "expression": "principal",
921
+ "isExpression": false,
922
+ "asc": true,
923
+ "nulls": "last"
924
+ },
925
+ {
926
+ "expression": "expires_at",
927
+ "isExpression": false,
928
+ "asc": true,
929
+ "nulls": "last"
930
+ }
931
+ ],
932
+ "isUnique": false,
933
+ "where": "\"credentials\".\"revoked_at\" IS NULL",
934
+ "concurrently": false,
935
+ "method": "btree",
936
+ "with": {}
937
+ },
938
+ "credentials_issued_by_idx": {
939
+ "name": "credentials_issued_by_idx",
940
+ "columns": [
941
+ {
942
+ "expression": "principal",
943
+ "isExpression": false,
944
+ "asc": true,
945
+ "nulls": "last"
946
+ },
947
+ {
948
+ "expression": "created_by",
949
+ "isExpression": false,
950
+ "asc": true,
951
+ "nulls": "last"
952
+ },
953
+ {
954
+ "expression": "created_at",
955
+ "isExpression": false,
956
+ "asc": true,
957
+ "nulls": "last"
958
+ }
959
+ ],
960
+ "isUnique": false,
961
+ "concurrently": false,
962
+ "method": "btree",
963
+ "with": {}
964
+ },
965
+ "credentials_enrollment_roots_idx": {
966
+ "name": "credentials_enrollment_roots_idx",
967
+ "columns": [
968
+ {
969
+ "expression": "enrollment_id",
970
+ "isExpression": false,
971
+ "asc": true,
972
+ "nulls": "last"
973
+ },
974
+ {
975
+ "expression": "created_at",
976
+ "isExpression": false,
977
+ "asc": true,
978
+ "nulls": "last"
979
+ }
980
+ ],
981
+ "isUnique": false,
982
+ "where": "\"credentials\".\"kind\" = 'workload' AND \"credentials\".\"ancestors\" IS NULL",
983
+ "concurrently": false,
984
+ "method": "btree",
985
+ "with": {}
986
+ }
987
+ },
988
+ "foreignKeys": {
989
+ "credentials_principal_fkey": {
990
+ "name": "credentials_principal_fkey",
991
+ "tableFrom": "credentials",
992
+ "tableTo": "vault_members",
993
+ "columnsFrom": [
994
+ "principal"
995
+ ],
996
+ "columnsTo": [
997
+ "principal"
998
+ ],
999
+ "onDelete": "restrict",
1000
+ "onUpdate": "no action"
1001
+ },
1002
+ "credentials_identity_id_fkey": {
1003
+ "name": "credentials_identity_id_fkey",
1004
+ "tableFrom": "credentials",
1005
+ "tableTo": "identities",
1006
+ "columnsFrom": [
1007
+ "identity_id",
1008
+ "principal",
1009
+ "generation"
1010
+ ],
1011
+ "columnsTo": [
1012
+ "id",
1013
+ "principal",
1014
+ "generation"
1015
+ ],
1016
+ "onDelete": "restrict",
1017
+ "onUpdate": "no action"
1018
+ },
1019
+ "credentials_enrollment_id_fkey": {
1020
+ "name": "credentials_enrollment_id_fkey",
1021
+ "tableFrom": "credentials",
1022
+ "tableTo": "enrollments",
1023
+ "columnsFrom": [
1024
+ "enrollment_id"
1025
+ ],
1026
+ "columnsTo": [
1027
+ "id"
1028
+ ],
1029
+ "onDelete": "restrict",
1030
+ "onUpdate": "no action"
1031
+ }
1032
+ },
1033
+ "compositePrimaryKeys": {},
1034
+ "uniqueConstraints": {
1035
+ "credentials_token_hash_key": {
1036
+ "name": "credentials_token_hash_key",
1037
+ "nullsNotDistinct": false,
1038
+ "columns": [
1039
+ "token_hash"
1040
+ ]
1041
+ }
1042
+ },
1043
+ "policies": {},
1044
+ "checkConstraints": {
1045
+ "credentials_seal_check": {
1046
+ "name": "credentials_seal_check",
1047
+ "value": "\"credentials\".\"seal\" IS NULL OR octet_length(\"credentials\".\"seal\") = 16"
1048
+ },
1049
+ "credentials_kind_check": {
1050
+ "name": "credentials_kind_check",
1051
+ "value": "\"credentials\".\"kind\" IN ('browser', 'cli', 'service', 'personal', 'handle', 'workload')"
1052
+ },
1053
+ "credentials_principal_check": {
1054
+ "name": "credentials_principal_check",
1055
+ "value": "\"credentials\".\"principal\" LIKE 'user:%' OR \"credentials\".\"principal\" LIKE 'token:%'"
1056
+ },
1057
+ "credentials_kind_matches_principal": {
1058
+ "name": "credentials_kind_matches_principal",
1059
+ "value": "(\"credentials\".\"kind\" IN ('service', 'workload')) = (\"credentials\".\"principal\" LIKE 'token:%')"
1060
+ },
1061
+ "credentials_workload_jkt_check": {
1062
+ "name": "credentials_workload_jkt_check",
1063
+ "value": "\"credentials\".\"kind\" <> 'workload' OR \"credentials\".\"jkt\" IS NOT NULL"
1064
+ },
1065
+ "credentials_token_hash_check": {
1066
+ "name": "credentials_token_hash_check",
1067
+ "value": "octet_length(\"credentials\".\"token_hash\") = 32"
1068
+ },
1069
+ "credentials_auth_mac_check": {
1070
+ "name": "credentials_auth_mac_check",
1071
+ "value": "octet_length(\"credentials\".\"auth_mac\") = 32"
1072
+ }
1073
+ },
1074
+ "isRLSEnabled": false
1075
+ },
1076
+ "public.device_authorizations": {
1077
+ "name": "device_authorizations",
1078
+ "schema": "",
1079
+ "columns": {
1080
+ "id": {
1081
+ "name": "id",
1082
+ "type": "uuid",
1083
+ "primaryKey": true,
1084
+ "notNull": true,
1085
+ "default": "gen_random_uuid()"
1086
+ },
1087
+ "device_code_hash": {
1088
+ "name": "device_code_hash",
1089
+ "type": "bytea",
1090
+ "primaryKey": false,
1091
+ "notNull": true
1092
+ },
1093
+ "auth_mac": {
1094
+ "name": "auth_mac",
1095
+ "type": "bytea",
1096
+ "primaryKey": false,
1097
+ "notNull": true
1098
+ },
1099
+ "user_code": {
1100
+ "name": "user_code",
1101
+ "type": "text",
1102
+ "primaryKey": false,
1103
+ "notNull": true
1104
+ },
1105
+ "client_label": {
1106
+ "name": "client_label",
1107
+ "type": "text",
1108
+ "primaryKey": false,
1109
+ "notNull": false
1110
+ },
1111
+ "client_ip": {
1112
+ "name": "client_ip",
1113
+ "type": "text",
1114
+ "primaryKey": false,
1115
+ "notNull": false
1116
+ },
1117
+ "created_at": {
1118
+ "name": "created_at",
1119
+ "type": "timestamp with time zone",
1120
+ "primaryKey": false,
1121
+ "notNull": true,
1122
+ "default": "now()"
1123
+ },
1124
+ "expires_at": {
1125
+ "name": "expires_at",
1126
+ "type": "timestamp with time zone",
1127
+ "primaryKey": false,
1128
+ "notNull": true
1129
+ },
1130
+ "decided_at": {
1131
+ "name": "decided_at",
1132
+ "type": "timestamp with time zone",
1133
+ "primaryKey": false,
1134
+ "notNull": false
1135
+ },
1136
+ "decision": {
1137
+ "name": "decision",
1138
+ "type": "text",
1139
+ "primaryKey": false,
1140
+ "notNull": false
1141
+ },
1142
+ "generation": {
1143
+ "name": "generation",
1144
+ "type": "integer",
1145
+ "primaryKey": false,
1146
+ "notNull": true,
1147
+ "default": 0
1148
+ },
1149
+ "principal": {
1150
+ "name": "principal",
1151
+ "type": "text",
1152
+ "primaryKey": false,
1153
+ "notNull": false
1154
+ },
1155
+ "consumed_at": {
1156
+ "name": "consumed_at",
1157
+ "type": "timestamp with time zone",
1158
+ "primaryKey": false,
1159
+ "notNull": false
1160
+ }
1161
+ },
1162
+ "indexes": {},
1163
+ "foreignKeys": {
1164
+ "device_authorizations_principal_fkey": {
1165
+ "name": "device_authorizations_principal_fkey",
1166
+ "tableFrom": "device_authorizations",
1167
+ "tableTo": "vault_members",
1168
+ "columnsFrom": [
1169
+ "principal"
1170
+ ],
1171
+ "columnsTo": [
1172
+ "principal"
1173
+ ],
1174
+ "onDelete": "restrict",
1175
+ "onUpdate": "no action"
1176
+ }
1177
+ },
1178
+ "compositePrimaryKeys": {},
1179
+ "uniqueConstraints": {
1180
+ "device_authorizations_device_code_hash_key": {
1181
+ "name": "device_authorizations_device_code_hash_key",
1182
+ "nullsNotDistinct": false,
1183
+ "columns": [
1184
+ "device_code_hash"
1185
+ ]
1186
+ },
1187
+ "device_authorizations_user_code_key": {
1188
+ "name": "device_authorizations_user_code_key",
1189
+ "nullsNotDistinct": false,
1190
+ "columns": [
1191
+ "user_code"
1192
+ ]
1193
+ }
1194
+ },
1195
+ "policies": {},
1196
+ "checkConstraints": {
1197
+ "device_authorizations_auth_mac_check": {
1198
+ "name": "device_authorizations_auth_mac_check",
1199
+ "value": "octet_length(\"device_authorizations\".\"auth_mac\") = 32"
1200
+ },
1201
+ "device_authorizations_decision_check": {
1202
+ "name": "device_authorizations_decision_check",
1203
+ "value": "\"device_authorizations\".\"decision\" IS NULL OR \"device_authorizations\".\"decision\" IN ('approved', 'denied')"
1204
+ },
1205
+ "device_authorizations_approval_names_principal": {
1206
+ "name": "device_authorizations_approval_names_principal",
1207
+ "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 ))"
1208
+ }
1209
+ },
1210
+ "isRLSEnabled": false
1211
+ },
1212
+ "public.dismissed_keys": {
1213
+ "name": "dismissed_keys",
1214
+ "schema": "",
1215
+ "columns": {
1216
+ "environment_id": {
1217
+ "name": "environment_id",
1218
+ "type": "uuid",
1219
+ "primaryKey": false,
1220
+ "notNull": true
1221
+ },
1222
+ "key": {
1223
+ "name": "key",
1224
+ "type": "text",
1225
+ "primaryKey": false,
1226
+ "notNull": true
1227
+ },
1228
+ "dismissed_at": {
1229
+ "name": "dismissed_at",
1230
+ "type": "timestamp with time zone",
1231
+ "primaryKey": false,
1232
+ "notNull": true,
1233
+ "default": "now()"
1234
+ },
1235
+ "dismissed_by": {
1236
+ "name": "dismissed_by",
1237
+ "type": "text",
1238
+ "primaryKey": false,
1239
+ "notNull": true
1240
+ },
1241
+ "restored_at": {
1242
+ "name": "restored_at",
1243
+ "type": "timestamp with time zone",
1244
+ "primaryKey": false,
1245
+ "notNull": false
1246
+ },
1247
+ "restored_by": {
1248
+ "name": "restored_by",
1249
+ "type": "text",
1250
+ "primaryKey": false,
1251
+ "notNull": false
1252
+ }
1253
+ },
1254
+ "indexes": {},
1255
+ "foreignKeys": {
1256
+ "dismissed_keys_environment_id_fkey": {
1257
+ "name": "dismissed_keys_environment_id_fkey",
1258
+ "tableFrom": "dismissed_keys",
1259
+ "tableTo": "environments",
1260
+ "columnsFrom": [
1261
+ "environment_id"
1262
+ ],
1263
+ "columnsTo": [
1264
+ "id"
1265
+ ],
1266
+ "onDelete": "restrict",
1267
+ "onUpdate": "no action"
1268
+ }
1269
+ },
1270
+ "compositePrimaryKeys": {
1271
+ "dismissed_keys_pkey": {
1272
+ "name": "dismissed_keys_pkey",
1273
+ "columns": [
1274
+ "environment_id",
1275
+ "key"
1276
+ ]
1277
+ }
1278
+ },
1279
+ "uniqueConstraints": {},
1280
+ "policies": {},
1281
+ "checkConstraints": {
1282
+ "dismissed_keys_key_check": {
1283
+ "name": "dismissed_keys_key_check",
1284
+ "value": "\"dismissed_keys\".\"key\" ~ '^[A-Za-z_][A-Za-z0-9_]{0,127}$'"
1285
+ }
1286
+ },
1287
+ "isRLSEnabled": false
1288
+ },
1289
+ "public.enrollments": {
1290
+ "name": "enrollments",
1291
+ "schema": "",
1292
+ "columns": {
1293
+ "id": {
1294
+ "name": "id",
1295
+ "type": "uuid",
1296
+ "primaryKey": true,
1297
+ "notNull": true
1298
+ },
1299
+ "auth_mac": {
1300
+ "name": "auth_mac",
1301
+ "type": "bytea",
1302
+ "primaryKey": false,
1303
+ "notNull": true
1304
+ },
1305
+ "binding_id": {
1306
+ "name": "binding_id",
1307
+ "type": "uuid",
1308
+ "primaryKey": false,
1309
+ "notNull": true
1310
+ },
1311
+ "code_hash": {
1312
+ "name": "code_hash",
1313
+ "type": "bytea",
1314
+ "primaryKey": false,
1315
+ "notNull": true
1316
+ },
1317
+ "code_hint": {
1318
+ "name": "code_hint",
1319
+ "type": "text",
1320
+ "primaryKey": false,
1321
+ "notNull": true
1322
+ },
1323
+ "scope": {
1324
+ "name": "scope",
1325
+ "type": "text",
1326
+ "primaryKey": false,
1327
+ "notNull": true
1328
+ },
1329
+ "created_at": {
1330
+ "name": "created_at",
1331
+ "type": "timestamp with time zone",
1332
+ "primaryKey": false,
1333
+ "notNull": true,
1334
+ "default": "now()"
1335
+ },
1336
+ "created_by": {
1337
+ "name": "created_by",
1338
+ "type": "text",
1339
+ "primaryKey": false,
1340
+ "notNull": true
1341
+ },
1342
+ "created_with": {
1343
+ "name": "created_with",
1344
+ "type": "uuid",
1345
+ "primaryKey": false,
1346
+ "notNull": false
1347
+ },
1348
+ "expires_at": {
1349
+ "name": "expires_at",
1350
+ "type": "timestamp with time zone",
1351
+ "primaryKey": false,
1352
+ "notNull": true
1353
+ }
1354
+ },
1355
+ "indexes": {
1356
+ "enrollments_binding_idx": {
1357
+ "name": "enrollments_binding_idx",
1358
+ "columns": [
1359
+ {
1360
+ "expression": "binding_id",
1361
+ "isExpression": false,
1362
+ "asc": true,
1363
+ "nulls": "last"
1364
+ },
1365
+ {
1366
+ "expression": "created_at",
1367
+ "isExpression": false,
1368
+ "asc": false,
1369
+ "nulls": "last"
1370
+ }
1371
+ ],
1372
+ "isUnique": false,
1373
+ "concurrently": false,
1374
+ "method": "btree",
1375
+ "with": {}
1376
+ }
1377
+ },
1378
+ "foreignKeys": {
1379
+ "enrollments_binding_id_fkey": {
1380
+ "name": "enrollments_binding_id_fkey",
1381
+ "tableFrom": "enrollments",
1382
+ "tableTo": "service_bindings",
1383
+ "columnsFrom": [
1384
+ "binding_id"
1385
+ ],
1386
+ "columnsTo": [
1387
+ "id"
1388
+ ],
1389
+ "onDelete": "restrict",
1390
+ "onUpdate": "no action"
1391
+ }
1392
+ },
1393
+ "compositePrimaryKeys": {},
1394
+ "uniqueConstraints": {
1395
+ "enrollments_code_hash_key": {
1396
+ "name": "enrollments_code_hash_key",
1397
+ "nullsNotDistinct": false,
1398
+ "columns": [
1399
+ "code_hash"
1400
+ ]
1401
+ }
1402
+ },
1403
+ "policies": {},
1404
+ "checkConstraints": {
1405
+ "enrollments_auth_mac_check": {
1406
+ "name": "enrollments_auth_mac_check",
1407
+ "value": "octet_length(\"enrollments\".\"auth_mac\") = 32"
1408
+ },
1409
+ "enrollments_code_hash_check": {
1410
+ "name": "enrollments_code_hash_check",
1411
+ "value": "octet_length(\"enrollments\".\"code_hash\") = 32"
1412
+ },
1413
+ "enrollments_scope_check": {
1414
+ "name": "enrollments_scope_check",
1415
+ "value": "\"enrollments\".\"scope\"::jsonb IS NOT NULL"
1416
+ }
1417
+ },
1418
+ "isRLSEnabled": false
1419
+ },
1420
+ "public.environments": {
1421
+ "name": "environments",
1422
+ "schema": "",
1423
+ "columns": {
1424
+ "id": {
1425
+ "name": "id",
1426
+ "type": "uuid",
1427
+ "primaryKey": true,
1428
+ "notNull": true,
1429
+ "default": "gen_random_uuid()"
1430
+ },
1431
+ "project_id": {
1432
+ "name": "project_id",
1433
+ "type": "uuid",
1434
+ "primaryKey": false,
1435
+ "notNull": true
1436
+ },
1437
+ "slug": {
1438
+ "name": "slug",
1439
+ "type": "text",
1440
+ "primaryKey": false,
1441
+ "notNull": true
1442
+ },
1443
+ "name": {
1444
+ "name": "name",
1445
+ "type": "text",
1446
+ "primaryKey": false,
1447
+ "notNull": true
1448
+ },
1449
+ "created_at": {
1450
+ "name": "created_at",
1451
+ "type": "timestamp with time zone",
1452
+ "primaryKey": false,
1453
+ "notNull": true,
1454
+ "default": "now()"
1455
+ },
1456
+ "archived_at": {
1457
+ "name": "archived_at",
1458
+ "type": "timestamp with time zone",
1459
+ "primaryKey": false,
1460
+ "notNull": false
1461
+ },
1462
+ "parent_id": {
1463
+ "name": "parent_id",
1464
+ "type": "uuid",
1465
+ "primaryKey": false,
1466
+ "notNull": false
1467
+ },
1468
+ "owner": {
1469
+ "name": "owner",
1470
+ "type": "text",
1471
+ "primaryKey": false,
1472
+ "notNull": false
1473
+ },
1474
+ "protected": {
1475
+ "name": "protected",
1476
+ "type": "boolean",
1477
+ "primaryKey": false,
1478
+ "notNull": false
1479
+ },
1480
+ "seal": {
1481
+ "name": "seal",
1482
+ "type": "bytea",
1483
+ "primaryKey": false,
1484
+ "notNull": false
1485
+ }
1486
+ },
1487
+ "indexes": {
1488
+ "environments_parent_id_owner_key": {
1489
+ "name": "environments_parent_id_owner_key",
1490
+ "columns": [
1491
+ {
1492
+ "expression": "parent_id",
1493
+ "isExpression": false,
1494
+ "asc": true,
1495
+ "nulls": "last"
1496
+ },
1497
+ {
1498
+ "expression": "owner",
1499
+ "isExpression": false,
1500
+ "asc": true,
1501
+ "nulls": "last"
1502
+ }
1503
+ ],
1504
+ "isUnique": true,
1505
+ "where": "strpos(\"environments\".\"slug\", '~') = 0",
1506
+ "concurrently": false,
1507
+ "method": "btree",
1508
+ "with": {}
1509
+ },
1510
+ "environments_parent_idx": {
1511
+ "name": "environments_parent_idx",
1512
+ "columns": [
1513
+ {
1514
+ "expression": "parent_id",
1515
+ "isExpression": false,
1516
+ "asc": true,
1517
+ "nulls": "last"
1518
+ }
1519
+ ],
1520
+ "isUnique": false,
1521
+ "concurrently": false,
1522
+ "method": "btree",
1523
+ "with": {}
1524
+ }
1525
+ },
1526
+ "foreignKeys": {
1527
+ "environments_project_id_fkey": {
1528
+ "name": "environments_project_id_fkey",
1529
+ "tableFrom": "environments",
1530
+ "tableTo": "projects",
1531
+ "columnsFrom": [
1532
+ "project_id"
1533
+ ],
1534
+ "columnsTo": [
1535
+ "id"
1536
+ ],
1537
+ "onDelete": "restrict",
1538
+ "onUpdate": "no action"
1539
+ },
1540
+ "environments_parent_in_project": {
1541
+ "name": "environments_parent_in_project",
1542
+ "tableFrom": "environments",
1543
+ "tableTo": "environments",
1544
+ "columnsFrom": [
1545
+ "parent_id",
1546
+ "project_id"
1547
+ ],
1548
+ "columnsTo": [
1549
+ "id",
1550
+ "project_id"
1551
+ ],
1552
+ "onDelete": "no action",
1553
+ "onUpdate": "no action"
1554
+ }
1555
+ },
1556
+ "compositePrimaryKeys": {},
1557
+ "uniqueConstraints": {
1558
+ "environments_project_id_slug_key": {
1559
+ "name": "environments_project_id_slug_key",
1560
+ "nullsNotDistinct": false,
1561
+ "columns": [
1562
+ "project_id",
1563
+ "slug"
1564
+ ]
1565
+ },
1566
+ "environments_project_scoped": {
1567
+ "name": "environments_project_scoped",
1568
+ "nullsNotDistinct": false,
1569
+ "columns": [
1570
+ "id",
1571
+ "project_id"
1572
+ ]
1573
+ }
1574
+ },
1575
+ "policies": {},
1576
+ "checkConstraints": {
1577
+ "environments_seal_check": {
1578
+ "name": "environments_seal_check",
1579
+ "value": "\"environments\".\"seal\" IS NULL OR octet_length(\"environments\".\"seal\") = 16"
1580
+ },
1581
+ "environments_slug_check": {
1582
+ "name": "environments_slug_check",
1583
+ "value": "\"environments\".\"slug\" ~ '^[a-z0-9][a-z0-9-]{0,62}(~[a-z0-9-]{1,40})?$'"
1584
+ },
1585
+ "environments_parent_check": {
1586
+ "name": "environments_parent_check",
1587
+ "value": "\"environments\".\"parent_id\" IS NULL OR \"environments\".\"parent_id\" <> \"environments\".\"id\""
1588
+ },
1589
+ "environments_owner_check": {
1590
+ "name": "environments_owner_check",
1591
+ "value": "\"environments\".\"owner\" IS NULL OR (\"environments\".\"parent_id\" IS NOT NULL AND \"environments\".\"owner\" LIKE 'user:_%')"
1592
+ }
1593
+ },
1594
+ "isRLSEnabled": false
1595
+ },
1596
+ "public.identities": {
1597
+ "name": "identities",
1598
+ "schema": "",
1599
+ "columns": {
1600
+ "id": {
1601
+ "name": "id",
1602
+ "type": "uuid",
1603
+ "primaryKey": true,
1604
+ "notNull": true,
1605
+ "default": "gen_random_uuid()"
1606
+ },
1607
+ "provider": {
1608
+ "name": "provider",
1609
+ "type": "text",
1610
+ "primaryKey": false,
1611
+ "notNull": true
1612
+ },
1613
+ "auth_mac": {
1614
+ "name": "auth_mac",
1615
+ "type": "bytea",
1616
+ "primaryKey": false,
1617
+ "notNull": true
1618
+ },
1619
+ "subject": {
1620
+ "name": "subject",
1621
+ "type": "text",
1622
+ "primaryKey": false,
1623
+ "notNull": true
1624
+ },
1625
+ "issuer_hash": {
1626
+ "name": "issuer_hash",
1627
+ "type": "text",
1628
+ "primaryKey": false,
1629
+ "notNull": true
1630
+ },
1631
+ "generation": {
1632
+ "name": "generation",
1633
+ "type": "integer",
1634
+ "primaryKey": false,
1635
+ "notNull": true
1636
+ },
1637
+ "principal": {
1638
+ "name": "principal",
1639
+ "type": "text",
1640
+ "primaryKey": false,
1641
+ "notNull": true
1642
+ },
1643
+ "email": {
1644
+ "name": "email",
1645
+ "type": "text",
1646
+ "primaryKey": false,
1647
+ "notNull": false
1648
+ },
1649
+ "created_at": {
1650
+ "name": "created_at",
1651
+ "type": "timestamp with time zone",
1652
+ "primaryKey": false,
1653
+ "notNull": true,
1654
+ "default": "now()"
1655
+ },
1656
+ "created_by": {
1657
+ "name": "created_by",
1658
+ "type": "text",
1659
+ "primaryKey": false,
1660
+ "notNull": true
1661
+ },
1662
+ "last_sign_in_at": {
1663
+ "name": "last_sign_in_at",
1664
+ "type": "timestamp with time zone",
1665
+ "primaryKey": false,
1666
+ "notNull": false
1667
+ },
1668
+ "revoked_at": {
1669
+ "name": "revoked_at",
1670
+ "type": "timestamp with time zone",
1671
+ "primaryKey": false,
1672
+ "notNull": false
1673
+ },
1674
+ "revoked_by": {
1675
+ "name": "revoked_by",
1676
+ "type": "text",
1677
+ "primaryKey": false,
1678
+ "notNull": false
1679
+ },
1680
+ "active_subject": {
1681
+ "name": "active_subject",
1682
+ "type": "text",
1683
+ "primaryKey": false,
1684
+ "notNull": false,
1685
+ "generated": {
1686
+ "as": "CASE WHEN revoked_at IS NULL THEN subject END",
1687
+ "type": "stored"
1688
+ }
1689
+ }
1690
+ },
1691
+ "indexes": {
1692
+ "identities_active_subject": {
1693
+ "name": "identities_active_subject",
1694
+ "columns": [
1695
+ {
1696
+ "expression": "provider",
1697
+ "isExpression": false,
1698
+ "asc": true,
1699
+ "nulls": "last"
1700
+ },
1701
+ {
1702
+ "expression": "issuer_hash",
1703
+ "isExpression": false,
1704
+ "asc": true,
1705
+ "nulls": "last"
1706
+ },
1707
+ {
1708
+ "expression": "active_subject",
1709
+ "isExpression": false,
1710
+ "asc": true,
1711
+ "nulls": "last"
1712
+ }
1713
+ ],
1714
+ "isUnique": true,
1715
+ "concurrently": false,
1716
+ "method": "btree",
1717
+ "with": {}
1718
+ },
1719
+ "identities_principal_idx": {
1720
+ "name": "identities_principal_idx",
1721
+ "columns": [
1722
+ {
1723
+ "expression": "principal",
1724
+ "isExpression": false,
1725
+ "asc": true,
1726
+ "nulls": "last"
1727
+ },
1728
+ {
1729
+ "expression": "generation",
1730
+ "isExpression": false,
1731
+ "asc": true,
1732
+ "nulls": "last"
1733
+ }
1734
+ ],
1735
+ "isUnique": false,
1736
+ "concurrently": false,
1737
+ "method": "btree",
1738
+ "with": {}
1739
+ }
1740
+ },
1741
+ "foreignKeys": {
1742
+ "identities_principal_fkey": {
1743
+ "name": "identities_principal_fkey",
1744
+ "tableFrom": "identities",
1745
+ "tableTo": "vault_members",
1746
+ "columnsFrom": [
1747
+ "principal"
1748
+ ],
1749
+ "columnsTo": [
1750
+ "principal"
1751
+ ],
1752
+ "onDelete": "restrict",
1753
+ "onUpdate": "no action"
1754
+ }
1755
+ },
1756
+ "compositePrimaryKeys": {},
1757
+ "uniqueConstraints": {
1758
+ "identities_member_generation_key": {
1759
+ "name": "identities_member_generation_key",
1760
+ "nullsNotDistinct": false,
1761
+ "columns": [
1762
+ "id",
1763
+ "principal",
1764
+ "generation"
1765
+ ]
1766
+ }
1767
+ },
1768
+ "policies": {},
1769
+ "checkConstraints": {
1770
+ "identities_principal_check": {
1771
+ "name": "identities_principal_check",
1772
+ "value": "\"identities\".\"principal\" LIKE 'user:%'"
1773
+ },
1774
+ "identities_provider_check": {
1775
+ "name": "identities_provider_check",
1776
+ "value": "\"identities\".\"provider\" ~ '^[a-z0-9][a-z0-9-]{0,31}$'"
1777
+ },
1778
+ "identities_auth_mac_check": {
1779
+ "name": "identities_auth_mac_check",
1780
+ "value": "octet_length(\"identities\".\"auth_mac\") = 32"
1781
+ }
1782
+ },
1783
+ "isRLSEnabled": false
1784
+ },
1785
+ "public.log_bulk": {
1786
+ "name": "log_bulk",
1787
+ "schema": "",
1788
+ "columns": {
1789
+ "principal": {
1790
+ "name": "principal",
1791
+ "type": "text",
1792
+ "primaryKey": false,
1793
+ "notNull": true
1794
+ },
1795
+ "secret": {
1796
+ "name": "secret",
1797
+ "type": "uuid",
1798
+ "primaryKey": false,
1799
+ "notNull": true
1800
+ },
1801
+ "last": {
1802
+ "name": "last",
1803
+ "type": "bigint",
1804
+ "primaryKey": false,
1805
+ "notNull": true
1806
+ }
1807
+ },
1808
+ "indexes": {},
1809
+ "foreignKeys": {},
1810
+ "compositePrimaryKeys": {
1811
+ "log_bulk_pkey": {
1812
+ "name": "log_bulk_pkey",
1813
+ "columns": [
1814
+ "principal",
1815
+ "secret"
1816
+ ]
1817
+ }
1818
+ },
1819
+ "uniqueConstraints": {},
1820
+ "policies": {},
1821
+ "checkConstraints": {},
1822
+ "isRLSEnabled": false
1823
+ },
1824
+ "public.log_changes": {
1825
+ "name": "log_changes",
1826
+ "schema": "",
1827
+ "columns": {
1828
+ "number": {
1829
+ "name": "number",
1830
+ "type": "bigint",
1831
+ "primaryKey": true,
1832
+ "notNull": true
1833
+ },
1834
+ "at": {
1835
+ "name": "at",
1836
+ "type": "bigint",
1837
+ "primaryKey": false,
1838
+ "notNull": true
1839
+ },
1840
+ "request_id": {
1841
+ "name": "request_id",
1842
+ "type": "text",
1843
+ "primaryKey": false,
1844
+ "notNull": true
1845
+ },
1846
+ "object": {
1847
+ "name": "object",
1848
+ "type": "uuid",
1849
+ "primaryKey": false,
1850
+ "notNull": true
1851
+ },
1852
+ "actor": {
1853
+ "name": "actor",
1854
+ "type": "text",
1855
+ "primaryKey": false,
1856
+ "notNull": true
1857
+ },
1858
+ "payload": {
1859
+ "name": "payload",
1860
+ "type": "text",
1861
+ "primaryKey": false,
1862
+ "notNull": true
1863
+ },
1864
+ "seal": {
1865
+ "name": "seal",
1866
+ "type": "bytea",
1867
+ "primaryKey": false,
1868
+ "notNull": false
1869
+ },
1870
+ "mac": {
1871
+ "name": "mac",
1872
+ "type": "bytea",
1873
+ "primaryKey": false,
1874
+ "notNull": true
1875
+ }
1876
+ },
1877
+ "indexes": {
1878
+ "log_changes_object_idx": {
1879
+ "name": "log_changes_object_idx",
1880
+ "columns": [
1881
+ {
1882
+ "expression": "object",
1883
+ "isExpression": false,
1884
+ "asc": true,
1885
+ "nulls": "last"
1886
+ },
1887
+ {
1888
+ "expression": "number",
1889
+ "isExpression": false,
1890
+ "asc": true,
1891
+ "nulls": "last"
1892
+ }
1893
+ ],
1894
+ "isUnique": false,
1895
+ "concurrently": false,
1896
+ "method": "btree",
1897
+ "with": {}
1898
+ },
1899
+ "log_changes_sign_in_idx": {
1900
+ "name": "log_changes_sign_in_idx",
1901
+ "columns": [
1902
+ {
1903
+ "expression": "at",
1904
+ "isExpression": false,
1905
+ "asc": true,
1906
+ "nulls": "last"
1907
+ },
1908
+ {
1909
+ "expression": "number",
1910
+ "isExpression": false,
1911
+ "asc": true,
1912
+ "nulls": "last"
1913
+ }
1914
+ ],
1915
+ "isUnique": false,
1916
+ "where": "strpos(\"log_changes\".\"payload\", '\"signIn\":{') > 0",
1917
+ "concurrently": false,
1918
+ "method": "btree",
1919
+ "with": {}
1920
+ },
1921
+ "log_changes_sign_in_actor_idx": {
1922
+ "name": "log_changes_sign_in_actor_idx",
1923
+ "columns": [
1924
+ {
1925
+ "expression": "actor",
1926
+ "isExpression": false,
1927
+ "asc": true,
1928
+ "nulls": "last"
1929
+ },
1930
+ {
1931
+ "expression": "at",
1932
+ "isExpression": false,
1933
+ "asc": true,
1934
+ "nulls": "last"
1935
+ },
1936
+ {
1937
+ "expression": "number",
1938
+ "isExpression": false,
1939
+ "asc": true,
1940
+ "nulls": "last"
1941
+ }
1942
+ ],
1943
+ "isUnique": false,
1944
+ "where": "strpos(\"log_changes\".\"payload\", '\"signIn\":{') > 0",
1945
+ "concurrently": false,
1946
+ "method": "btree",
1947
+ "with": {}
1948
+ },
1949
+ "log_changes_issue_revoke_idx": {
1950
+ "name": "log_changes_issue_revoke_idx",
1951
+ "columns": [
1952
+ {
1953
+ "expression": "at",
1954
+ "isExpression": false,
1955
+ "asc": true,
1956
+ "nulls": "last"
1957
+ },
1958
+ {
1959
+ "expression": "number",
1960
+ "isExpression": false,
1961
+ "asc": true,
1962
+ "nulls": "last"
1963
+ }
1964
+ ],
1965
+ "isUnique": false,
1966
+ "where": "((strpos(\"log_changes\".\"payload\", '{\"caller\":\"') = 1 AND strpos(\"log_changes\".\"payload\", '\"issue\":{\"by\":\"') > 0) OR (strpos(\"log_changes\".\"payload\", '{\"op\":\"credential.revoke\",') = 1 AND strpos(\"log_changes\".\"payload\", '\"reason\":\"revoke\"') > 0) OR (strpos(\"log_changes\".\"payload\", '{\"op\":\"credential.revoke\",') = 1 AND strpos(\"log_changes\".\"payload\", '\"reason\":\"sign_out\"') > 0))",
1967
+ "concurrently": false,
1968
+ "method": "btree",
1969
+ "with": {}
1970
+ },
1971
+ "log_changes_issue_revoke_actor_idx": {
1972
+ "name": "log_changes_issue_revoke_actor_idx",
1973
+ "columns": [
1974
+ {
1975
+ "expression": "actor",
1976
+ "isExpression": false,
1977
+ "asc": true,
1978
+ "nulls": "last"
1979
+ },
1980
+ {
1981
+ "expression": "at",
1982
+ "isExpression": false,
1983
+ "asc": true,
1984
+ "nulls": "last"
1985
+ },
1986
+ {
1987
+ "expression": "number",
1988
+ "isExpression": false,
1989
+ "asc": true,
1990
+ "nulls": "last"
1991
+ }
1992
+ ],
1993
+ "isUnique": false,
1994
+ "where": "((strpos(\"log_changes\".\"payload\", '{\"caller\":\"') = 1 AND strpos(\"log_changes\".\"payload\", '\"issue\":{\"by\":\"') > 0) OR (strpos(\"log_changes\".\"payload\", '{\"op\":\"credential.revoke\",') = 1 AND strpos(\"log_changes\".\"payload\", '\"reason\":\"revoke\"') > 0) OR (strpos(\"log_changes\".\"payload\", '{\"op\":\"credential.revoke\",') = 1 AND strpos(\"log_changes\".\"payload\", '\"reason\":\"sign_out\"') > 0))",
1995
+ "concurrently": false,
1996
+ "method": "btree",
1997
+ "with": {}
1998
+ }
1999
+ },
2000
+ "foreignKeys": {},
2001
+ "compositePrimaryKeys": {},
2002
+ "uniqueConstraints": {
2003
+ "log_changes_request_id_key": {
2004
+ "name": "log_changes_request_id_key",
2005
+ "nullsNotDistinct": false,
2006
+ "columns": [
2007
+ "request_id"
2008
+ ]
2009
+ }
2010
+ },
2011
+ "policies": {},
2012
+ "checkConstraints": {
2013
+ "log_changes_seal_check": {
2014
+ "name": "log_changes_seal_check",
2015
+ "value": "\"log_changes\".\"seal\" IS NULL OR octet_length(\"log_changes\".\"seal\") = 16"
2016
+ },
2017
+ "log_changes_mac_check": {
2018
+ "name": "log_changes_mac_check",
2019
+ "value": "octet_length(\"log_changes\".\"mac\") = 16"
2020
+ }
2021
+ },
2022
+ "isRLSEnabled": false
2023
+ },
2024
+ "public.log_checkpoints": {
2025
+ "name": "log_checkpoints",
2026
+ "schema": "",
2027
+ "columns": {
2028
+ "upto": {
2029
+ "name": "upto",
2030
+ "type": "bigint",
2031
+ "primaryKey": true,
2032
+ "notNull": true
2033
+ },
2034
+ "at": {
2035
+ "name": "at",
2036
+ "type": "bigint",
2037
+ "primaryKey": false,
2038
+ "notNull": true
2039
+ },
2040
+ "at_floor": {
2041
+ "name": "at_floor",
2042
+ "type": "bigint",
2043
+ "primaryKey": false,
2044
+ "notNull": true
2045
+ },
2046
+ "changes_size": {
2047
+ "name": "changes_size",
2048
+ "type": "bigint",
2049
+ "primaryKey": false,
2050
+ "notNull": true
2051
+ },
2052
+ "changes_root": {
2053
+ "name": "changes_root",
2054
+ "type": "bytea",
2055
+ "primaryKey": false,
2056
+ "notNull": true
2057
+ },
2058
+ "changes_note": {
2059
+ "name": "changes_note",
2060
+ "type": "text",
2061
+ "primaryKey": false,
2062
+ "notNull": true
2063
+ },
2064
+ "uses_size": {
2065
+ "name": "uses_size",
2066
+ "type": "bigint",
2067
+ "primaryKey": false,
2068
+ "notNull": true
2069
+ },
2070
+ "uses_root": {
2071
+ "name": "uses_root",
2072
+ "type": "bytea",
2073
+ "primaryKey": false,
2074
+ "notNull": true
2075
+ },
2076
+ "uses_note": {
2077
+ "name": "uses_note",
2078
+ "type": "text",
2079
+ "primaryKey": false,
2080
+ "notNull": true
2081
+ }
2082
+ },
2083
+ "indexes": {
2084
+ "log_checkpoints_floor_idx": {
2085
+ "name": "log_checkpoints_floor_idx",
2086
+ "columns": [
2087
+ {
2088
+ "expression": "at_floor",
2089
+ "isExpression": false,
2090
+ "asc": true,
2091
+ "nulls": "last"
2092
+ },
2093
+ {
2094
+ "expression": "upto",
2095
+ "isExpression": false,
2096
+ "asc": true,
2097
+ "nulls": "last"
2098
+ }
2099
+ ],
2100
+ "isUnique": false,
2101
+ "concurrently": false,
2102
+ "method": "btree",
2103
+ "with": {}
2104
+ }
2105
+ },
2106
+ "foreignKeys": {},
2107
+ "compositePrimaryKeys": {},
2108
+ "uniqueConstraints": {},
2109
+ "policies": {},
2110
+ "checkConstraints": {
2111
+ "log_checkpoints_changes_root_check": {
2112
+ "name": "log_checkpoints_changes_root_check",
2113
+ "value": "octet_length(\"log_checkpoints\".\"changes_root\") = 32"
2114
+ },
2115
+ "log_checkpoints_uses_root_check": {
2116
+ "name": "log_checkpoints_uses_root_check",
2117
+ "value": "octet_length(\"log_checkpoints\".\"uses_root\") = 32"
2118
+ }
2119
+ },
2120
+ "isRLSEnabled": false
2121
+ },
2122
+ "public.log_config": {
2123
+ "name": "log_config",
2124
+ "schema": "",
2125
+ "columns": {
2126
+ "name": {
2127
+ "name": "name",
2128
+ "type": "text",
2129
+ "primaryKey": true,
2130
+ "notNull": true
2131
+ },
2132
+ "value": {
2133
+ "name": "value",
2134
+ "type": "text",
2135
+ "primaryKey": false,
2136
+ "notNull": true
2137
+ },
2138
+ "seal": {
2139
+ "name": "seal",
2140
+ "type": "bytea",
2141
+ "primaryKey": false,
2142
+ "notNull": false
2143
+ }
2144
+ },
2145
+ "indexes": {},
2146
+ "foreignKeys": {},
2147
+ "compositePrimaryKeys": {},
2148
+ "uniqueConstraints": {},
2149
+ "policies": {},
2150
+ "checkConstraints": {
2151
+ "log_config_name_check": {
2152
+ "name": "log_config_name_check",
2153
+ "value": "\"log_config\".\"name\" IN ('policy', 'roles')"
2154
+ },
2155
+ "log_config_value_check": {
2156
+ "name": "log_config_value_check",
2157
+ "value": "\"log_config\".\"value\"::jsonb IS NOT NULL"
2158
+ },
2159
+ "log_config_seal_check": {
2160
+ "name": "log_config_seal_check",
2161
+ "value": "\"log_config\".\"seal\" IS NULL OR octet_length(\"log_config\".\"seal\") = 16"
2162
+ }
2163
+ },
2164
+ "isRLSEnabled": false
2165
+ },
2166
+ "public.log_fence": {
2167
+ "name": "log_fence",
2168
+ "schema": "",
2169
+ "columns": {
2170
+ "only_row": {
2171
+ "name": "only_row",
2172
+ "type": "boolean",
2173
+ "primaryKey": true,
2174
+ "notNull": true,
2175
+ "default": true
2176
+ },
2177
+ "at_floor": {
2178
+ "name": "at_floor",
2179
+ "type": "bigint",
2180
+ "primaryKey": false,
2181
+ "notNull": true
2182
+ }
2183
+ },
2184
+ "indexes": {},
2185
+ "foreignKeys": {},
2186
+ "compositePrimaryKeys": {},
2187
+ "uniqueConstraints": {},
2188
+ "policies": {},
2189
+ "checkConstraints": {
2190
+ "log_fence_only_row_check": {
2191
+ "name": "log_fence_only_row_check",
2192
+ "value": "\"log_fence\".\"only_row\""
2193
+ }
2194
+ },
2195
+ "isRLSEnabled": false
2196
+ },
2197
+ "public.log_read_days": {
2198
+ "name": "log_read_days",
2199
+ "schema": "",
2200
+ "columns": {
2201
+ "principal": {
2202
+ "name": "principal",
2203
+ "type": "text",
2204
+ "primaryKey": false,
2205
+ "notNull": true
2206
+ },
2207
+ "day": {
2208
+ "name": "day",
2209
+ "type": "integer",
2210
+ "primaryKey": false,
2211
+ "notNull": true
2212
+ }
2213
+ },
2214
+ "indexes": {},
2215
+ "foreignKeys": {},
2216
+ "compositePrimaryKeys": {
2217
+ "log_read_days_pkey": {
2218
+ "name": "log_read_days_pkey",
2219
+ "columns": [
2220
+ "principal",
2221
+ "day"
2222
+ ]
2223
+ }
2224
+ },
2225
+ "uniqueConstraints": {},
2226
+ "policies": {},
2227
+ "checkConstraints": {},
2228
+ "isRLSEnabled": false
2229
+ },
2230
+ "public.log_reads": {
2231
+ "name": "log_reads",
2232
+ "schema": "",
2233
+ "columns": {
2234
+ "number": {
2235
+ "name": "number",
2236
+ "type": "bigint",
2237
+ "primaryKey": false,
2238
+ "notNull": true
2239
+ },
2240
+ "at": {
2241
+ "name": "at",
2242
+ "type": "bigint",
2243
+ "primaryKey": false,
2244
+ "notNull": true
2245
+ },
2246
+ "credential": {
2247
+ "name": "credential",
2248
+ "type": "uuid",
2249
+ "primaryKey": false,
2250
+ "notNull": true
2251
+ },
2252
+ "purpose": {
2253
+ "name": "purpose",
2254
+ "type": "smallint",
2255
+ "primaryKey": false,
2256
+ "notNull": true
2257
+ },
2258
+ "principal": {
2259
+ "name": "principal",
2260
+ "type": "text",
2261
+ "primaryKey": false,
2262
+ "notNull": true
2263
+ },
2264
+ "secret": {
2265
+ "name": "secret",
2266
+ "type": "uuid",
2267
+ "primaryKey": false,
2268
+ "notNull": true
2269
+ },
2270
+ "environment": {
2271
+ "name": "environment",
2272
+ "type": "uuid",
2273
+ "primaryKey": false,
2274
+ "notNull": true
2275
+ },
2276
+ "project": {
2277
+ "name": "project",
2278
+ "type": "uuid",
2279
+ "primaryKey": false,
2280
+ "notNull": true
2281
+ },
2282
+ "place": {
2283
+ "name": "place",
2284
+ "type": "uuid",
2285
+ "primaryKey": false,
2286
+ "notNull": false
2287
+ },
2288
+ "source": {
2289
+ "name": "source",
2290
+ "type": "uuid",
2291
+ "primaryKey": false,
2292
+ "notNull": false
2293
+ },
2294
+ "source_environment": {
2295
+ "name": "source_environment",
2296
+ "type": "uuid",
2297
+ "primaryKey": false,
2298
+ "notNull": false
2299
+ },
2300
+ "source_project": {
2301
+ "name": "source_project",
2302
+ "type": "uuid",
2303
+ "primaryKey": false,
2304
+ "notNull": false
2305
+ },
2306
+ "version": {
2307
+ "name": "version",
2308
+ "type": "uuid",
2309
+ "primaryKey": false,
2310
+ "notNull": false
2311
+ },
2312
+ "mac": {
2313
+ "name": "mac",
2314
+ "type": "bytea",
2315
+ "primaryKey": false,
2316
+ "notNull": true
2317
+ }
2318
+ },
2319
+ "indexes": {
2320
+ "log_reads_number_idx": {
2321
+ "name": "log_reads_number_idx",
2322
+ "columns": [
2323
+ {
2324
+ "expression": "at",
2325
+ "isExpression": false,
2326
+ "asc": true,
2327
+ "nulls": "last"
2328
+ },
2329
+ {
2330
+ "expression": "number",
2331
+ "isExpression": false,
2332
+ "asc": true,
2333
+ "nulls": "last"
2334
+ }
2335
+ ],
2336
+ "isUnique": true,
2337
+ "concurrently": false,
2338
+ "method": "btree",
2339
+ "with": {}
2340
+ },
2341
+ "log_reads_principal_idx": {
2342
+ "name": "log_reads_principal_idx",
2343
+ "columns": [
2344
+ {
2345
+ "expression": "principal",
2346
+ "isExpression": false,
2347
+ "asc": true,
2348
+ "nulls": "last"
2349
+ },
2350
+ {
2351
+ "expression": "at",
2352
+ "isExpression": false,
2353
+ "asc": true,
2354
+ "nulls": "last"
2355
+ },
2356
+ {
2357
+ "expression": "number",
2358
+ "isExpression": false,
2359
+ "asc": true,
2360
+ "nulls": "last"
2361
+ }
2362
+ ],
2363
+ "isUnique": false,
2364
+ "concurrently": false,
2365
+ "method": "btree",
2366
+ "with": {}
2367
+ }
2368
+ },
2369
+ "foreignKeys": {},
2370
+ "compositePrimaryKeys": {},
2371
+ "uniqueConstraints": {},
2372
+ "policies": {},
2373
+ "checkConstraints": {
2374
+ "log_reads_mac_check": {
2375
+ "name": "log_reads_mac_check",
2376
+ "value": "octet_length(\"log_reads\".\"mac\") = 16"
2377
+ }
2378
+ },
2379
+ "isRLSEnabled": false
2380
+ },
2381
+ "public.log_reads_cursor": {
2382
+ "name": "log_reads_cursor",
2383
+ "schema": "",
2384
+ "columns": {
2385
+ "only_row": {
2386
+ "name": "only_row",
2387
+ "type": "boolean",
2388
+ "primaryKey": true,
2389
+ "notNull": true,
2390
+ "default": true
2391
+ },
2392
+ "through": {
2393
+ "name": "through",
2394
+ "type": "bigint",
2395
+ "primaryKey": false,
2396
+ "notNull": true
2397
+ },
2398
+ "pair": {
2399
+ "name": "pair",
2400
+ "type": "bigint",
2401
+ "primaryKey": false,
2402
+ "notNull": true
2403
+ },
2404
+ "at": {
2405
+ "name": "at",
2406
+ "type": "bigint",
2407
+ "primaryKey": false,
2408
+ "notNull": true
2409
+ },
2410
+ "mac": {
2411
+ "name": "mac",
2412
+ "type": "bytea",
2413
+ "primaryKey": false,
2414
+ "notNull": false
2415
+ }
2416
+ },
2417
+ "indexes": {},
2418
+ "foreignKeys": {},
2419
+ "compositePrimaryKeys": {},
2420
+ "uniqueConstraints": {},
2421
+ "policies": {},
2422
+ "checkConstraints": {
2423
+ "log_reads_cursor_only_row_check": {
2424
+ "name": "log_reads_cursor_only_row_check",
2425
+ "value": "\"log_reads_cursor\".\"only_row\""
2426
+ },
2427
+ "log_reads_cursor_mac_check": {
2428
+ "name": "log_reads_cursor_mac_check",
2429
+ "value": "\"log_reads_cursor\".\"mac\" IS NULL OR octet_length(\"log_reads_cursor\".\"mac\") = 16"
2430
+ }
2431
+ },
2432
+ "isRLSEnabled": false
2433
+ },
2434
+ "public.log_tiles": {
2435
+ "name": "log_tiles",
2436
+ "schema": "",
2437
+ "columns": {
2438
+ "tree": {
2439
+ "name": "tree",
2440
+ "type": "text",
2441
+ "primaryKey": false,
2442
+ "notNull": true
2443
+ },
2444
+ "level": {
2445
+ "name": "level",
2446
+ "type": "smallint",
2447
+ "primaryKey": false,
2448
+ "notNull": true
2449
+ },
2450
+ "leaf": {
2451
+ "name": "leaf",
2452
+ "type": "bigint",
2453
+ "primaryKey": false,
2454
+ "notNull": true
2455
+ },
2456
+ "hashes": {
2457
+ "name": "hashes",
2458
+ "type": "bytea",
2459
+ "primaryKey": false,
2460
+ "notNull": true
2461
+ }
2462
+ },
2463
+ "indexes": {},
2464
+ "foreignKeys": {},
2465
+ "compositePrimaryKeys": {
2466
+ "log_tiles_pkey": {
2467
+ "name": "log_tiles_pkey",
2468
+ "columns": [
2469
+ "tree",
2470
+ "level",
2471
+ "leaf"
2472
+ ]
2473
+ }
2474
+ },
2475
+ "uniqueConstraints": {},
2476
+ "policies": {},
2477
+ "checkConstraints": {
2478
+ "log_tiles_tree_check": {
2479
+ "name": "log_tiles_tree_check",
2480
+ "value": "\"log_tiles\".\"tree\" IN ('changes', 'uses')"
2481
+ },
2482
+ "log_tiles_level_check": {
2483
+ "name": "log_tiles_level_check",
2484
+ "value": "\"log_tiles\".\"level\" BETWEEN 0 AND 7"
2485
+ },
2486
+ "log_tiles_leaf_check": {
2487
+ "name": "log_tiles_leaf_check",
2488
+ "value": "\"log_tiles\".\"leaf\" >= 0 AND \"log_tiles\".\"leaf\" % (256::numeric ^ (\"log_tiles\".\"level\" + 1)) = 0"
2489
+ },
2490
+ "log_tiles_hashes_check": {
2491
+ "name": "log_tiles_hashes_check",
2492
+ "value": "octet_length(\"log_tiles\".\"hashes\") BETWEEN 32 AND 8192 AND octet_length(\"log_tiles\".\"hashes\") % 32 = 0"
2493
+ }
2494
+ },
2495
+ "isRLSEnabled": false
2496
+ },
2497
+ "public.log_uses": {
2498
+ "name": "log_uses",
2499
+ "schema": "",
2500
+ "columns": {
2501
+ "number": {
2502
+ "name": "number",
2503
+ "type": "bigint",
2504
+ "primaryKey": false,
2505
+ "notNull": true
2506
+ },
2507
+ "at": {
2508
+ "name": "at",
2509
+ "type": "bigint",
2510
+ "primaryKey": false,
2511
+ "notNull": true
2512
+ },
2513
+ "request_id": {
2514
+ "name": "request_id",
2515
+ "type": "bigint",
2516
+ "primaryKey": false,
2517
+ "notNull": true
2518
+ },
2519
+ "credential": {
2520
+ "name": "credential",
2521
+ "type": "uuid",
2522
+ "primaryKey": false,
2523
+ "notNull": true
2524
+ },
2525
+ "secret": {
2526
+ "name": "secret",
2527
+ "type": "uuid",
2528
+ "primaryKey": false,
2529
+ "notNull": true
2530
+ },
2531
+ "purpose": {
2532
+ "name": "purpose",
2533
+ "type": "smallint",
2534
+ "primaryKey": false,
2535
+ "notNull": true
2536
+ },
2537
+ "mac": {
2538
+ "name": "mac",
2539
+ "type": "bytea",
2540
+ "primaryKey": false,
2541
+ "notNull": true
2542
+ },
2543
+ "place": {
2544
+ "name": "place",
2545
+ "type": "uuid",
2546
+ "primaryKey": false,
2547
+ "notNull": false
2548
+ }
2549
+ },
2550
+ "indexes": {
2551
+ "log_uses_request_idx": {
2552
+ "name": "log_uses_request_idx",
2553
+ "columns": [
2554
+ {
2555
+ "expression": "at",
2556
+ "isExpression": false,
2557
+ "asc": true,
2558
+ "nulls": "last"
2559
+ },
2560
+ {
2561
+ "expression": "request_id",
2562
+ "isExpression": false,
2563
+ "asc": true,
2564
+ "nulls": "last"
2565
+ }
2566
+ ],
2567
+ "isUnique": true,
2568
+ "concurrently": false,
2569
+ "method": "btree",
2570
+ "with": {}
2571
+ }
2572
+ },
2573
+ "foreignKeys": {},
2574
+ "compositePrimaryKeys": {},
2575
+ "uniqueConstraints": {},
2576
+ "policies": {},
2577
+ "checkConstraints": {
2578
+ "log_uses_mac_check": {
2579
+ "name": "log_uses_mac_check",
2580
+ "value": "octet_length(\"log_uses\".\"mac\") = 16"
2581
+ }
2582
+ },
2583
+ "isRLSEnabled": false
2584
+ },
2585
+ "public.mcp_approvals": {
2586
+ "name": "mcp_approvals",
2587
+ "schema": "",
2588
+ "columns": {
2589
+ "id": {
2590
+ "name": "id",
2591
+ "type": "uuid",
2592
+ "primaryKey": true,
2593
+ "notNull": true
2594
+ },
2595
+ "connection_id": {
2596
+ "name": "connection_id",
2597
+ "type": "uuid",
2598
+ "primaryKey": false,
2599
+ "notNull": true
2600
+ },
2601
+ "tool": {
2602
+ "name": "tool",
2603
+ "type": "text",
2604
+ "primaryKey": false,
2605
+ "notNull": true
2606
+ },
2607
+ "arguments": {
2608
+ "name": "arguments",
2609
+ "type": "text",
2610
+ "primaryKey": false,
2611
+ "notNull": true
2612
+ },
2613
+ "digest": {
2614
+ "name": "digest",
2615
+ "type": "bytea",
2616
+ "primaryKey": false,
2617
+ "notNull": true
2618
+ },
2619
+ "status": {
2620
+ "name": "status",
2621
+ "type": "text",
2622
+ "primaryKey": false,
2623
+ "notNull": true,
2624
+ "default": "'pending'"
2625
+ },
2626
+ "outcome": {
2627
+ "name": "outcome",
2628
+ "type": "text",
2629
+ "primaryKey": false,
2630
+ "notNull": false
2631
+ },
2632
+ "created_at": {
2633
+ "name": "created_at",
2634
+ "type": "timestamp with time zone",
2635
+ "primaryKey": false,
2636
+ "notNull": true,
2637
+ "default": "now()"
2638
+ },
2639
+ "expires_at": {
2640
+ "name": "expires_at",
2641
+ "type": "timestamp with time zone",
2642
+ "primaryKey": false,
2643
+ "notNull": true
2644
+ },
2645
+ "decided_at": {
2646
+ "name": "decided_at",
2647
+ "type": "timestamp with time zone",
2648
+ "primaryKey": false,
2649
+ "notNull": false
2650
+ },
2651
+ "reported_at": {
2652
+ "name": "reported_at",
2653
+ "type": "timestamp with time zone",
2654
+ "primaryKey": false,
2655
+ "notNull": false
2656
+ }
2657
+ },
2658
+ "indexes": {
2659
+ "mcp_approvals_open_idx": {
2660
+ "name": "mcp_approvals_open_idx",
2661
+ "columns": [
2662
+ {
2663
+ "expression": "connection_id",
2664
+ "isExpression": false,
2665
+ "asc": true,
2666
+ "nulls": "last"
2667
+ },
2668
+ {
2669
+ "expression": "digest",
2670
+ "isExpression": false,
2671
+ "asc": true,
2672
+ "nulls": "last"
2673
+ }
2674
+ ],
2675
+ "isUnique": false,
2676
+ "where": "\"mcp_approvals\".\"reported_at\" IS NULL",
2677
+ "concurrently": false,
2678
+ "method": "btree",
2679
+ "with": {}
2680
+ }
2681
+ },
2682
+ "foreignKeys": {
2683
+ "mcp_approvals_connection_fkey": {
2684
+ "name": "mcp_approvals_connection_fkey",
2685
+ "tableFrom": "mcp_approvals",
2686
+ "tableTo": "mcp_connections",
2687
+ "columnsFrom": [
2688
+ "connection_id"
2689
+ ],
2690
+ "columnsTo": [
2691
+ "id"
2692
+ ],
2693
+ "onDelete": "restrict",
2694
+ "onUpdate": "no action"
2695
+ }
2696
+ },
2697
+ "compositePrimaryKeys": {},
2698
+ "uniqueConstraints": {},
2699
+ "policies": {},
2700
+ "checkConstraints": {
2701
+ "mcp_approvals_status_check": {
2702
+ "name": "mcp_approvals_status_check",
2703
+ "value": "\"mcp_approvals\".\"status\" IN ('pending', 'approved', 'denied', 'cancelled', 'failed')"
2704
+ },
2705
+ "mcp_approvals_digest_check": {
2706
+ "name": "mcp_approvals_digest_check",
2707
+ "value": "octet_length(\"mcp_approvals\".\"digest\") = 32"
2708
+ },
2709
+ "mcp_approvals_arguments_check": {
2710
+ "name": "mcp_approvals_arguments_check",
2711
+ "value": "\"mcp_approvals\".\"arguments\"::jsonb IS NOT NULL"
2712
+ }
2713
+ },
2714
+ "isRLSEnabled": false
2715
+ },
2716
+ "public.mcp_connections": {
2717
+ "name": "mcp_connections",
2718
+ "schema": "",
2719
+ "columns": {
2720
+ "id": {
2721
+ "name": "id",
2722
+ "type": "uuid",
2723
+ "primaryKey": true,
2724
+ "notNull": true
2725
+ },
2726
+ "auth_mac": {
2727
+ "name": "auth_mac",
2728
+ "type": "bytea",
2729
+ "primaryKey": false,
2730
+ "notNull": true
2731
+ },
2732
+ "principal": {
2733
+ "name": "principal",
2734
+ "type": "text",
2735
+ "primaryKey": false,
2736
+ "notNull": true
2737
+ },
2738
+ "generation": {
2739
+ "name": "generation",
2740
+ "type": "integer",
2741
+ "primaryKey": false,
2742
+ "notNull": true
2743
+ },
2744
+ "client_id": {
2745
+ "name": "client_id",
2746
+ "type": "text",
2747
+ "primaryKey": false,
2748
+ "notNull": true
2749
+ },
2750
+ "client_name": {
2751
+ "name": "client_name",
2752
+ "type": "text",
2753
+ "primaryKey": false,
2754
+ "notNull": true
2755
+ },
2756
+ "client_host": {
2757
+ "name": "client_host",
2758
+ "type": "text",
2759
+ "primaryKey": false,
2760
+ "notNull": false
2761
+ },
2762
+ "registration": {
2763
+ "name": "registration",
2764
+ "type": "text",
2765
+ "primaryKey": false,
2766
+ "notNull": true
2767
+ },
2768
+ "scopes": {
2769
+ "name": "scopes",
2770
+ "type": "text",
2771
+ "primaryKey": false,
2772
+ "notNull": true
2773
+ },
2774
+ "redirect_uri": {
2775
+ "name": "redirect_uri",
2776
+ "type": "text",
2777
+ "primaryKey": false,
2778
+ "notNull": true
2779
+ },
2780
+ "code_hash": {
2781
+ "name": "code_hash",
2782
+ "type": "bytea",
2783
+ "primaryKey": false,
2784
+ "notNull": false
2785
+ },
2786
+ "code_challenge": {
2787
+ "name": "code_challenge",
2788
+ "type": "text",
2789
+ "primaryKey": false,
2790
+ "notNull": false
2791
+ },
2792
+ "code_expires_at": {
2793
+ "name": "code_expires_at",
2794
+ "type": "timestamp with time zone",
2795
+ "primaryKey": false,
2796
+ "notNull": false
2797
+ },
2798
+ "refresh_hash": {
2799
+ "name": "refresh_hash",
2800
+ "type": "bytea",
2801
+ "primaryKey": false,
2802
+ "notNull": false
2803
+ },
2804
+ "refresh_previous_hash": {
2805
+ "name": "refresh_previous_hash",
2806
+ "type": "bytea",
2807
+ "primaryKey": false,
2808
+ "notNull": false
2809
+ },
2810
+ "expires_at": {
2811
+ "name": "expires_at",
2812
+ "type": "timestamp with time zone",
2813
+ "primaryKey": false,
2814
+ "notNull": true
2815
+ },
2816
+ "created_at": {
2817
+ "name": "created_at",
2818
+ "type": "timestamp with time zone",
2819
+ "primaryKey": false,
2820
+ "notNull": true,
2821
+ "default": "now()"
2822
+ },
2823
+ "last_used_at": {
2824
+ "name": "last_used_at",
2825
+ "type": "timestamp with time zone",
2826
+ "primaryKey": false,
2827
+ "notNull": false
2828
+ },
2829
+ "last_used_ip": {
2830
+ "name": "last_used_ip",
2831
+ "type": "text",
2832
+ "primaryKey": false,
2833
+ "notNull": false
2834
+ },
2835
+ "revoked_at": {
2836
+ "name": "revoked_at",
2837
+ "type": "timestamp with time zone",
2838
+ "primaryKey": false,
2839
+ "notNull": false
2840
+ },
2841
+ "revoked_by": {
2842
+ "name": "revoked_by",
2843
+ "type": "text",
2844
+ "primaryKey": false,
2845
+ "notNull": false
2846
+ },
2847
+ "seal": {
2848
+ "name": "seal",
2849
+ "type": "bytea",
2850
+ "primaryKey": false,
2851
+ "notNull": false
2852
+ }
2853
+ },
2854
+ "indexes": {
2855
+ "mcp_connections_refresh_previous_idx": {
2856
+ "name": "mcp_connections_refresh_previous_idx",
2857
+ "columns": [
2858
+ {
2859
+ "expression": "refresh_previous_hash",
2860
+ "isExpression": false,
2861
+ "asc": true,
2862
+ "nulls": "last"
2863
+ }
2864
+ ],
2865
+ "isUnique": false,
2866
+ "concurrently": false,
2867
+ "method": "btree",
2868
+ "with": {}
2869
+ },
2870
+ "mcp_connections_live_idx": {
2871
+ "name": "mcp_connections_live_idx",
2872
+ "columns": [
2873
+ {
2874
+ "expression": "principal",
2875
+ "isExpression": false,
2876
+ "asc": true,
2877
+ "nulls": "last"
2878
+ },
2879
+ {
2880
+ "expression": "expires_at",
2881
+ "isExpression": false,
2882
+ "asc": true,
2883
+ "nulls": "last"
2884
+ }
2885
+ ],
2886
+ "isUnique": false,
2887
+ "where": "\"mcp_connections\".\"revoked_at\" IS NULL",
2888
+ "concurrently": false,
2889
+ "method": "btree",
2890
+ "with": {}
2891
+ }
2892
+ },
2893
+ "foreignKeys": {
2894
+ "mcp_connections_principal_fkey": {
2895
+ "name": "mcp_connections_principal_fkey",
2896
+ "tableFrom": "mcp_connections",
2897
+ "tableTo": "vault_members",
2898
+ "columnsFrom": [
2899
+ "principal"
2900
+ ],
2901
+ "columnsTo": [
2902
+ "principal"
2903
+ ],
2904
+ "onDelete": "restrict",
2905
+ "onUpdate": "no action"
2906
+ }
2907
+ },
2908
+ "compositePrimaryKeys": {},
2909
+ "uniqueConstraints": {
2910
+ "mcp_connections_code_hash_key": {
2911
+ "name": "mcp_connections_code_hash_key",
2912
+ "nullsNotDistinct": false,
2913
+ "columns": [
2914
+ "code_hash"
2915
+ ]
2916
+ },
2917
+ "mcp_connections_refresh_hash_key": {
2918
+ "name": "mcp_connections_refresh_hash_key",
2919
+ "nullsNotDistinct": false,
2920
+ "columns": [
2921
+ "refresh_hash"
2922
+ ]
2923
+ }
2924
+ },
2925
+ "policies": {},
2926
+ "checkConstraints": {
2927
+ "mcp_connections_seal_check": {
2928
+ "name": "mcp_connections_seal_check",
2929
+ "value": "\"mcp_connections\".\"seal\" IS NULL OR octet_length(\"mcp_connections\".\"seal\") = 16"
2930
+ },
2931
+ "mcp_connections_principal_check": {
2932
+ "name": "mcp_connections_principal_check",
2933
+ "value": "\"mcp_connections\".\"principal\" LIKE 'user:%'"
2934
+ },
2935
+ "mcp_connections_registration_check": {
2936
+ "name": "mcp_connections_registration_check",
2937
+ "value": "\"mcp_connections\".\"registration\" IN ('cimd', 'dcr')"
2938
+ },
2939
+ "mcp_connections_auth_mac_check": {
2940
+ "name": "mcp_connections_auth_mac_check",
2941
+ "value": "octet_length(\"mcp_connections\".\"auth_mac\") = 32"
2942
+ },
2943
+ "mcp_connections_code_hash_check": {
2944
+ "name": "mcp_connections_code_hash_check",
2945
+ "value": "\"mcp_connections\".\"code_hash\" IS NULL OR octet_length(\"mcp_connections\".\"code_hash\") = 32"
2946
+ },
2947
+ "mcp_connections_refresh_hash_check": {
2948
+ "name": "mcp_connections_refresh_hash_check",
2949
+ "value": "\"mcp_connections\".\"refresh_hash\" IS NULL OR octet_length(\"mcp_connections\".\"refresh_hash\") = 32"
2950
+ }
2951
+ },
2952
+ "isRLSEnabled": false
2953
+ },
2954
+ "public.oauth_clients": {
2955
+ "name": "oauth_clients",
2956
+ "schema": "",
2957
+ "columns": {
2958
+ "id": {
2959
+ "name": "id",
2960
+ "type": "uuid",
2961
+ "primaryKey": true,
2962
+ "notNull": true
2963
+ },
2964
+ "auth_mac": {
2965
+ "name": "auth_mac",
2966
+ "type": "bytea",
2967
+ "primaryKey": false,
2968
+ "notNull": true
2969
+ },
2970
+ "name": {
2971
+ "name": "name",
2972
+ "type": "text",
2973
+ "primaryKey": false,
2974
+ "notNull": true
2975
+ },
2976
+ "redirect_uris": {
2977
+ "name": "redirect_uris",
2978
+ "type": "text",
2979
+ "primaryKey": false,
2980
+ "notNull": true
2981
+ },
2982
+ "created_at": {
2983
+ "name": "created_at",
2984
+ "type": "timestamp with time zone",
2985
+ "primaryKey": false,
2986
+ "notNull": true,
2987
+ "default": "now()"
2988
+ },
2989
+ "created_ip": {
2990
+ "name": "created_ip",
2991
+ "type": "text",
2992
+ "primaryKey": false,
2993
+ "notNull": false
2994
+ },
2995
+ "revoked_at": {
2996
+ "name": "revoked_at",
2997
+ "type": "timestamp with time zone",
2998
+ "primaryKey": false,
2999
+ "notNull": false
3000
+ }
3001
+ },
3002
+ "indexes": {},
3003
+ "foreignKeys": {},
3004
+ "compositePrimaryKeys": {},
3005
+ "uniqueConstraints": {},
3006
+ "policies": {},
3007
+ "checkConstraints": {
3008
+ "oauth_clients_auth_mac_check": {
3009
+ "name": "oauth_clients_auth_mac_check",
3010
+ "value": "octet_length(\"oauth_clients\".\"auth_mac\") = 32"
3011
+ },
3012
+ "oauth_clients_redirect_uris_check": {
3013
+ "name": "oauth_clients_redirect_uris_check",
3014
+ "value": "\"oauth_clients\".\"redirect_uris\"::jsonb IS NOT NULL"
3015
+ }
3016
+ },
3017
+ "isRLSEnabled": false
3018
+ },
3019
+ "public.projects": {
3020
+ "name": "projects",
3021
+ "schema": "",
3022
+ "columns": {
3023
+ "id": {
3024
+ "name": "id",
3025
+ "type": "uuid",
3026
+ "primaryKey": true,
3027
+ "notNull": true,
3028
+ "default": "gen_random_uuid()"
3029
+ },
3030
+ "slug": {
3031
+ "name": "slug",
3032
+ "type": "text",
3033
+ "primaryKey": false,
3034
+ "notNull": true
3035
+ },
3036
+ "name": {
3037
+ "name": "name",
3038
+ "type": "text",
3039
+ "primaryKey": false,
3040
+ "notNull": true
3041
+ },
3042
+ "created_at": {
3043
+ "name": "created_at",
3044
+ "type": "timestamp with time zone",
3045
+ "primaryKey": false,
3046
+ "notNull": true,
3047
+ "default": "now()"
3048
+ },
3049
+ "archived_at": {
3050
+ "name": "archived_at",
3051
+ "type": "timestamp with time zone",
3052
+ "primaryKey": false,
3053
+ "notNull": false
3054
+ },
3055
+ "folder": {
3056
+ "name": "folder",
3057
+ "type": "text",
3058
+ "primaryKey": false,
3059
+ "notNull": false
3060
+ }
3061
+ },
3062
+ "indexes": {},
3063
+ "foreignKeys": {},
3064
+ "compositePrimaryKeys": {},
3065
+ "uniqueConstraints": {
3066
+ "projects_slug_key": {
3067
+ "name": "projects_slug_key",
3068
+ "nullsNotDistinct": false,
3069
+ "columns": [
3070
+ "slug"
3071
+ ]
3072
+ }
3073
+ },
3074
+ "policies": {},
3075
+ "checkConstraints": {
3076
+ "projects_slug_check": {
3077
+ "name": "projects_slug_check",
3078
+ "value": "\"projects\".\"slug\" ~ '^[a-z0-9][a-z0-9-]{0,62}(~[a-z0-9-]{1,40})?$'"
3079
+ },
3080
+ "projects_folder_check": {
3081
+ "name": "projects_folder_check",
3082
+ "value": "\"projects\".\"folder\" IS NULL OR (char_length(\"projects\".\"folder\") BETWEEN 1 AND 64 AND \"projects\".\"folder\" !~ '[/[:cntrl:]]' AND \"projects\".\"folder\" = btrim(\"projects\".\"folder\"))"
3083
+ }
3084
+ },
3085
+ "isRLSEnabled": false
3086
+ },
3087
+ "public.secret_references": {
3088
+ "name": "secret_references",
3089
+ "schema": "",
3090
+ "columns": {
3091
+ "id": {
3092
+ "name": "id",
3093
+ "type": "uuid",
3094
+ "primaryKey": true,
3095
+ "notNull": true
3096
+ },
3097
+ "project_id": {
3098
+ "name": "project_id",
3099
+ "type": "uuid",
3100
+ "primaryKey": false,
3101
+ "notNull": true
3102
+ },
3103
+ "environment_id": {
3104
+ "name": "environment_id",
3105
+ "type": "uuid",
3106
+ "primaryKey": false,
3107
+ "notNull": true
3108
+ },
3109
+ "secret_id": {
3110
+ "name": "secret_id",
3111
+ "type": "uuid",
3112
+ "primaryKey": false,
3113
+ "notNull": true
3114
+ },
3115
+ "source_project_id": {
3116
+ "name": "source_project_id",
3117
+ "type": "uuid",
3118
+ "primaryKey": false,
3119
+ "notNull": true
3120
+ },
3121
+ "source_environment_id": {
3122
+ "name": "source_environment_id",
3123
+ "type": "uuid",
3124
+ "primaryKey": false,
3125
+ "notNull": true
3126
+ },
3127
+ "source_secret_id": {
3128
+ "name": "source_secret_id",
3129
+ "type": "uuid",
3130
+ "primaryKey": false,
3131
+ "notNull": true
3132
+ },
3133
+ "created_seq": {
3134
+ "name": "created_seq",
3135
+ "type": "bigint",
3136
+ "primaryKey": false,
3137
+ "notNull": true
3138
+ },
3139
+ "created_at": {
3140
+ "name": "created_at",
3141
+ "type": "timestamp with time zone",
3142
+ "primaryKey": false,
3143
+ "notNull": true,
3144
+ "default": "now()"
3145
+ },
3146
+ "created_by": {
3147
+ "name": "created_by",
3148
+ "type": "text",
3149
+ "primaryKey": false,
3150
+ "notNull": true
3151
+ },
3152
+ "ended_at": {
3153
+ "name": "ended_at",
3154
+ "type": "timestamp with time zone",
3155
+ "primaryKey": false,
3156
+ "notNull": false
3157
+ }
3158
+ },
3159
+ "indexes": {
3160
+ "secret_references_holder_idx": {
3161
+ "name": "secret_references_holder_idx",
3162
+ "columns": [
3163
+ {
3164
+ "expression": "secret_id",
3165
+ "isExpression": false,
3166
+ "asc": true,
3167
+ "nulls": "last"
3168
+ },
3169
+ {
3170
+ "expression": "created_seq",
3171
+ "isExpression": false,
3172
+ "asc": true,
3173
+ "nulls": "last"
3174
+ }
3175
+ ],
3176
+ "isUnique": false,
3177
+ "concurrently": false,
3178
+ "method": "btree",
3179
+ "with": {}
3180
+ },
3181
+ "secret_references_source_idx": {
3182
+ "name": "secret_references_source_idx",
3183
+ "columns": [
3184
+ {
3185
+ "expression": "source_secret_id",
3186
+ "isExpression": false,
3187
+ "asc": true,
3188
+ "nulls": "last"
3189
+ }
3190
+ ],
3191
+ "isUnique": false,
3192
+ "concurrently": false,
3193
+ "method": "btree",
3194
+ "with": {}
3195
+ },
3196
+ "secret_references_project_idx": {
3197
+ "name": "secret_references_project_idx",
3198
+ "columns": [
3199
+ {
3200
+ "expression": "project_id",
3201
+ "isExpression": false,
3202
+ "asc": true,
3203
+ "nulls": "last"
3204
+ }
3205
+ ],
3206
+ "isUnique": false,
3207
+ "concurrently": false,
3208
+ "method": "btree",
3209
+ "with": {}
3210
+ },
3211
+ "secret_references_source_project_idx": {
3212
+ "name": "secret_references_source_project_idx",
3213
+ "columns": [
3214
+ {
3215
+ "expression": "source_project_id",
3216
+ "isExpression": false,
3217
+ "asc": true,
3218
+ "nulls": "last"
3219
+ }
3220
+ ],
3221
+ "isUnique": false,
3222
+ "concurrently": false,
3223
+ "method": "btree",
3224
+ "with": {}
3225
+ },
3226
+ "secret_references_created_by_idx": {
3227
+ "name": "secret_references_created_by_idx",
3228
+ "columns": [
3229
+ {
3230
+ "expression": "created_by",
3231
+ "isExpression": false,
3232
+ "asc": true,
3233
+ "nulls": "last"
3234
+ }
3235
+ ],
3236
+ "isUnique": false,
3237
+ "concurrently": false,
3238
+ "method": "btree",
3239
+ "with": {}
3240
+ }
3241
+ },
3242
+ "foreignKeys": {
3243
+ "secret_references_secret_id_fkey": {
3244
+ "name": "secret_references_secret_id_fkey",
3245
+ "tableFrom": "secret_references",
3246
+ "tableTo": "secrets",
3247
+ "columnsFrom": [
3248
+ "secret_id"
3249
+ ],
3250
+ "columnsTo": [
3251
+ "id"
3252
+ ],
3253
+ "onDelete": "restrict",
3254
+ "onUpdate": "no action"
3255
+ },
3256
+ "secret_references_source_secret_id_fkey": {
3257
+ "name": "secret_references_source_secret_id_fkey",
3258
+ "tableFrom": "secret_references",
3259
+ "tableTo": "secrets",
3260
+ "columnsFrom": [
3261
+ "source_secret_id"
3262
+ ],
3263
+ "columnsTo": [
3264
+ "id"
3265
+ ],
3266
+ "onDelete": "restrict",
3267
+ "onUpdate": "no action"
3268
+ },
3269
+ "secret_references_created_seq_fkey": {
3270
+ "name": "secret_references_created_seq_fkey",
3271
+ "tableFrom": "secret_references",
3272
+ "tableTo": "audit_log",
3273
+ "columnsFrom": [
3274
+ "created_seq"
3275
+ ],
3276
+ "columnsTo": [
3277
+ "seq"
3278
+ ],
3279
+ "onDelete": "restrict",
3280
+ "onUpdate": "no action"
3281
+ }
3282
+ },
3283
+ "compositePrimaryKeys": {},
3284
+ "uniqueConstraints": {
3285
+ "secret_references_created_seq_key": {
3286
+ "name": "secret_references_created_seq_key",
3287
+ "nullsNotDistinct": false,
3288
+ "columns": [
3289
+ "created_seq"
3290
+ ]
3291
+ }
3292
+ },
3293
+ "policies": {},
3294
+ "checkConstraints": {},
3295
+ "isRLSEnabled": false
3296
+ },
3297
+ "public.secret_versions": {
3298
+ "name": "secret_versions",
3299
+ "schema": "",
3300
+ "columns": {
3301
+ "id": {
3302
+ "name": "id",
3303
+ "type": "uuid",
3304
+ "primaryKey": true,
3305
+ "notNull": true,
3306
+ "default": "gen_random_uuid()"
3307
+ },
3308
+ "secret_id": {
3309
+ "name": "secret_id",
3310
+ "type": "uuid",
3311
+ "primaryKey": false,
3312
+ "notNull": true
3313
+ },
3314
+ "version": {
3315
+ "name": "version",
3316
+ "type": "integer",
3317
+ "primaryKey": false,
3318
+ "notNull": true
3319
+ },
3320
+ "envelope_version": {
3321
+ "name": "envelope_version",
3322
+ "type": "integer",
3323
+ "primaryKey": false,
3324
+ "notNull": true
3325
+ },
3326
+ "ciphertext": {
3327
+ "name": "ciphertext",
3328
+ "type": "bytea",
3329
+ "primaryKey": false,
3330
+ "notNull": true
3331
+ },
3332
+ "iv": {
3333
+ "name": "iv",
3334
+ "type": "bytea",
3335
+ "primaryKey": false,
3336
+ "notNull": true
3337
+ },
3338
+ "auth_tag": {
3339
+ "name": "auth_tag",
3340
+ "type": "bytea",
3341
+ "primaryKey": false,
3342
+ "notNull": true
3343
+ },
3344
+ "wrapped_dek": {
3345
+ "name": "wrapped_dek",
3346
+ "type": "bytea",
3347
+ "primaryKey": false,
3348
+ "notNull": true
3349
+ },
3350
+ "kek_provider": {
3351
+ "name": "kek_provider",
3352
+ "type": "text",
3353
+ "primaryKey": false,
3354
+ "notNull": true
3355
+ },
3356
+ "kek_id": {
3357
+ "name": "kek_id",
3358
+ "type": "text",
3359
+ "primaryKey": false,
3360
+ "notNull": true
3361
+ },
3362
+ "kek_version": {
3363
+ "name": "kek_version",
3364
+ "type": "text",
3365
+ "primaryKey": false,
3366
+ "notNull": true
3367
+ },
3368
+ "created_at": {
3369
+ "name": "created_at",
3370
+ "type": "timestamp with time zone",
3371
+ "primaryKey": false,
3372
+ "notNull": true,
3373
+ "default": "now()"
3374
+ },
3375
+ "created_by": {
3376
+ "name": "created_by",
3377
+ "type": "text",
3378
+ "primaryKey": false,
3379
+ "notNull": true
3380
+ },
3381
+ "recipe": {
3382
+ "name": "recipe",
3383
+ "type": "text",
3384
+ "primaryKey": false,
3385
+ "notNull": false
3386
+ },
3387
+ "pair_id": {
3388
+ "name": "pair_id",
3389
+ "type": "uuid",
3390
+ "primaryKey": false,
3391
+ "notNull": false
3392
+ },
3393
+ "pair_half": {
3394
+ "name": "pair_half",
3395
+ "type": "text",
3396
+ "primaryKey": false,
3397
+ "notNull": false
3398
+ },
3399
+ "plaintext": {
3400
+ "name": "plaintext",
3401
+ "type": "text",
3402
+ "primaryKey": false,
3403
+ "notNull": false
3404
+ },
3405
+ "sensitive": {
3406
+ "name": "sensitive",
3407
+ "type": "boolean",
3408
+ "primaryKey": false,
3409
+ "notNull": true,
3410
+ "default": false
3411
+ }
3412
+ },
3413
+ "indexes": {
3414
+ "secret_versions_secret_idx": {
3415
+ "name": "secret_versions_secret_idx",
3416
+ "columns": [
3417
+ {
3418
+ "expression": "secret_id",
3419
+ "isExpression": false,
3420
+ "asc": true,
3421
+ "nulls": "last"
3422
+ },
3423
+ {
3424
+ "expression": "version",
3425
+ "isExpression": false,
3426
+ "asc": false,
3427
+ "nulls": "last"
3428
+ }
3429
+ ],
3430
+ "isUnique": false,
3431
+ "concurrently": false,
3432
+ "method": "btree",
3433
+ "with": {}
3434
+ }
3435
+ },
3436
+ "foreignKeys": {
3437
+ "secret_versions_secret_id_fkey": {
3438
+ "name": "secret_versions_secret_id_fkey",
3439
+ "tableFrom": "secret_versions",
3440
+ "tableTo": "secrets",
3441
+ "columnsFrom": [
3442
+ "secret_id"
3443
+ ],
3444
+ "columnsTo": [
3445
+ "id"
3446
+ ],
3447
+ "onDelete": "restrict",
3448
+ "onUpdate": "no action"
3449
+ }
3450
+ },
3451
+ "compositePrimaryKeys": {},
3452
+ "uniqueConstraints": {
3453
+ "secret_versions_secret_id_version_key": {
3454
+ "name": "secret_versions_secret_id_version_key",
3455
+ "nullsNotDistinct": false,
3456
+ "columns": [
3457
+ "secret_id",
3458
+ "version"
3459
+ ]
3460
+ }
3461
+ },
3462
+ "policies": {},
3463
+ "checkConstraints": {
3464
+ "secret_versions_version_check": {
3465
+ "name": "secret_versions_version_check",
3466
+ "value": "\"secret_versions\".\"version\" > 0"
3467
+ },
3468
+ "secret_versions_iv_check": {
3469
+ "name": "secret_versions_iv_check",
3470
+ "value": "octet_length(\"secret_versions\".\"iv\") = 12"
3471
+ },
3472
+ "secret_versions_auth_tag_check": {
3473
+ "name": "secret_versions_auth_tag_check",
3474
+ "value": "octet_length(\"secret_versions\".\"auth_tag\") = 16"
3475
+ }
3476
+ },
3477
+ "isRLSEnabled": false
3478
+ },
3479
+ "public.secrets": {
3480
+ "name": "secrets",
3481
+ "schema": "",
3482
+ "columns": {
3483
+ "id": {
3484
+ "name": "id",
3485
+ "type": "uuid",
3486
+ "primaryKey": true,
3487
+ "notNull": true,
3488
+ "default": "gen_random_uuid()"
3489
+ },
3490
+ "project_id": {
3491
+ "name": "project_id",
3492
+ "type": "uuid",
3493
+ "primaryKey": false,
3494
+ "notNull": true
3495
+ },
3496
+ "environment_id": {
3497
+ "name": "environment_id",
3498
+ "type": "uuid",
3499
+ "primaryKey": false,
3500
+ "notNull": true
3501
+ },
3502
+ "key": {
3503
+ "name": "key",
3504
+ "type": "text",
3505
+ "primaryKey": false,
3506
+ "notNull": true
3507
+ },
3508
+ "created_at": {
3509
+ "name": "created_at",
3510
+ "type": "timestamp with time zone",
3511
+ "primaryKey": false,
3512
+ "notNull": true,
3513
+ "default": "now()"
3514
+ },
3515
+ "updated_at": {
3516
+ "name": "updated_at",
3517
+ "type": "timestamp with time zone",
3518
+ "primaryKey": false,
3519
+ "notNull": true,
3520
+ "default": "now()"
3521
+ },
3522
+ "current_version_id": {
3523
+ "name": "current_version_id",
3524
+ "type": "uuid",
3525
+ "primaryKey": false,
3526
+ "notNull": false
3527
+ },
3528
+ "current_version": {
3529
+ "name": "current_version",
3530
+ "type": "integer",
3531
+ "primaryKey": false,
3532
+ "notNull": true,
3533
+ "default": 0
3534
+ },
3535
+ "archived_at": {
3536
+ "name": "archived_at",
3537
+ "type": "timestamp with time zone",
3538
+ "primaryKey": false,
3539
+ "notNull": false
3540
+ },
3541
+ "folder": {
3542
+ "name": "folder",
3543
+ "type": "text",
3544
+ "primaryKey": false,
3545
+ "notNull": false
3546
+ },
3547
+ "seal": {
3548
+ "name": "seal",
3549
+ "type": "bytea",
3550
+ "primaryKey": false,
3551
+ "notNull": false
3552
+ }
3553
+ },
3554
+ "indexes": {
3555
+ "secrets_lookup_idx": {
3556
+ "name": "secrets_lookup_idx",
3557
+ "columns": [
3558
+ {
3559
+ "expression": "project_id",
3560
+ "isExpression": false,
3561
+ "asc": true,
3562
+ "nulls": "last"
3563
+ },
3564
+ {
3565
+ "expression": "environment_id",
3566
+ "isExpression": false,
3567
+ "asc": true,
3568
+ "nulls": "last"
3569
+ },
3570
+ {
3571
+ "expression": "key",
3572
+ "isExpression": false,
3573
+ "asc": true,
3574
+ "nulls": "last"
3575
+ }
3576
+ ],
3577
+ "isUnique": false,
3578
+ "concurrently": false,
3579
+ "method": "btree",
3580
+ "with": {}
3581
+ },
3582
+ "secrets_live_idx": {
3583
+ "name": "secrets_live_idx",
3584
+ "columns": [
3585
+ {
3586
+ "expression": "environment_id",
3587
+ "isExpression": false,
3588
+ "asc": true,
3589
+ "nulls": "last"
3590
+ }
3591
+ ],
3592
+ "isUnique": false,
3593
+ "where": "\"secrets\".\"archived_at\" IS NULL",
3594
+ "concurrently": false,
3595
+ "method": "btree",
3596
+ "with": {}
3597
+ }
3598
+ },
3599
+ "foreignKeys": {
3600
+ "secrets_current_version_id_secret_versions_id_fk": {
3601
+ "name": "secrets_current_version_id_secret_versions_id_fk",
3602
+ "tableFrom": "secrets",
3603
+ "tableTo": "secret_versions",
3604
+ "columnsFrom": [
3605
+ "current_version_id"
3606
+ ],
3607
+ "columnsTo": [
3608
+ "id"
3609
+ ],
3610
+ "onDelete": "no action",
3611
+ "onUpdate": "no action"
3612
+ },
3613
+ "secrets_project_id_fkey": {
3614
+ "name": "secrets_project_id_fkey",
3615
+ "tableFrom": "secrets",
3616
+ "tableTo": "projects",
3617
+ "columnsFrom": [
3618
+ "project_id"
3619
+ ],
3620
+ "columnsTo": [
3621
+ "id"
3622
+ ],
3623
+ "onDelete": "restrict",
3624
+ "onUpdate": "no action"
3625
+ },
3626
+ "secrets_environment_id_fkey": {
3627
+ "name": "secrets_environment_id_fkey",
3628
+ "tableFrom": "secrets",
3629
+ "tableTo": "environments",
3630
+ "columnsFrom": [
3631
+ "environment_id"
3632
+ ],
3633
+ "columnsTo": [
3634
+ "id"
3635
+ ],
3636
+ "onDelete": "restrict",
3637
+ "onUpdate": "no action"
3638
+ },
3639
+ "secrets_environment_in_project": {
3640
+ "name": "secrets_environment_in_project",
3641
+ "tableFrom": "secrets",
3642
+ "tableTo": "environments",
3643
+ "columnsFrom": [
3644
+ "environment_id",
3645
+ "project_id"
3646
+ ],
3647
+ "columnsTo": [
3648
+ "id",
3649
+ "project_id"
3650
+ ],
3651
+ "onDelete": "no action",
3652
+ "onUpdate": "no action"
3653
+ }
3654
+ },
3655
+ "compositePrimaryKeys": {},
3656
+ "uniqueConstraints": {
3657
+ "secrets_project_id_environment_id_key_key": {
3658
+ "name": "secrets_project_id_environment_id_key_key",
3659
+ "nullsNotDistinct": false,
3660
+ "columns": [
3661
+ "project_id",
3662
+ "environment_id",
3663
+ "key"
3664
+ ]
3665
+ }
3666
+ },
3667
+ "policies": {},
3668
+ "checkConstraints": {
3669
+ "secrets_seal_check": {
3670
+ "name": "secrets_seal_check",
3671
+ "value": "\"secrets\".\"seal\" IS NULL OR octet_length(\"secrets\".\"seal\") = 16"
3672
+ },
3673
+ "secrets_key_check": {
3674
+ "name": "secrets_key_check",
3675
+ "value": "\"secrets\".\"key\" ~ '^[A-Za-z_][A-Za-z0-9_]{0,127}$'"
3676
+ },
3677
+ "secrets_folder_check": {
3678
+ "name": "secrets_folder_check",
3679
+ "value": "\"secrets\".\"folder\" IS NULL OR (char_length(\"secrets\".\"folder\") BETWEEN 1 AND 64 AND \"secrets\".\"folder\" !~ '[/[:cntrl:]]' AND \"secrets\".\"folder\" = btrim(\"secrets\".\"folder\"))"
3680
+ }
3681
+ },
3682
+ "isRLSEnabled": false
3683
+ },
3684
+ "public.service_bindings": {
3685
+ "name": "service_bindings",
3686
+ "schema": "",
3687
+ "columns": {
3688
+ "id": {
3689
+ "name": "id",
3690
+ "type": "uuid",
3691
+ "primaryKey": true,
3692
+ "notNull": true
3693
+ },
3694
+ "auth_mac": {
3695
+ "name": "auth_mac",
3696
+ "type": "bytea",
3697
+ "primaryKey": false,
3698
+ "notNull": true
3699
+ },
3700
+ "principal": {
3701
+ "name": "principal",
3702
+ "type": "text",
3703
+ "primaryKey": false,
3704
+ "notNull": true
3705
+ },
3706
+ "generation": {
3707
+ "name": "generation",
3708
+ "type": "integer",
3709
+ "primaryKey": false,
3710
+ "notNull": true
3711
+ },
3712
+ "profile": {
3713
+ "name": "profile",
3714
+ "type": "text",
3715
+ "primaryKey": false,
3716
+ "notNull": true
3717
+ },
3718
+ "issuer": {
3719
+ "name": "issuer",
3720
+ "type": "text",
3721
+ "primaryKey": false,
3722
+ "notNull": true
3723
+ },
3724
+ "jwks_uri": {
3725
+ "name": "jwks_uri",
3726
+ "type": "text",
3727
+ "primaryKey": false,
3728
+ "notNull": true
3729
+ },
3730
+ "jwks": {
3731
+ "name": "jwks",
3732
+ "type": "text",
3733
+ "primaryKey": false,
3734
+ "notNull": false
3735
+ },
3736
+ "claims": {
3737
+ "name": "claims",
3738
+ "type": "text",
3739
+ "primaryKey": false,
3740
+ "notNull": true
3741
+ },
3742
+ "scope": {
3743
+ "name": "scope",
3744
+ "type": "text",
3745
+ "primaryKey": false,
3746
+ "notNull": false
3747
+ },
3748
+ "policy": {
3749
+ "name": "policy",
3750
+ "type": "text",
3751
+ "primaryKey": false,
3752
+ "notNull": false
3753
+ },
3754
+ "origin": {
3755
+ "name": "origin",
3756
+ "type": "text",
3757
+ "primaryKey": false,
3758
+ "notNull": false
3759
+ },
3760
+ "label": {
3761
+ "name": "label",
3762
+ "type": "text",
3763
+ "primaryKey": false,
3764
+ "notNull": false
3765
+ },
3766
+ "created_at": {
3767
+ "name": "created_at",
3768
+ "type": "timestamp with time zone",
3769
+ "primaryKey": false,
3770
+ "notNull": true,
3771
+ "default": "now()"
3772
+ },
3773
+ "created_by": {
3774
+ "name": "created_by",
3775
+ "type": "text",
3776
+ "primaryKey": false,
3777
+ "notNull": true
3778
+ },
3779
+ "last_used_at": {
3780
+ "name": "last_used_at",
3781
+ "type": "timestamp with time zone",
3782
+ "primaryKey": false,
3783
+ "notNull": false
3784
+ },
3785
+ "revoked_at": {
3786
+ "name": "revoked_at",
3787
+ "type": "timestamp with time zone",
3788
+ "primaryKey": false,
3789
+ "notNull": false
3790
+ },
3791
+ "revoked_by": {
3792
+ "name": "revoked_by",
3793
+ "type": "text",
3794
+ "primaryKey": false,
3795
+ "notNull": false
3796
+ },
3797
+ "seal": {
3798
+ "name": "seal",
3799
+ "type": "bytea",
3800
+ "primaryKey": false,
3801
+ "notNull": false
3802
+ }
3803
+ },
3804
+ "indexes": {
3805
+ "service_bindings_principal_idx": {
3806
+ "name": "service_bindings_principal_idx",
3807
+ "columns": [
3808
+ {
3809
+ "expression": "principal",
3810
+ "isExpression": false,
3811
+ "asc": true,
3812
+ "nulls": "last"
3813
+ },
3814
+ {
3815
+ "expression": "issuer",
3816
+ "isExpression": false,
3817
+ "asc": true,
3818
+ "nulls": "last"
3819
+ }
3820
+ ],
3821
+ "isUnique": false,
3822
+ "concurrently": false,
3823
+ "method": "btree",
3824
+ "with": {}
3825
+ },
3826
+ "service_bindings_live_idx": {
3827
+ "name": "service_bindings_live_idx",
3828
+ "columns": [
3829
+ {
3830
+ "expression": "principal",
3831
+ "isExpression": false,
3832
+ "asc": true,
3833
+ "nulls": "last"
3834
+ },
3835
+ {
3836
+ "expression": "issuer",
3837
+ "isExpression": false,
3838
+ "asc": true,
3839
+ "nulls": "last"
3840
+ },
3841
+ {
3842
+ "expression": "generation",
3843
+ "isExpression": false,
3844
+ "asc": true,
3845
+ "nulls": "last"
3846
+ },
3847
+ {
3848
+ "expression": "created_at",
3849
+ "isExpression": false,
3850
+ "asc": true,
3851
+ "nulls": "last"
3852
+ },
3853
+ {
3854
+ "expression": "id",
3855
+ "isExpression": false,
3856
+ "asc": true,
3857
+ "nulls": "last"
3858
+ }
3859
+ ],
3860
+ "isUnique": false,
3861
+ "where": "\"service_bindings\".\"revoked_at\" IS NULL",
3862
+ "concurrently": false,
3863
+ "method": "btree",
3864
+ "with": {}
3865
+ }
3866
+ },
3867
+ "foreignKeys": {
3868
+ "service_bindings_principal_fkey": {
3869
+ "name": "service_bindings_principal_fkey",
3870
+ "tableFrom": "service_bindings",
3871
+ "tableTo": "vault_members",
3872
+ "columnsFrom": [
3873
+ "principal"
3874
+ ],
3875
+ "columnsTo": [
3876
+ "principal"
3877
+ ],
3878
+ "onDelete": "restrict",
3879
+ "onUpdate": "no action"
3880
+ }
3881
+ },
3882
+ "compositePrimaryKeys": {},
3883
+ "uniqueConstraints": {},
3884
+ "policies": {},
3885
+ "checkConstraints": {
3886
+ "service_bindings_seal_check": {
3887
+ "name": "service_bindings_seal_check",
3888
+ "value": "\"service_bindings\".\"seal\" IS NULL OR octet_length(\"service_bindings\".\"seal\") = 16"
3889
+ },
3890
+ "service_bindings_principal_check": {
3891
+ "name": "service_bindings_principal_check",
3892
+ "value": "\"service_bindings\".\"principal\" LIKE 'token:%'"
3893
+ },
3894
+ "service_bindings_auth_mac_check": {
3895
+ "name": "service_bindings_auth_mac_check",
3896
+ "value": "octet_length(\"service_bindings\".\"auth_mac\") = 32"
3897
+ },
3898
+ "service_bindings_claims_check": {
3899
+ "name": "service_bindings_claims_check",
3900
+ "value": "\"service_bindings\".\"claims\"::jsonb IS NOT NULL"
3901
+ }
3902
+ },
3903
+ "isRLSEnabled": false
3904
+ },
3905
+ "public.vault_grants": {
3906
+ "name": "vault_grants",
3907
+ "schema": "",
3908
+ "columns": {
3909
+ "principal": {
3910
+ "name": "principal",
3911
+ "type": "text",
3912
+ "primaryKey": false,
3913
+ "notNull": true
3914
+ },
3915
+ "project_id": {
3916
+ "name": "project_id",
3917
+ "type": "uuid",
3918
+ "primaryKey": false,
3919
+ "notNull": false
3920
+ },
3921
+ "environment_id": {
3922
+ "name": "environment_id",
3923
+ "type": "uuid",
3924
+ "primaryKey": false,
3925
+ "notNull": false
3926
+ },
3927
+ "environment_slug": {
3928
+ "name": "environment_slug",
3929
+ "type": "text",
3930
+ "primaryKey": false,
3931
+ "notNull": false
3932
+ },
3933
+ "role": {
3934
+ "name": "role",
3935
+ "type": "text",
3936
+ "primaryKey": false,
3937
+ "notNull": true
3938
+ },
3939
+ "expires_at": {
3940
+ "name": "expires_at",
3941
+ "type": "bigint",
3942
+ "primaryKey": false,
3943
+ "notNull": false
3944
+ },
3945
+ "granted_at": {
3946
+ "name": "granted_at",
3947
+ "type": "bigint",
3948
+ "primaryKey": false,
3949
+ "notNull": true
3950
+ },
3951
+ "granted_by": {
3952
+ "name": "granted_by",
3953
+ "type": "text",
3954
+ "primaryKey": false,
3955
+ "notNull": true
3956
+ }
3957
+ },
3958
+ "indexes": {
3959
+ "vault_grants_on_every_project": {
3960
+ "name": "vault_grants_on_every_project",
3961
+ "columns": [
3962
+ {
3963
+ "expression": "principal",
3964
+ "isExpression": false,
3965
+ "asc": true,
3966
+ "nulls": "last"
3967
+ }
3968
+ ],
3969
+ "isUnique": true,
3970
+ "where": "\"vault_grants\".\"project_id\" IS NULL AND \"vault_grants\".\"environment_id\" IS NULL AND \"vault_grants\".\"environment_slug\" IS NULL",
3971
+ "concurrently": false,
3972
+ "method": "btree",
3973
+ "with": {}
3974
+ }
3975
+ },
3976
+ "foreignKeys": {
3977
+ "vault_grants_principal_fkey": {
3978
+ "name": "vault_grants_principal_fkey",
3979
+ "tableFrom": "vault_grants",
3980
+ "tableTo": "vault_members",
3981
+ "columnsFrom": [
3982
+ "principal"
3983
+ ],
3984
+ "columnsTo": [
3985
+ "principal"
3986
+ ],
3987
+ "onDelete": "restrict",
3988
+ "onUpdate": "no action"
3989
+ },
3990
+ "vault_grants_project_id_fkey": {
3991
+ "name": "vault_grants_project_id_fkey",
3992
+ "tableFrom": "vault_grants",
3993
+ "tableTo": "projects",
3994
+ "columnsFrom": [
3995
+ "project_id"
3996
+ ],
3997
+ "columnsTo": [
3998
+ "id"
3999
+ ],
4000
+ "onDelete": "restrict",
4001
+ "onUpdate": "no action"
4002
+ },
4003
+ "vault_grants_environment_id_fkey": {
4004
+ "name": "vault_grants_environment_id_fkey",
4005
+ "tableFrom": "vault_grants",
4006
+ "tableTo": "environments",
4007
+ "columnsFrom": [
4008
+ "environment_id"
4009
+ ],
4010
+ "columnsTo": [
4011
+ "id"
4012
+ ],
4013
+ "onDelete": "restrict",
4014
+ "onUpdate": "no action"
4015
+ }
4016
+ },
4017
+ "compositePrimaryKeys": {},
4018
+ "uniqueConstraints": {
4019
+ "vault_grants_on_project": {
4020
+ "name": "vault_grants_on_project",
4021
+ "nullsNotDistinct": false,
4022
+ "columns": [
4023
+ "principal",
4024
+ "project_id"
4025
+ ]
4026
+ },
4027
+ "vault_grants_on_environment": {
4028
+ "name": "vault_grants_on_environment",
4029
+ "nullsNotDistinct": false,
4030
+ "columns": [
4031
+ "principal",
4032
+ "environment_id"
4033
+ ]
4034
+ },
4035
+ "vault_grants_on_environment_slug": {
4036
+ "name": "vault_grants_on_environment_slug",
4037
+ "nullsNotDistinct": false,
4038
+ "columns": [
4039
+ "principal",
4040
+ "environment_slug"
4041
+ ]
4042
+ }
4043
+ },
4044
+ "policies": {},
4045
+ "checkConstraints": {
4046
+ "vault_grants_one_place": {
4047
+ "name": "vault_grants_one_place",
4048
+ "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)"
4049
+ },
4050
+ "vault_grants_environment_slug_check": {
4051
+ "name": "vault_grants_environment_slug_check",
4052
+ "value": "\"vault_grants\".\"environment_slug\" IS NULL OR \"vault_grants\".\"environment_slug\" ~ '^[a-z0-9][a-z0-9-]{0,62}$'"
4053
+ },
4054
+ "vault_grants_role_check": {
4055
+ "name": "vault_grants_role_check",
4056
+ "value": "\"vault_grants\".\"role\" ~ '^[a-z][a-z0-9-]{1,31}$'"
4057
+ }
4058
+ },
4059
+ "isRLSEnabled": false
4060
+ },
4061
+ "public.vault_members": {
4062
+ "name": "vault_members",
4063
+ "schema": "",
4064
+ "columns": {
4065
+ "principal": {
4066
+ "name": "principal",
4067
+ "type": "text",
4068
+ "primaryKey": true,
4069
+ "notNull": true
4070
+ },
4071
+ "status": {
4072
+ "name": "status",
4073
+ "type": "text",
4074
+ "primaryKey": false,
4075
+ "notNull": true
4076
+ },
4077
+ "owner": {
4078
+ "name": "owner",
4079
+ "type": "boolean",
4080
+ "primaryKey": false,
4081
+ "notNull": true,
4082
+ "default": false
4083
+ },
4084
+ "role": {
4085
+ "name": "role",
4086
+ "type": "text",
4087
+ "primaryKey": false,
4088
+ "notNull": false
4089
+ },
4090
+ "scope": {
4091
+ "name": "scope",
4092
+ "type": "text",
4093
+ "primaryKey": false,
4094
+ "notNull": false
4095
+ },
4096
+ "generation": {
4097
+ "name": "generation",
4098
+ "type": "integer",
4099
+ "primaryKey": false,
4100
+ "notNull": true,
4101
+ "default": 0
4102
+ },
4103
+ "created_at": {
4104
+ "name": "created_at",
4105
+ "type": "bigint",
4106
+ "primaryKey": false,
4107
+ "notNull": true
4108
+ },
4109
+ "created_by": {
4110
+ "name": "created_by",
4111
+ "type": "text",
4112
+ "primaryKey": false,
4113
+ "notNull": true
4114
+ },
4115
+ "status_changed_at": {
4116
+ "name": "status_changed_at",
4117
+ "type": "bigint",
4118
+ "primaryKey": false,
4119
+ "notNull": true
4120
+ },
4121
+ "status_changed_by": {
4122
+ "name": "status_changed_by",
4123
+ "type": "text",
4124
+ "primaryKey": false,
4125
+ "notNull": true
4126
+ },
4127
+ "access_seq": {
4128
+ "name": "access_seq",
4129
+ "type": "bigint",
4130
+ "primaryKey": false,
4131
+ "notNull": true
4132
+ },
4133
+ "mac": {
4134
+ "name": "mac",
4135
+ "type": "bytea",
4136
+ "primaryKey": false,
4137
+ "notNull": true
4138
+ },
4139
+ "seal": {
4140
+ "name": "seal",
4141
+ "type": "bytea",
4142
+ "primaryKey": false,
4143
+ "notNull": false
4144
+ }
4145
+ },
4146
+ "indexes": {},
4147
+ "foreignKeys": {},
4148
+ "compositePrimaryKeys": {},
4149
+ "uniqueConstraints": {},
4150
+ "policies": {},
4151
+ "checkConstraints": {
4152
+ "vault_members_seal_check": {
4153
+ "name": "vault_members_seal_check",
4154
+ "value": "\"vault_members\".\"seal\" IS NULL OR octet_length(\"vault_members\".\"seal\") = 16"
4155
+ },
4156
+ "vault_members_mac_check": {
4157
+ "name": "vault_members_mac_check",
4158
+ "value": "octet_length(\"vault_members\".\"mac\") = 32"
4159
+ },
4160
+ "vault_members_principal_check": {
4161
+ "name": "vault_members_principal_check",
4162
+ "value": "\"vault_members\".\"principal\" ~ '^(user|token):[^[:space:]:][^[:space:]]*$'"
4163
+ },
4164
+ "vault_members_user_lowercase": {
4165
+ "name": "vault_members_user_lowercase",
4166
+ "value": "\"vault_members\".\"principal\" NOT LIKE 'user:%' OR \"vault_members\".\"principal\" = lower(\"vault_members\".\"principal\")"
4167
+ },
4168
+ "vault_members_status_check": {
4169
+ "name": "vault_members_status_check",
4170
+ "value": "\"vault_members\".\"status\" IN ('active', 'removed')"
4171
+ },
4172
+ "vault_members_owner_check": {
4173
+ "name": "vault_members_owner_check",
4174
+ "value": "NOT \"vault_members\".\"owner\" OR (\"vault_members\".\"status\" = 'active' AND \"vault_members\".\"principal\" LIKE 'user:%')"
4175
+ },
4176
+ "vault_members_generation_check": {
4177
+ "name": "vault_members_generation_check",
4178
+ "value": "\"vault_members\".\"generation\" >= 0"
4179
+ }
4180
+ },
4181
+ "isRLSEnabled": false
4182
+ },
4183
+ "public.vault_releases": {
4184
+ "name": "vault_releases",
4185
+ "schema": "",
4186
+ "columns": {
4187
+ "principal": {
4188
+ "name": "principal",
4189
+ "type": "text",
4190
+ "primaryKey": false,
4191
+ "notNull": true
4192
+ },
4193
+ "key": {
4194
+ "name": "key",
4195
+ "type": "text",
4196
+ "primaryKey": false,
4197
+ "notNull": true
4198
+ },
4199
+ "released_at": {
4200
+ "name": "released_at",
4201
+ "type": "bigint",
4202
+ "primaryKey": false,
4203
+ "notNull": true
4204
+ }
4205
+ },
4206
+ "indexes": {},
4207
+ "foreignKeys": {},
4208
+ "compositePrimaryKeys": {
4209
+ "vault_releases_pkey": {
4210
+ "name": "vault_releases_pkey",
4211
+ "columns": [
4212
+ "principal",
4213
+ "key"
4214
+ ]
4215
+ }
4216
+ },
4217
+ "uniqueConstraints": {},
4218
+ "policies": {},
4219
+ "checkConstraints": {},
4220
+ "isRLSEnabled": false
4221
+ }
4222
+ },
4223
+ "enums": {},
4224
+ "schemas": {},
4225
+ "sequences": {},
4226
+ "roles": {},
4227
+ "policies": {},
4228
+ "views": {},
4229
+ "_meta": {
4230
+ "columns": {},
4231
+ "schemas": {},
4232
+ "tables": {}
4233
+ }
4234
+ }