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