larness 0.0.0-stage → 0.1.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 (160) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +205 -2
  3. package/app.js +131 -0
  4. package/apps/server/dist/address-UO6lb2Hx.js +95 -0
  5. package/apps/server/dist/client-DGXcZxzL.js +121 -0
  6. package/apps/server/dist/doctor-CTealIcx.js +131 -0
  7. package/apps/server/dist/doctor.js +13 -0
  8. package/apps/server/dist/index.js +25481 -0
  9. package/apps/server/dist/lock-8kmtcopF.js +102 -0
  10. package/apps/server/dist/managed-CHal_mk1.js +216 -0
  11. package/apps/server/dist/paths-Bp1nTSw3.js +2434 -0
  12. package/apps/server/dist/status-Dyecl2ni.js +50 -0
  13. package/apps/server/dist/status.js +31 -0
  14. package/apps/server/dist/tui.js +1628 -0
  15. package/apps/server/drizzle/0001_auth.sql +110 -0
  16. package/apps/server/drizzle/0002_projects.sql +13 -0
  17. package/apps/server/drizzle/0003_workspace.sql +81 -0
  18. package/apps/server/drizzle/0004_models.sql +30 -0
  19. package/apps/server/drizzle/0005_resources.sql +54 -0
  20. package/apps/server/drizzle/0006_commands.sql +24 -0
  21. package/apps/server/drizzle/0007_terminals.sql +42 -0
  22. package/apps/server/drizzle/0008_resource_actions.sql +24 -0
  23. package/apps/server/drizzle/0009_terminal_title.sql +1 -0
  24. package/apps/server/drizzle/0010_services.sql +32 -0
  25. package/apps/server/drizzle/0011_deployments.sql +88 -0
  26. package/apps/server/drizzle/0012_deployment_authorizations.sql +67 -0
  27. package/apps/server/drizzle/0013_service_ops.sql +64 -0
  28. package/apps/server/drizzle/0014_service_actions.sql +36 -0
  29. package/apps/server/drizzle/0015_model_catalog.sql +17 -0
  30. package/apps/server/drizzle/0016_multi_provider.sql +2 -0
  31. package/apps/server/drizzle/0017_model_visibility.sql +10 -0
  32. package/apps/server/drizzle/0018_model_defaults.sql +9 -0
  33. package/apps/server/drizzle/0019_credential_endpoint.sql +1 -0
  34. package/apps/server/drizzle/0020_compatible_context.sql +1 -0
  35. package/apps/server/drizzle/0021_context_summaries.sql +13 -0
  36. package/apps/server/drizzle/0022_scheduler.sql +58 -0
  37. package/apps/server/drizzle/meta/0001_snapshot.json +705 -0
  38. package/apps/server/drizzle/meta/0002_snapshot.json +784 -0
  39. package/apps/server/drizzle/meta/0003_snapshot.json +1300 -0
  40. package/apps/server/drizzle/meta/0004_snapshot.json +1489 -0
  41. package/apps/server/drizzle/meta/0005_snapshot.json +1794 -0
  42. package/apps/server/drizzle/meta/0006_snapshot.json +1953 -0
  43. package/apps/server/drizzle/meta/0007_snapshot.json +2232 -0
  44. package/apps/server/drizzle/meta/0008_snapshot.json +2391 -0
  45. package/apps/server/drizzle/meta/0009_snapshot.json +2398 -0
  46. package/apps/server/drizzle/meta/0010_snapshot.json +2601 -0
  47. package/apps/server/drizzle/meta/0015_snapshot.json +4332 -0
  48. package/apps/server/drizzle/meta/0016_snapshot.json +4346 -0
  49. package/apps/server/drizzle/meta/0017_snapshot.json +4408 -0
  50. package/apps/server/drizzle/meta/0018_snapshot.json +4468 -0
  51. package/apps/server/drizzle/meta/0019_snapshot.json +4475 -0
  52. package/apps/server/drizzle/meta/0020_snapshot.json +4482 -0
  53. package/apps/server/drizzle/meta/0021_snapshot.json +4565 -0
  54. package/apps/server/drizzle/meta/0022_snapshot.json +4960 -0
  55. package/apps/server/drizzle/meta/_journal.json +160 -0
  56. package/apps/server/package.json +57 -0
  57. package/apps/web/dist/assets/FileEditor-DpVfk7t3.js +1 -0
  58. package/apps/web/dist/assets/FileViewer-Bv5VYaA3.js +1 -0
  59. package/apps/web/dist/assets/abap-DLDM7-KI.js +1 -0
  60. package/apps/web/dist/assets/apex-DNDY2TF8.js +1 -0
  61. package/apps/web/dist/assets/azcli-Y6nb8tq_.js +1 -0
  62. package/apps/web/dist/assets/bat-BwHxbl9M.js +1 -0
  63. package/apps/web/dist/assets/bicep-CFznDFnq.js +2 -0
  64. package/apps/web/dist/assets/cameligo-Bf6VGUru.js +1 -0
  65. package/apps/web/dist/assets/clojure-Dnu-v4kV.js +1 -0
  66. package/apps/web/dist/assets/codicon-DF1abBS2.ttf +0 -0
  67. package/apps/web/dist/assets/coffee-Bd8akH9Z.js +1 -0
  68. package/apps/web/dist/assets/cpp-BbWJElDN.js +1 -0
  69. package/apps/web/dist/assets/csharp-Co3qMtFm.js +1 -0
  70. package/apps/web/dist/assets/csp-D-4FJmMZ.js +1 -0
  71. package/apps/web/dist/assets/css-DdJfP1eB.js +3 -0
  72. package/apps/web/dist/assets/css.worker-C_6RgliQ.js +97 -0
  73. package/apps/web/dist/assets/cssMode-EHCHSzzL.js +1 -0
  74. package/apps/web/dist/assets/cypher-cTPe9QuQ.js +1 -0
  75. package/apps/web/dist/assets/dart-BOtBlQCF.js +1 -0
  76. package/apps/web/dist/assets/dockerfile-BG73LgW2.js +1 -0
  77. package/apps/web/dist/assets/ecl-BEgZUVRK.js +1 -0
  78. package/apps/web/dist/assets/editor.worker-D1TDBLlL.js +30 -0
  79. package/apps/web/dist/assets/elixir-BkW5O-1t.js +1 -0
  80. package/apps/web/dist/assets/flow9-BeJ5waoc.js +1 -0
  81. package/apps/web/dist/assets/freemarker2-CYDUi4bR.js +3 -0
  82. package/apps/web/dist/assets/fsharp-PahG7c26.js +1 -0
  83. package/apps/web/dist/assets/go-acbASCJo.js +1 -0
  84. package/apps/web/dist/assets/graphql-BxJiqAUM.js +1 -0
  85. package/apps/web/dist/assets/handlebars-Bl5r-XBz.js +1 -0
  86. package/apps/web/dist/assets/hcl-DtV1sZF8.js +1 -0
  87. package/apps/web/dist/assets/html-Dimr8AuT.js +1 -0
  88. package/apps/web/dist/assets/html.worker-CLyYFd_g.js +474 -0
  89. package/apps/web/dist/assets/htmlMode-DbKEQN5e.js +1 -0
  90. package/apps/web/dist/assets/index-CiO_U1kt.js +158 -0
  91. package/apps/web/dist/assets/index-Cn8Mc6ux.css +1 -0
  92. package/apps/web/dist/assets/ini-Kd9XrMLS.js +1 -0
  93. package/apps/web/dist/assets/java-CXBNlu9o.js +1 -0
  94. package/apps/web/dist/assets/javascript-CAsmnqI3.js +1 -0
  95. package/apps/web/dist/assets/json.worker-BggoxaER.js +62 -0
  96. package/apps/web/dist/assets/jsonMode-FAO7KTW2.js +7 -0
  97. package/apps/web/dist/assets/julia-cl7-CwDS.js +1 -0
  98. package/apps/web/dist/assets/kotlin-s7OhZKlX.js +1 -0
  99. package/apps/web/dist/assets/less-9HpZscsL.js +2 -0
  100. package/apps/web/dist/assets/lexon-OrD6JF1K.js +1 -0
  101. package/apps/web/dist/assets/liquid-5H_43_EZ.js +1 -0
  102. package/apps/web/dist/assets/lspLanguageFeatures-DnuYc3pX.js +4 -0
  103. package/apps/web/dist/assets/lua-Cyyb5UIc.js +1 -0
  104. package/apps/web/dist/assets/m3-B8OfTtLu.js +1 -0
  105. package/apps/web/dist/assets/markdown-BFxVWTOG.js +1 -0
  106. package/apps/web/dist/assets/mdx-DJvtDn95.js +1 -0
  107. package/apps/web/dist/assets/mips-CiqrrVzr.js +1 -0
  108. package/apps/web/dist/assets/monaco-BEZSi3GX.js +1005 -0
  109. package/apps/web/dist/assets/monaco-Ced-qlZg.css +1 -0
  110. package/apps/web/dist/assets/msdax-DmeGPVcC.js +1 -0
  111. package/apps/web/dist/assets/mysql-C_tMU-Nz.js +1 -0
  112. package/apps/web/dist/assets/objective-c-BDtDVThU.js +1 -0
  113. package/apps/web/dist/assets/pascal-vHIfCaH5.js +1 -0
  114. package/apps/web/dist/assets/pascaligo-DtZ0uQbO.js +1 -0
  115. package/apps/web/dist/assets/perl-Ub6l9XKa.js +1 -0
  116. package/apps/web/dist/assets/pgsql-BlNEE0v7.js +1 -0
  117. package/apps/web/dist/assets/php-BBUBE1dy.js +1 -0
  118. package/apps/web/dist/assets/pla-DSh2-awV.js +1 -0
  119. package/apps/web/dist/assets/postiats-CocnycG-.js +1 -0
  120. package/apps/web/dist/assets/powerquery-tScXyioY.js +1 -0
  121. package/apps/web/dist/assets/powershell-COWaemsV.js +1 -0
  122. package/apps/web/dist/assets/protobuf-Brw8urJB.js +2 -0
  123. package/apps/web/dist/assets/pug-8SOpv6rk.js +1 -0
  124. package/apps/web/dist/assets/python-D4581wh8.js +1 -0
  125. package/apps/web/dist/assets/qsharp-Bw9ernYp.js +1 -0
  126. package/apps/web/dist/assets/r-j7ic8hl3.js +1 -0
  127. package/apps/web/dist/assets/razor-Cob92s3y.js +1 -0
  128. package/apps/web/dist/assets/redis-Bu5POkcn.js +1 -0
  129. package/apps/web/dist/assets/redshift-Bs9aos_-.js +1 -0
  130. package/apps/web/dist/assets/restructuredtext-CqXO7rUv.js +1 -0
  131. package/apps/web/dist/assets/ruby-zBfavPgS.js +1 -0
  132. package/apps/web/dist/assets/rust-BzKRNQWT.js +1 -0
  133. package/apps/web/dist/assets/sb-BBc9UKZt.js +1 -0
  134. package/apps/web/dist/assets/scala-D9hQfWCl.js +1 -0
  135. package/apps/web/dist/assets/scheme-BPhDTwHR.js +1 -0
  136. package/apps/web/dist/assets/scss-CBJaRo0y.js +3 -0
  137. package/apps/web/dist/assets/shell-DiJ1NA_G.js +1 -0
  138. package/apps/web/dist/assets/solidity-Db0IVjzk.js +1 -0
  139. package/apps/web/dist/assets/sophia-CnS9iZB_.js +1 -0
  140. package/apps/web/dist/assets/sparql-CJmd_6j2.js +1 -0
  141. package/apps/web/dist/assets/sql-ClhHkBeG.js +1 -0
  142. package/apps/web/dist/assets/st-CHwy0fLd.js +1 -0
  143. package/apps/web/dist/assets/swift-CnmFD0ga.js +1 -0
  144. package/apps/web/dist/assets/systemverilog-Bs9z6M-B.js +1 -0
  145. package/apps/web/dist/assets/tcl-Dm6ycUr_.js +1 -0
  146. package/apps/web/dist/assets/ts.worker-BrLZGe_E.js +67722 -0
  147. package/apps/web/dist/assets/tsMode-WJsr57wC.js +11 -0
  148. package/apps/web/dist/assets/twig-Csy3S7wG.js +1 -0
  149. package/apps/web/dist/assets/typescript-8M7GiCNW.js +1 -0
  150. package/apps/web/dist/assets/typespec-Btyra-wh.js +1 -0
  151. package/apps/web/dist/assets/vb-Db0cS2oM.js +1 -0
  152. package/apps/web/dist/assets/wgsl-BTesnYfV.js +298 -0
  153. package/apps/web/dist/assets/workers-FOC7l7Wh.js +1 -0
  154. package/apps/web/dist/assets/xml-Hm5ZZqOZ.js +1 -0
  155. package/apps/web/dist/assets/yaml-E7sEyvM5.js +1 -0
  156. package/apps/web/dist/favicon.svg +4 -0
  157. package/apps/web/dist/index.html +15 -0
  158. package/docs/README.md +26 -0
  159. package/docs/guides/install.md +63 -0
  160. package/package.json +94 -4
@@ -0,0 +1,4332 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "2b100b20-49e7-4889-a7ff-8bd20edb770f",
5
+ "prevId": "1c09ee45-fb9a-4d69-a2ca-cdc7dd4eefa6",
6
+ "tables": {
7
+ "agent_events": {
8
+ "name": "agent_events",
9
+ "columns": {
10
+ "id": {
11
+ "name": "id",
12
+ "type": "text",
13
+ "primaryKey": true,
14
+ "notNull": true,
15
+ "autoincrement": false
16
+ },
17
+ "session_id": {
18
+ "name": "session_id",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true,
22
+ "autoincrement": false
23
+ },
24
+ "turn_id": {
25
+ "name": "turn_id",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": false,
29
+ "autoincrement": false
30
+ },
31
+ "seq": {
32
+ "name": "seq",
33
+ "type": "integer",
34
+ "primaryKey": false,
35
+ "notNull": true,
36
+ "autoincrement": false
37
+ },
38
+ "type": {
39
+ "name": "type",
40
+ "type": "text",
41
+ "primaryKey": false,
42
+ "notNull": true,
43
+ "autoincrement": false
44
+ },
45
+ "payload_json": {
46
+ "name": "payload_json",
47
+ "type": "text",
48
+ "primaryKey": false,
49
+ "notNull": true,
50
+ "autoincrement": false,
51
+ "default": "'{}'"
52
+ },
53
+ "created_at": {
54
+ "name": "created_at",
55
+ "type": "integer",
56
+ "primaryKey": false,
57
+ "notNull": true,
58
+ "autoincrement": false
59
+ }
60
+ },
61
+ "indexes": {
62
+ "agent_events_session_seq_unique": {
63
+ "name": "agent_events_session_seq_unique",
64
+ "columns": ["session_id", "seq"],
65
+ "isUnique": true
66
+ }
67
+ },
68
+ "foreignKeys": {
69
+ "agent_events_session_id_sessions_id_fk": {
70
+ "name": "agent_events_session_id_sessions_id_fk",
71
+ "tableFrom": "agent_events",
72
+ "tableTo": "sessions",
73
+ "columnsFrom": ["session_id"],
74
+ "columnsTo": ["id"],
75
+ "onDelete": "cascade",
76
+ "onUpdate": "no action"
77
+ },
78
+ "agent_events_turn_id_turns_id_fk": {
79
+ "name": "agent_events_turn_id_turns_id_fk",
80
+ "tableFrom": "agent_events",
81
+ "tableTo": "turns",
82
+ "columnsFrom": ["turn_id"],
83
+ "columnsTo": ["id"],
84
+ "onDelete": "cascade",
85
+ "onUpdate": "no action"
86
+ }
87
+ },
88
+ "compositePrimaryKeys": {},
89
+ "uniqueConstraints": {},
90
+ "checkConstraints": {}
91
+ },
92
+ "app_meta": {
93
+ "name": "app_meta",
94
+ "columns": {
95
+ "key": {
96
+ "name": "key",
97
+ "type": "text",
98
+ "primaryKey": true,
99
+ "notNull": true,
100
+ "autoincrement": false
101
+ },
102
+ "value": {
103
+ "name": "value",
104
+ "type": "text",
105
+ "primaryKey": false,
106
+ "notNull": true,
107
+ "autoincrement": false
108
+ },
109
+ "updated_at": {
110
+ "name": "updated_at",
111
+ "type": "integer",
112
+ "primaryKey": false,
113
+ "notNull": true,
114
+ "autoincrement": false
115
+ }
116
+ },
117
+ "indexes": {},
118
+ "foreignKeys": {},
119
+ "compositePrimaryKeys": {},
120
+ "uniqueConstraints": {},
121
+ "checkConstraints": {}
122
+ },
123
+ "approvals": {
124
+ "name": "approvals",
125
+ "columns": {
126
+ "id": {
127
+ "name": "id",
128
+ "type": "text",
129
+ "primaryKey": true,
130
+ "notNull": true,
131
+ "autoincrement": false
132
+ },
133
+ "turn_id": {
134
+ "name": "turn_id",
135
+ "type": "text",
136
+ "primaryKey": false,
137
+ "notNull": true,
138
+ "autoincrement": false
139
+ },
140
+ "tool_call_id": {
141
+ "name": "tool_call_id",
142
+ "type": "text",
143
+ "primaryKey": false,
144
+ "notNull": true,
145
+ "autoincrement": false
146
+ },
147
+ "tool_name": {
148
+ "name": "tool_name",
149
+ "type": "text",
150
+ "primaryKey": false,
151
+ "notNull": true,
152
+ "autoincrement": false
153
+ },
154
+ "risk": {
155
+ "name": "risk",
156
+ "type": "text",
157
+ "primaryKey": false,
158
+ "notNull": true,
159
+ "autoincrement": false
160
+ },
161
+ "status": {
162
+ "name": "status",
163
+ "type": "text",
164
+ "primaryKey": false,
165
+ "notNull": true,
166
+ "autoincrement": false,
167
+ "default": "'pending'"
168
+ },
169
+ "scope_json": {
170
+ "name": "scope_json",
171
+ "type": "text",
172
+ "primaryKey": false,
173
+ "notNull": true,
174
+ "autoincrement": false,
175
+ "default": "'{}'"
176
+ },
177
+ "params_hash": {
178
+ "name": "params_hash",
179
+ "type": "text",
180
+ "primaryKey": false,
181
+ "notNull": true,
182
+ "autoincrement": false
183
+ },
184
+ "expires_at": {
185
+ "name": "expires_at",
186
+ "type": "integer",
187
+ "primaryKey": false,
188
+ "notNull": true,
189
+ "autoincrement": false
190
+ },
191
+ "decided_at": {
192
+ "name": "decided_at",
193
+ "type": "integer",
194
+ "primaryKey": false,
195
+ "notNull": false,
196
+ "autoincrement": false
197
+ },
198
+ "decided_by": {
199
+ "name": "decided_by",
200
+ "type": "text",
201
+ "primaryKey": false,
202
+ "notNull": false,
203
+ "autoincrement": false
204
+ },
205
+ "created_at": {
206
+ "name": "created_at",
207
+ "type": "integer",
208
+ "primaryKey": false,
209
+ "notNull": true,
210
+ "autoincrement": false
211
+ }
212
+ },
213
+ "indexes": {
214
+ "idx_approvals_turn_status": {
215
+ "name": "idx_approvals_turn_status",
216
+ "columns": ["turn_id", "status"],
217
+ "isUnique": false
218
+ },
219
+ "idx_approvals_expiry": {
220
+ "name": "idx_approvals_expiry",
221
+ "columns": ["expires_at"],
222
+ "isUnique": false
223
+ }
224
+ },
225
+ "foreignKeys": {
226
+ "approvals_turn_id_turns_id_fk": {
227
+ "name": "approvals_turn_id_turns_id_fk",
228
+ "tableFrom": "approvals",
229
+ "tableTo": "turns",
230
+ "columnsFrom": ["turn_id"],
231
+ "columnsTo": ["id"],
232
+ "onDelete": "cascade",
233
+ "onUpdate": "no action"
234
+ }
235
+ },
236
+ "compositePrimaryKeys": {},
237
+ "uniqueConstraints": {},
238
+ "checkConstraints": {}
239
+ },
240
+ "audit_logs": {
241
+ "name": "audit_logs",
242
+ "columns": {
243
+ "id": {
244
+ "name": "id",
245
+ "type": "text",
246
+ "primaryKey": true,
247
+ "notNull": true,
248
+ "autoincrement": false
249
+ },
250
+ "client_session_id": {
251
+ "name": "client_session_id",
252
+ "type": "text",
253
+ "primaryKey": false,
254
+ "notNull": false,
255
+ "autoincrement": false
256
+ },
257
+ "session_id": {
258
+ "name": "session_id",
259
+ "type": "text",
260
+ "primaryKey": false,
261
+ "notNull": false,
262
+ "autoincrement": false
263
+ },
264
+ "action": {
265
+ "name": "action",
266
+ "type": "text",
267
+ "primaryKey": false,
268
+ "notNull": true,
269
+ "autoincrement": false
270
+ },
271
+ "resource_type": {
272
+ "name": "resource_type",
273
+ "type": "text",
274
+ "primaryKey": false,
275
+ "notNull": false,
276
+ "autoincrement": false
277
+ },
278
+ "resource_id": {
279
+ "name": "resource_id",
280
+ "type": "text",
281
+ "primaryKey": false,
282
+ "notNull": false,
283
+ "autoincrement": false
284
+ },
285
+ "decision": {
286
+ "name": "decision",
287
+ "type": "text",
288
+ "primaryKey": false,
289
+ "notNull": false,
290
+ "autoincrement": false
291
+ },
292
+ "details_json": {
293
+ "name": "details_json",
294
+ "type": "text",
295
+ "primaryKey": false,
296
+ "notNull": true,
297
+ "autoincrement": false,
298
+ "default": "'{}'"
299
+ },
300
+ "created_at": {
301
+ "name": "created_at",
302
+ "type": "integer",
303
+ "primaryKey": false,
304
+ "notNull": true,
305
+ "autoincrement": false
306
+ }
307
+ },
308
+ "indexes": {
309
+ "idx_audit_created": {
310
+ "name": "idx_audit_created",
311
+ "columns": ["created_at"],
312
+ "isUnique": false
313
+ },
314
+ "idx_audit_action": {
315
+ "name": "idx_audit_action",
316
+ "columns": ["action", "created_at"],
317
+ "isUnique": false
318
+ }
319
+ },
320
+ "foreignKeys": {},
321
+ "compositePrimaryKeys": {},
322
+ "uniqueConstraints": {},
323
+ "checkConstraints": {}
324
+ },
325
+ "auth_settings": {
326
+ "name": "auth_settings",
327
+ "columns": {
328
+ "id": {
329
+ "name": "id",
330
+ "type": "integer",
331
+ "primaryKey": true,
332
+ "notNull": true,
333
+ "autoincrement": false
334
+ },
335
+ "admin_hash": {
336
+ "name": "admin_hash",
337
+ "type": "text",
338
+ "primaryKey": false,
339
+ "notNull": true,
340
+ "autoincrement": false
341
+ },
342
+ "admin_updated_at": {
343
+ "name": "admin_updated_at",
344
+ "type": "integer",
345
+ "primaryKey": false,
346
+ "notNull": true,
347
+ "autoincrement": false
348
+ },
349
+ "initialized_at": {
350
+ "name": "initialized_at",
351
+ "type": "integer",
352
+ "primaryKey": false,
353
+ "notNull": true,
354
+ "autoincrement": false
355
+ }
356
+ },
357
+ "indexes": {},
358
+ "foreignKeys": {},
359
+ "compositePrimaryKeys": {},
360
+ "uniqueConstraints": {},
361
+ "checkConstraints": {
362
+ "auth_settings_single_row": {
363
+ "name": "auth_settings_single_row",
364
+ "value": "\"auth_settings\".\"id\" = 1"
365
+ }
366
+ }
367
+ },
368
+ "browser_sessions": {
369
+ "name": "browser_sessions",
370
+ "columns": {
371
+ "id": {
372
+ "name": "id",
373
+ "type": "text",
374
+ "primaryKey": true,
375
+ "notNull": true,
376
+ "autoincrement": false
377
+ },
378
+ "device_id": {
379
+ "name": "device_id",
380
+ "type": "text",
381
+ "primaryKey": false,
382
+ "notNull": false,
383
+ "autoincrement": false
384
+ },
385
+ "token_hash": {
386
+ "name": "token_hash",
387
+ "type": "text",
388
+ "primaryKey": false,
389
+ "notNull": true,
390
+ "autoincrement": false
391
+ },
392
+ "kind": {
393
+ "name": "kind",
394
+ "type": "text",
395
+ "primaryKey": false,
396
+ "notNull": true,
397
+ "autoincrement": false
398
+ },
399
+ "ip": {
400
+ "name": "ip",
401
+ "type": "text",
402
+ "primaryKey": false,
403
+ "notNull": false,
404
+ "autoincrement": false
405
+ },
406
+ "user_agent": {
407
+ "name": "user_agent",
408
+ "type": "text",
409
+ "primaryKey": false,
410
+ "notNull": false,
411
+ "autoincrement": false
412
+ },
413
+ "created_at": {
414
+ "name": "created_at",
415
+ "type": "integer",
416
+ "primaryKey": false,
417
+ "notNull": true,
418
+ "autoincrement": false
419
+ },
420
+ "last_seen_at": {
421
+ "name": "last_seen_at",
422
+ "type": "integer",
423
+ "primaryKey": false,
424
+ "notNull": true,
425
+ "autoincrement": false
426
+ },
427
+ "expires_at": {
428
+ "name": "expires_at",
429
+ "type": "integer",
430
+ "primaryKey": false,
431
+ "notNull": true,
432
+ "autoincrement": false
433
+ },
434
+ "revoked_at": {
435
+ "name": "revoked_at",
436
+ "type": "integer",
437
+ "primaryKey": false,
438
+ "notNull": false,
439
+ "autoincrement": false
440
+ }
441
+ },
442
+ "indexes": {
443
+ "browser_sessions_token_hash_unique": {
444
+ "name": "browser_sessions_token_hash_unique",
445
+ "columns": ["token_hash"],
446
+ "isUnique": true
447
+ },
448
+ "idx_browser_sessions_device": {
449
+ "name": "idx_browser_sessions_device",
450
+ "columns": ["device_id"],
451
+ "isUnique": false
452
+ }
453
+ },
454
+ "foreignKeys": {
455
+ "browser_sessions_device_id_trusted_devices_id_fk": {
456
+ "name": "browser_sessions_device_id_trusted_devices_id_fk",
457
+ "tableFrom": "browser_sessions",
458
+ "tableTo": "trusted_devices",
459
+ "columnsFrom": ["device_id"],
460
+ "columnsTo": ["id"],
461
+ "onDelete": "no action",
462
+ "onUpdate": "no action"
463
+ }
464
+ },
465
+ "compositePrimaryKeys": {},
466
+ "uniqueConstraints": {},
467
+ "checkConstraints": {}
468
+ },
469
+ "command_executions": {
470
+ "name": "command_executions",
471
+ "columns": {
472
+ "id": {
473
+ "name": "id",
474
+ "type": "text",
475
+ "primaryKey": true,
476
+ "notNull": true,
477
+ "autoincrement": false
478
+ },
479
+ "operation_id": {
480
+ "name": "operation_id",
481
+ "type": "text",
482
+ "primaryKey": false,
483
+ "notNull": true,
484
+ "autoincrement": false
485
+ },
486
+ "project_id": {
487
+ "name": "project_id",
488
+ "type": "text",
489
+ "primaryKey": false,
490
+ "notNull": false,
491
+ "autoincrement": false
492
+ },
493
+ "workspace_session_id": {
494
+ "name": "workspace_session_id",
495
+ "type": "text",
496
+ "primaryKey": false,
497
+ "notNull": false,
498
+ "autoincrement": false
499
+ },
500
+ "session_id": {
501
+ "name": "session_id",
502
+ "type": "text",
503
+ "primaryKey": false,
504
+ "notNull": true,
505
+ "autoincrement": false
506
+ },
507
+ "turn_id": {
508
+ "name": "turn_id",
509
+ "type": "text",
510
+ "primaryKey": false,
511
+ "notNull": true,
512
+ "autoincrement": false
513
+ },
514
+ "tool_call_id": {
515
+ "name": "tool_call_id",
516
+ "type": "text",
517
+ "primaryKey": false,
518
+ "notNull": true,
519
+ "autoincrement": false
520
+ },
521
+ "policy_snapshot_id": {
522
+ "name": "policy_snapshot_id",
523
+ "type": "text",
524
+ "primaryKey": false,
525
+ "notNull": true,
526
+ "autoincrement": false
527
+ },
528
+ "params_hash": {
529
+ "name": "params_hash",
530
+ "type": "text",
531
+ "primaryKey": false,
532
+ "notNull": true,
533
+ "autoincrement": false
534
+ },
535
+ "status": {
536
+ "name": "status",
537
+ "type": "text",
538
+ "primaryKey": false,
539
+ "notNull": true,
540
+ "autoincrement": false
541
+ },
542
+ "exit_code": {
543
+ "name": "exit_code",
544
+ "type": "integer",
545
+ "primaryKey": false,
546
+ "notNull": false,
547
+ "autoincrement": false
548
+ },
549
+ "reason_code": {
550
+ "name": "reason_code",
551
+ "type": "text",
552
+ "primaryKey": false,
553
+ "notNull": false,
554
+ "autoincrement": false
555
+ },
556
+ "truncated": {
557
+ "name": "truncated",
558
+ "type": "integer",
559
+ "primaryKey": false,
560
+ "notNull": true,
561
+ "autoincrement": false,
562
+ "default": false
563
+ },
564
+ "process_identity_json": {
565
+ "name": "process_identity_json",
566
+ "type": "text",
567
+ "primaryKey": false,
568
+ "notNull": false,
569
+ "autoincrement": false
570
+ },
571
+ "output_cursor": {
572
+ "name": "output_cursor",
573
+ "type": "integer",
574
+ "primaryKey": false,
575
+ "notNull": true,
576
+ "autoincrement": false,
577
+ "default": 0
578
+ },
579
+ "created_at": {
580
+ "name": "created_at",
581
+ "type": "integer",
582
+ "primaryKey": false,
583
+ "notNull": true,
584
+ "autoincrement": false
585
+ },
586
+ "started_at": {
587
+ "name": "started_at",
588
+ "type": "integer",
589
+ "primaryKey": false,
590
+ "notNull": false,
591
+ "autoincrement": false
592
+ },
593
+ "ended_at": {
594
+ "name": "ended_at",
595
+ "type": "integer",
596
+ "primaryKey": false,
597
+ "notNull": false,
598
+ "autoincrement": false
599
+ }
600
+ },
601
+ "indexes": {
602
+ "command_executions_operation": {
603
+ "name": "command_executions_operation",
604
+ "columns": ["operation_id"],
605
+ "isUnique": true
606
+ },
607
+ "command_executions_status": {
608
+ "name": "command_executions_status",
609
+ "columns": ["status"],
610
+ "isUnique": false
611
+ }
612
+ },
613
+ "foreignKeys": {
614
+ "command_executions_operation_id_resource_operations_id_fk": {
615
+ "name": "command_executions_operation_id_resource_operations_id_fk",
616
+ "tableFrom": "command_executions",
617
+ "tableTo": "resource_operations",
618
+ "columnsFrom": ["operation_id"],
619
+ "columnsTo": ["id"],
620
+ "onDelete": "no action",
621
+ "onUpdate": "no action"
622
+ }
623
+ },
624
+ "compositePrimaryKeys": {},
625
+ "uniqueConstraints": {},
626
+ "checkConstraints": {}
627
+ },
628
+ "credential_profiles": {
629
+ "name": "credential_profiles",
630
+ "columns": {
631
+ "id": {
632
+ "name": "id",
633
+ "type": "text",
634
+ "primaryKey": true,
635
+ "notNull": true,
636
+ "autoincrement": false
637
+ },
638
+ "provider": {
639
+ "name": "provider",
640
+ "type": "text",
641
+ "primaryKey": false,
642
+ "notNull": true,
643
+ "autoincrement": false
644
+ },
645
+ "label": {
646
+ "name": "label",
647
+ "type": "text",
648
+ "primaryKey": false,
649
+ "notNull": true,
650
+ "autoincrement": false
651
+ },
652
+ "secret_ref": {
653
+ "name": "secret_ref",
654
+ "type": "text",
655
+ "primaryKey": false,
656
+ "notNull": true,
657
+ "autoincrement": false
658
+ },
659
+ "created_at": {
660
+ "name": "created_at",
661
+ "type": "integer",
662
+ "primaryKey": false,
663
+ "notNull": true,
664
+ "autoincrement": false
665
+ }
666
+ },
667
+ "indexes": {
668
+ "idx_credential_profiles_provider": {
669
+ "name": "idx_credential_profiles_provider",
670
+ "columns": ["provider"],
671
+ "isUnique": false
672
+ }
673
+ },
674
+ "foreignKeys": {
675
+ "credential_profiles_secret_ref_secrets_id_fk": {
676
+ "name": "credential_profiles_secret_ref_secrets_id_fk",
677
+ "tableFrom": "credential_profiles",
678
+ "tableTo": "secrets",
679
+ "columnsFrom": ["secret_ref"],
680
+ "columnsTo": ["id"],
681
+ "onDelete": "cascade",
682
+ "onUpdate": "no action"
683
+ }
684
+ },
685
+ "compositePrimaryKeys": {},
686
+ "uniqueConstraints": {},
687
+ "checkConstraints": {}
688
+ },
689
+ "deployment_approvals": {
690
+ "name": "deployment_approvals",
691
+ "columns": {
692
+ "id": {
693
+ "name": "id",
694
+ "type": "text",
695
+ "primaryKey": true,
696
+ "notNull": true,
697
+ "autoincrement": false
698
+ },
699
+ "authorization_id": {
700
+ "name": "authorization_id",
701
+ "type": "text",
702
+ "primaryKey": false,
703
+ "notNull": true,
704
+ "autoincrement": false
705
+ },
706
+ "plan_id": {
707
+ "name": "plan_id",
708
+ "type": "text",
709
+ "primaryKey": false,
710
+ "notNull": true,
711
+ "autoincrement": false
712
+ },
713
+ "target_id": {
714
+ "name": "target_id",
715
+ "type": "text",
716
+ "primaryKey": false,
717
+ "notNull": true,
718
+ "autoincrement": false
719
+ },
720
+ "project_id": {
721
+ "name": "project_id",
722
+ "type": "text",
723
+ "primaryKey": false,
724
+ "notNull": true,
725
+ "autoincrement": false
726
+ },
727
+ "status": {
728
+ "name": "status",
729
+ "type": "text",
730
+ "primaryKey": false,
731
+ "notNull": true,
732
+ "autoincrement": false
733
+ },
734
+ "plan_hash": {
735
+ "name": "plan_hash",
736
+ "type": "text",
737
+ "primaryKey": false,
738
+ "notNull": true,
739
+ "autoincrement": false
740
+ },
741
+ "artifact_hash": {
742
+ "name": "artifact_hash",
743
+ "type": "text",
744
+ "primaryKey": false,
745
+ "notNull": true,
746
+ "autoincrement": false
747
+ },
748
+ "requested_by": {
749
+ "name": "requested_by",
750
+ "type": "text",
751
+ "primaryKey": false,
752
+ "notNull": true,
753
+ "autoincrement": false
754
+ },
755
+ "decided_by": {
756
+ "name": "decided_by",
757
+ "type": "text",
758
+ "primaryKey": false,
759
+ "notNull": false,
760
+ "autoincrement": false
761
+ },
762
+ "expires_at": {
763
+ "name": "expires_at",
764
+ "type": "integer",
765
+ "primaryKey": false,
766
+ "notNull": true,
767
+ "autoincrement": false
768
+ },
769
+ "decided_at": {
770
+ "name": "decided_at",
771
+ "type": "integer",
772
+ "primaryKey": false,
773
+ "notNull": false,
774
+ "autoincrement": false
775
+ },
776
+ "created_at": {
777
+ "name": "created_at",
778
+ "type": "integer",
779
+ "primaryKey": false,
780
+ "notNull": true,
781
+ "autoincrement": false
782
+ }
783
+ },
784
+ "indexes": {
785
+ "deployment_approvals_authorization": {
786
+ "name": "deployment_approvals_authorization",
787
+ "columns": ["authorization_id"],
788
+ "isUnique": true
789
+ },
790
+ "deployment_approvals_status_expires": {
791
+ "name": "deployment_approvals_status_expires",
792
+ "columns": ["status", "expires_at"],
793
+ "isUnique": false
794
+ }
795
+ },
796
+ "foreignKeys": {
797
+ "deployment_approvals_authorization_id_deployment_authorizations_id_fk": {
798
+ "name": "deployment_approvals_authorization_id_deployment_authorizations_id_fk",
799
+ "tableFrom": "deployment_approvals",
800
+ "tableTo": "deployment_authorizations",
801
+ "columnsFrom": ["authorization_id"],
802
+ "columnsTo": ["id"],
803
+ "onDelete": "no action",
804
+ "onUpdate": "no action"
805
+ },
806
+ "deployment_approvals_plan_id_deployment_plans_id_fk": {
807
+ "name": "deployment_approvals_plan_id_deployment_plans_id_fk",
808
+ "tableFrom": "deployment_approvals",
809
+ "tableTo": "deployment_plans",
810
+ "columnsFrom": ["plan_id"],
811
+ "columnsTo": ["id"],
812
+ "onDelete": "no action",
813
+ "onUpdate": "no action"
814
+ },
815
+ "deployment_approvals_target_id_deployment_targets_id_fk": {
816
+ "name": "deployment_approvals_target_id_deployment_targets_id_fk",
817
+ "tableFrom": "deployment_approvals",
818
+ "tableTo": "deployment_targets",
819
+ "columnsFrom": ["target_id"],
820
+ "columnsTo": ["id"],
821
+ "onDelete": "no action",
822
+ "onUpdate": "no action"
823
+ },
824
+ "deployment_approvals_project_id_projects_id_fk": {
825
+ "name": "deployment_approvals_project_id_projects_id_fk",
826
+ "tableFrom": "deployment_approvals",
827
+ "tableTo": "projects",
828
+ "columnsFrom": ["project_id"],
829
+ "columnsTo": ["id"],
830
+ "onDelete": "no action",
831
+ "onUpdate": "no action"
832
+ }
833
+ },
834
+ "compositePrimaryKeys": {},
835
+ "uniqueConstraints": {},
836
+ "checkConstraints": {
837
+ "deployment_approvals_status": {
838
+ "name": "deployment_approvals_status",
839
+ "value": "\"deployment_approvals\".\"status\" IN ('PENDING', 'APPROVED', 'DENIED', 'EXPIRED', 'REVOKED')"
840
+ },
841
+ "deployment_approvals_plan_hash": {
842
+ "name": "deployment_approvals_plan_hash",
843
+ "value": "length(\"deployment_approvals\".\"plan_hash\") = 64"
844
+ },
845
+ "deployment_approvals_artifact_hash": {
846
+ "name": "deployment_approvals_artifact_hash",
847
+ "value": "length(\"deployment_approvals\".\"artifact_hash\") = 64"
848
+ }
849
+ }
850
+ },
851
+ "deployment_artifacts": {
852
+ "name": "deployment_artifacts",
853
+ "columns": {
854
+ "id": {
855
+ "name": "id",
856
+ "type": "text",
857
+ "primaryKey": true,
858
+ "notNull": true,
859
+ "autoincrement": false
860
+ },
861
+ "build_id": {
862
+ "name": "build_id",
863
+ "type": "text",
864
+ "primaryKey": false,
865
+ "notNull": true,
866
+ "autoincrement": false
867
+ },
868
+ "target_id": {
869
+ "name": "target_id",
870
+ "type": "text",
871
+ "primaryKey": false,
872
+ "notNull": true,
873
+ "autoincrement": false
874
+ },
875
+ "project_id": {
876
+ "name": "project_id",
877
+ "type": "text",
878
+ "primaryKey": false,
879
+ "notNull": true,
880
+ "autoincrement": false
881
+ },
882
+ "version": {
883
+ "name": "version",
884
+ "type": "text",
885
+ "primaryKey": false,
886
+ "notNull": true,
887
+ "autoincrement": false
888
+ },
889
+ "artifact_hash": {
890
+ "name": "artifact_hash",
891
+ "type": "text",
892
+ "primaryKey": false,
893
+ "notNull": true,
894
+ "autoincrement": false
895
+ },
896
+ "artifact_path": {
897
+ "name": "artifact_path",
898
+ "type": "text",
899
+ "primaryKey": false,
900
+ "notNull": true,
901
+ "autoincrement": false
902
+ },
903
+ "size_bytes": {
904
+ "name": "size_bytes",
905
+ "type": "integer",
906
+ "primaryKey": false,
907
+ "notNull": true,
908
+ "autoincrement": false
909
+ },
910
+ "file_count": {
911
+ "name": "file_count",
912
+ "type": "integer",
913
+ "primaryKey": false,
914
+ "notNull": true,
915
+ "autoincrement": false
916
+ },
917
+ "spec_json": {
918
+ "name": "spec_json",
919
+ "type": "text",
920
+ "primaryKey": false,
921
+ "notNull": true,
922
+ "autoincrement": false
923
+ },
924
+ "spec_hash": {
925
+ "name": "spec_hash",
926
+ "type": "text",
927
+ "primaryKey": false,
928
+ "notNull": true,
929
+ "autoincrement": false
930
+ },
931
+ "source_json": {
932
+ "name": "source_json",
933
+ "type": "text",
934
+ "primaryKey": false,
935
+ "notNull": true,
936
+ "autoincrement": false
937
+ },
938
+ "created_at": {
939
+ "name": "created_at",
940
+ "type": "integer",
941
+ "primaryKey": false,
942
+ "notNull": true,
943
+ "autoincrement": false
944
+ }
945
+ },
946
+ "indexes": {
947
+ "deployment_artifacts_build": {
948
+ "name": "deployment_artifacts_build",
949
+ "columns": ["build_id"],
950
+ "isUnique": true
951
+ },
952
+ "deployment_artifacts_target_version": {
953
+ "name": "deployment_artifacts_target_version",
954
+ "columns": ["target_id", "version"],
955
+ "isUnique": true
956
+ },
957
+ "deployment_artifacts_target_created": {
958
+ "name": "deployment_artifacts_target_created",
959
+ "columns": ["target_id", "created_at"],
960
+ "isUnique": false
961
+ }
962
+ },
963
+ "foreignKeys": {
964
+ "deployment_artifacts_build_id_deployment_builds_id_fk": {
965
+ "name": "deployment_artifacts_build_id_deployment_builds_id_fk",
966
+ "tableFrom": "deployment_artifacts",
967
+ "tableTo": "deployment_builds",
968
+ "columnsFrom": ["build_id"],
969
+ "columnsTo": ["id"],
970
+ "onDelete": "no action",
971
+ "onUpdate": "no action"
972
+ },
973
+ "deployment_artifacts_target_id_deployment_targets_id_fk": {
974
+ "name": "deployment_artifacts_target_id_deployment_targets_id_fk",
975
+ "tableFrom": "deployment_artifacts",
976
+ "tableTo": "deployment_targets",
977
+ "columnsFrom": ["target_id"],
978
+ "columnsTo": ["id"],
979
+ "onDelete": "no action",
980
+ "onUpdate": "no action"
981
+ },
982
+ "deployment_artifacts_project_id_projects_id_fk": {
983
+ "name": "deployment_artifacts_project_id_projects_id_fk",
984
+ "tableFrom": "deployment_artifacts",
985
+ "tableTo": "projects",
986
+ "columnsFrom": ["project_id"],
987
+ "columnsTo": ["id"],
988
+ "onDelete": "no action",
989
+ "onUpdate": "no action"
990
+ }
991
+ },
992
+ "compositePrimaryKeys": {},
993
+ "uniqueConstraints": {},
994
+ "checkConstraints": {
995
+ "deployment_artifacts_hash": {
996
+ "name": "deployment_artifacts_hash",
997
+ "value": "length(\"deployment_artifacts\".\"artifact_hash\") = 64"
998
+ },
999
+ "deployment_artifacts_size": {
1000
+ "name": "deployment_artifacts_size",
1001
+ "value": "\"deployment_artifacts\".\"size_bytes\" >= 0"
1002
+ },
1003
+ "deployment_artifacts_count": {
1004
+ "name": "deployment_artifacts_count",
1005
+ "value": "\"deployment_artifacts\".\"file_count\" >= 0"
1006
+ }
1007
+ }
1008
+ },
1009
+ "deployment_authorizations": {
1010
+ "name": "deployment_authorizations",
1011
+ "columns": {
1012
+ "id": {
1013
+ "name": "id",
1014
+ "type": "text",
1015
+ "primaryKey": true,
1016
+ "notNull": true,
1017
+ "autoincrement": false
1018
+ },
1019
+ "plan_id": {
1020
+ "name": "plan_id",
1021
+ "type": "text",
1022
+ "primaryKey": false,
1023
+ "notNull": true,
1024
+ "autoincrement": false
1025
+ },
1026
+ "target_id": {
1027
+ "name": "target_id",
1028
+ "type": "text",
1029
+ "primaryKey": false,
1030
+ "notNull": true,
1031
+ "autoincrement": false
1032
+ },
1033
+ "project_id": {
1034
+ "name": "project_id",
1035
+ "type": "text",
1036
+ "primaryKey": false,
1037
+ "notNull": true,
1038
+ "autoincrement": false
1039
+ },
1040
+ "action": {
1041
+ "name": "action",
1042
+ "type": "text",
1043
+ "primaryKey": false,
1044
+ "notNull": true,
1045
+ "autoincrement": false
1046
+ },
1047
+ "actor_type": {
1048
+ "name": "actor_type",
1049
+ "type": "text",
1050
+ "primaryKey": false,
1051
+ "notNull": true,
1052
+ "autoincrement": false
1053
+ },
1054
+ "actor_id": {
1055
+ "name": "actor_id",
1056
+ "type": "text",
1057
+ "primaryKey": false,
1058
+ "notNull": true,
1059
+ "autoincrement": false
1060
+ },
1061
+ "client_session_id": {
1062
+ "name": "client_session_id",
1063
+ "type": "text",
1064
+ "primaryKey": false,
1065
+ "notNull": false,
1066
+ "autoincrement": false
1067
+ },
1068
+ "session_id": {
1069
+ "name": "session_id",
1070
+ "type": "text",
1071
+ "primaryKey": false,
1072
+ "notNull": false,
1073
+ "autoincrement": false
1074
+ },
1075
+ "turn_id": {
1076
+ "name": "turn_id",
1077
+ "type": "text",
1078
+ "primaryKey": false,
1079
+ "notNull": false,
1080
+ "autoincrement": false
1081
+ },
1082
+ "policy": {
1083
+ "name": "policy",
1084
+ "type": "text",
1085
+ "primaryKey": false,
1086
+ "notNull": true,
1087
+ "autoincrement": false
1088
+ },
1089
+ "policy_snapshot_id": {
1090
+ "name": "policy_snapshot_id",
1091
+ "type": "text",
1092
+ "primaryKey": false,
1093
+ "notNull": true,
1094
+ "autoincrement": false
1095
+ },
1096
+ "status": {
1097
+ "name": "status",
1098
+ "type": "text",
1099
+ "primaryKey": false,
1100
+ "notNull": true,
1101
+ "autoincrement": false
1102
+ },
1103
+ "plan_hash": {
1104
+ "name": "plan_hash",
1105
+ "type": "text",
1106
+ "primaryKey": false,
1107
+ "notNull": true,
1108
+ "autoincrement": false
1109
+ },
1110
+ "artifact_hash": {
1111
+ "name": "artifact_hash",
1112
+ "type": "text",
1113
+ "primaryKey": false,
1114
+ "notNull": true,
1115
+ "autoincrement": false
1116
+ },
1117
+ "scope_json": {
1118
+ "name": "scope_json",
1119
+ "type": "text",
1120
+ "primaryKey": false,
1121
+ "notNull": true,
1122
+ "autoincrement": false
1123
+ },
1124
+ "scope_hash": {
1125
+ "name": "scope_hash",
1126
+ "type": "text",
1127
+ "primaryKey": false,
1128
+ "notNull": true,
1129
+ "autoincrement": false
1130
+ },
1131
+ "approval_id": {
1132
+ "name": "approval_id",
1133
+ "type": "text",
1134
+ "primaryKey": false,
1135
+ "notNull": false,
1136
+ "autoincrement": false
1137
+ },
1138
+ "request_key": {
1139
+ "name": "request_key",
1140
+ "type": "text",
1141
+ "primaryKey": false,
1142
+ "notNull": true,
1143
+ "autoincrement": false
1144
+ },
1145
+ "expires_at": {
1146
+ "name": "expires_at",
1147
+ "type": "integer",
1148
+ "primaryKey": false,
1149
+ "notNull": true,
1150
+ "autoincrement": false
1151
+ },
1152
+ "decided_at": {
1153
+ "name": "decided_at",
1154
+ "type": "integer",
1155
+ "primaryKey": false,
1156
+ "notNull": false,
1157
+ "autoincrement": false
1158
+ },
1159
+ "consumed_at": {
1160
+ "name": "consumed_at",
1161
+ "type": "integer",
1162
+ "primaryKey": false,
1163
+ "notNull": false,
1164
+ "autoincrement": false
1165
+ },
1166
+ "consume_key": {
1167
+ "name": "consume_key",
1168
+ "type": "text",
1169
+ "primaryKey": false,
1170
+ "notNull": false,
1171
+ "autoincrement": false
1172
+ },
1173
+ "reason_code": {
1174
+ "name": "reason_code",
1175
+ "type": "text",
1176
+ "primaryKey": false,
1177
+ "notNull": false,
1178
+ "autoincrement": false
1179
+ },
1180
+ "created_at": {
1181
+ "name": "created_at",
1182
+ "type": "integer",
1183
+ "primaryKey": false,
1184
+ "notNull": true,
1185
+ "autoincrement": false
1186
+ }
1187
+ },
1188
+ "indexes": {
1189
+ "deployment_authorizations_request": {
1190
+ "name": "deployment_authorizations_request",
1191
+ "columns": ["request_key"],
1192
+ "isUnique": true
1193
+ },
1194
+ "deployment_authorizations_plan_status": {
1195
+ "name": "deployment_authorizations_plan_status",
1196
+ "columns": ["plan_id", "status"],
1197
+ "isUnique": false
1198
+ },
1199
+ "deployment_authorizations_target_status": {
1200
+ "name": "deployment_authorizations_target_status",
1201
+ "columns": ["target_id", "status"],
1202
+ "isUnique": false
1203
+ },
1204
+ "deployment_authorizations_status_expires": {
1205
+ "name": "deployment_authorizations_status_expires",
1206
+ "columns": ["status", "expires_at"],
1207
+ "isUnique": false
1208
+ }
1209
+ },
1210
+ "foreignKeys": {
1211
+ "deployment_authorizations_plan_id_deployment_plans_id_fk": {
1212
+ "name": "deployment_authorizations_plan_id_deployment_plans_id_fk",
1213
+ "tableFrom": "deployment_authorizations",
1214
+ "tableTo": "deployment_plans",
1215
+ "columnsFrom": ["plan_id"],
1216
+ "columnsTo": ["id"],
1217
+ "onDelete": "no action",
1218
+ "onUpdate": "no action"
1219
+ },
1220
+ "deployment_authorizations_target_id_deployment_targets_id_fk": {
1221
+ "name": "deployment_authorizations_target_id_deployment_targets_id_fk",
1222
+ "tableFrom": "deployment_authorizations",
1223
+ "tableTo": "deployment_targets",
1224
+ "columnsFrom": ["target_id"],
1225
+ "columnsTo": ["id"],
1226
+ "onDelete": "no action",
1227
+ "onUpdate": "no action"
1228
+ },
1229
+ "deployment_authorizations_project_id_projects_id_fk": {
1230
+ "name": "deployment_authorizations_project_id_projects_id_fk",
1231
+ "tableFrom": "deployment_authorizations",
1232
+ "tableTo": "projects",
1233
+ "columnsFrom": ["project_id"],
1234
+ "columnsTo": ["id"],
1235
+ "onDelete": "no action",
1236
+ "onUpdate": "no action"
1237
+ }
1238
+ },
1239
+ "compositePrimaryKeys": {},
1240
+ "uniqueConstraints": {},
1241
+ "checkConstraints": {
1242
+ "deployment_authorizations_action": {
1243
+ "name": "deployment_authorizations_action",
1244
+ "value": "\"deployment_authorizations\".\"action\" = 'apply'"
1245
+ },
1246
+ "deployment_authorizations_actor": {
1247
+ "name": "deployment_authorizations_actor",
1248
+ "value": "\"deployment_authorizations\".\"actor_type\" IN ('human', 'agent')"
1249
+ },
1250
+ "deployment_authorizations_policy": {
1251
+ "name": "deployment_authorizations_policy",
1252
+ "value": "\"deployment_authorizations\".\"policy\" IN ('standard', 'strict', 'readonly', 'autonomous')"
1253
+ },
1254
+ "deployment_authorizations_status": {
1255
+ "name": "deployment_authorizations_status",
1256
+ "value": "\"deployment_authorizations\".\"status\" IN ('PENDING', 'AUTHORIZED', 'DENIED', 'EXPIRED', 'REVOKED', 'CONSUMED', 'INVALIDATED')"
1257
+ },
1258
+ "deployment_authorizations_plan_hash": {
1259
+ "name": "deployment_authorizations_plan_hash",
1260
+ "value": "length(\"deployment_authorizations\".\"plan_hash\") = 64"
1261
+ },
1262
+ "deployment_authorizations_artifact_hash": {
1263
+ "name": "deployment_authorizations_artifact_hash",
1264
+ "value": "length(\"deployment_authorizations\".\"artifact_hash\") = 64"
1265
+ },
1266
+ "deployment_authorizations_scope_hash": {
1267
+ "name": "deployment_authorizations_scope_hash",
1268
+ "value": "length(\"deployment_authorizations\".\"scope_hash\") = 64"
1269
+ }
1270
+ }
1271
+ },
1272
+ "deployment_builds": {
1273
+ "name": "deployment_builds",
1274
+ "columns": {
1275
+ "id": {
1276
+ "name": "id",
1277
+ "type": "text",
1278
+ "primaryKey": true,
1279
+ "notNull": true,
1280
+ "autoincrement": false
1281
+ },
1282
+ "target_id": {
1283
+ "name": "target_id",
1284
+ "type": "text",
1285
+ "primaryKey": false,
1286
+ "notNull": true,
1287
+ "autoincrement": false
1288
+ },
1289
+ "project_id": {
1290
+ "name": "project_id",
1291
+ "type": "text",
1292
+ "primaryKey": false,
1293
+ "notNull": true,
1294
+ "autoincrement": false
1295
+ },
1296
+ "request_key": {
1297
+ "name": "request_key",
1298
+ "type": "text",
1299
+ "primaryKey": false,
1300
+ "notNull": true,
1301
+ "autoincrement": false
1302
+ },
1303
+ "requested_by": {
1304
+ "name": "requested_by",
1305
+ "type": "text",
1306
+ "primaryKey": false,
1307
+ "notNull": true,
1308
+ "autoincrement": false
1309
+ },
1310
+ "status": {
1311
+ "name": "status",
1312
+ "type": "text",
1313
+ "primaryKey": false,
1314
+ "notNull": true,
1315
+ "autoincrement": false
1316
+ },
1317
+ "spec_json": {
1318
+ "name": "spec_json",
1319
+ "type": "text",
1320
+ "primaryKey": false,
1321
+ "notNull": true,
1322
+ "autoincrement": false
1323
+ },
1324
+ "spec_hash": {
1325
+ "name": "spec_hash",
1326
+ "type": "text",
1327
+ "primaryKey": false,
1328
+ "notNull": true,
1329
+ "autoincrement": false
1330
+ },
1331
+ "reason_code": {
1332
+ "name": "reason_code",
1333
+ "type": "text",
1334
+ "primaryKey": false,
1335
+ "notNull": false,
1336
+ "autoincrement": false
1337
+ },
1338
+ "log_ref": {
1339
+ "name": "log_ref",
1340
+ "type": "text",
1341
+ "primaryKey": false,
1342
+ "notNull": true,
1343
+ "autoincrement": false
1344
+ },
1345
+ "started_at": {
1346
+ "name": "started_at",
1347
+ "type": "integer",
1348
+ "primaryKey": false,
1349
+ "notNull": false,
1350
+ "autoincrement": false
1351
+ },
1352
+ "ended_at": {
1353
+ "name": "ended_at",
1354
+ "type": "integer",
1355
+ "primaryKey": false,
1356
+ "notNull": false,
1357
+ "autoincrement": false
1358
+ },
1359
+ "created_at": {
1360
+ "name": "created_at",
1361
+ "type": "integer",
1362
+ "primaryKey": false,
1363
+ "notNull": true,
1364
+ "autoincrement": false
1365
+ }
1366
+ },
1367
+ "indexes": {
1368
+ "deployment_builds_request": {
1369
+ "name": "deployment_builds_request",
1370
+ "columns": ["request_key"],
1371
+ "isUnique": true
1372
+ },
1373
+ "deployment_builds_target_created": {
1374
+ "name": "deployment_builds_target_created",
1375
+ "columns": ["target_id", "created_at"],
1376
+ "isUnique": false
1377
+ },
1378
+ "deployment_builds_status": {
1379
+ "name": "deployment_builds_status",
1380
+ "columns": ["status"],
1381
+ "isUnique": false
1382
+ }
1383
+ },
1384
+ "foreignKeys": {
1385
+ "deployment_builds_target_id_deployment_targets_id_fk": {
1386
+ "name": "deployment_builds_target_id_deployment_targets_id_fk",
1387
+ "tableFrom": "deployment_builds",
1388
+ "tableTo": "deployment_targets",
1389
+ "columnsFrom": ["target_id"],
1390
+ "columnsTo": ["id"],
1391
+ "onDelete": "no action",
1392
+ "onUpdate": "no action"
1393
+ },
1394
+ "deployment_builds_project_id_projects_id_fk": {
1395
+ "name": "deployment_builds_project_id_projects_id_fk",
1396
+ "tableFrom": "deployment_builds",
1397
+ "tableTo": "projects",
1398
+ "columnsFrom": ["project_id"],
1399
+ "columnsTo": ["id"],
1400
+ "onDelete": "no action",
1401
+ "onUpdate": "no action"
1402
+ }
1403
+ },
1404
+ "compositePrimaryKeys": {},
1405
+ "uniqueConstraints": {},
1406
+ "checkConstraints": {
1407
+ "deployment_builds_status": {
1408
+ "name": "deployment_builds_status",
1409
+ "value": "\"deployment_builds\".\"status\" IN ('RUNNING', 'SUCCEEDED', 'FAILED', 'CANCELLED')"
1410
+ }
1411
+ }
1412
+ },
1413
+ "deployment_plans": {
1414
+ "name": "deployment_plans",
1415
+ "columns": {
1416
+ "id": {
1417
+ "name": "id",
1418
+ "type": "text",
1419
+ "primaryKey": true,
1420
+ "notNull": true,
1421
+ "autoincrement": false
1422
+ },
1423
+ "target_id": {
1424
+ "name": "target_id",
1425
+ "type": "text",
1426
+ "primaryKey": false,
1427
+ "notNull": true,
1428
+ "autoincrement": false
1429
+ },
1430
+ "project_id": {
1431
+ "name": "project_id",
1432
+ "type": "text",
1433
+ "primaryKey": false,
1434
+ "notNull": true,
1435
+ "autoincrement": false
1436
+ },
1437
+ "artifact_id": {
1438
+ "name": "artifact_id",
1439
+ "type": "text",
1440
+ "primaryKey": false,
1441
+ "notNull": true,
1442
+ "autoincrement": false
1443
+ },
1444
+ "previous_artifact_id": {
1445
+ "name": "previous_artifact_id",
1446
+ "type": "text",
1447
+ "primaryKey": false,
1448
+ "notNull": false,
1449
+ "autoincrement": false
1450
+ },
1451
+ "previous_version": {
1452
+ "name": "previous_version",
1453
+ "type": "text",
1454
+ "primaryKey": false,
1455
+ "notNull": false,
1456
+ "autoincrement": false
1457
+ },
1458
+ "version": {
1459
+ "name": "version",
1460
+ "type": "text",
1461
+ "primaryKey": false,
1462
+ "notNull": true,
1463
+ "autoincrement": false
1464
+ },
1465
+ "plan_json": {
1466
+ "name": "plan_json",
1467
+ "type": "text",
1468
+ "primaryKey": false,
1469
+ "notNull": true,
1470
+ "autoincrement": false
1471
+ },
1472
+ "plan_hash": {
1473
+ "name": "plan_hash",
1474
+ "type": "text",
1475
+ "primaryKey": false,
1476
+ "notNull": true,
1477
+ "autoincrement": false
1478
+ },
1479
+ "status": {
1480
+ "name": "status",
1481
+ "type": "text",
1482
+ "primaryKey": false,
1483
+ "notNull": true,
1484
+ "autoincrement": false
1485
+ },
1486
+ "expires_at": {
1487
+ "name": "expires_at",
1488
+ "type": "integer",
1489
+ "primaryKey": false,
1490
+ "notNull": true,
1491
+ "autoincrement": false
1492
+ },
1493
+ "request_key": {
1494
+ "name": "request_key",
1495
+ "type": "text",
1496
+ "primaryKey": false,
1497
+ "notNull": true,
1498
+ "autoincrement": false
1499
+ },
1500
+ "requested_by": {
1501
+ "name": "requested_by",
1502
+ "type": "text",
1503
+ "primaryKey": false,
1504
+ "notNull": true,
1505
+ "autoincrement": false
1506
+ },
1507
+ "created_at": {
1508
+ "name": "created_at",
1509
+ "type": "integer",
1510
+ "primaryKey": false,
1511
+ "notNull": true,
1512
+ "autoincrement": false
1513
+ }
1514
+ },
1515
+ "indexes": {
1516
+ "deployment_plans_request": {
1517
+ "name": "deployment_plans_request",
1518
+ "columns": ["request_key"],
1519
+ "isUnique": true
1520
+ },
1521
+ "deployment_plans_target_created": {
1522
+ "name": "deployment_plans_target_created",
1523
+ "columns": ["target_id", "created_at"],
1524
+ "isUnique": false
1525
+ },
1526
+ "deployment_plans_status_expires": {
1527
+ "name": "deployment_plans_status_expires",
1528
+ "columns": ["status", "expires_at"],
1529
+ "isUnique": false
1530
+ }
1531
+ },
1532
+ "foreignKeys": {
1533
+ "deployment_plans_target_id_deployment_targets_id_fk": {
1534
+ "name": "deployment_plans_target_id_deployment_targets_id_fk",
1535
+ "tableFrom": "deployment_plans",
1536
+ "tableTo": "deployment_targets",
1537
+ "columnsFrom": ["target_id"],
1538
+ "columnsTo": ["id"],
1539
+ "onDelete": "no action",
1540
+ "onUpdate": "no action"
1541
+ },
1542
+ "deployment_plans_project_id_projects_id_fk": {
1543
+ "name": "deployment_plans_project_id_projects_id_fk",
1544
+ "tableFrom": "deployment_plans",
1545
+ "tableTo": "projects",
1546
+ "columnsFrom": ["project_id"],
1547
+ "columnsTo": ["id"],
1548
+ "onDelete": "no action",
1549
+ "onUpdate": "no action"
1550
+ },
1551
+ "deployment_plans_artifact_id_deployment_artifacts_id_fk": {
1552
+ "name": "deployment_plans_artifact_id_deployment_artifacts_id_fk",
1553
+ "tableFrom": "deployment_plans",
1554
+ "tableTo": "deployment_artifacts",
1555
+ "columnsFrom": ["artifact_id"],
1556
+ "columnsTo": ["id"],
1557
+ "onDelete": "no action",
1558
+ "onUpdate": "no action"
1559
+ },
1560
+ "deployment_plans_previous_artifact_id_deployment_artifacts_id_fk": {
1561
+ "name": "deployment_plans_previous_artifact_id_deployment_artifacts_id_fk",
1562
+ "tableFrom": "deployment_plans",
1563
+ "tableTo": "deployment_artifacts",
1564
+ "columnsFrom": ["previous_artifact_id"],
1565
+ "columnsTo": ["id"],
1566
+ "onDelete": "no action",
1567
+ "onUpdate": "no action"
1568
+ }
1569
+ },
1570
+ "compositePrimaryKeys": {},
1571
+ "uniqueConstraints": {},
1572
+ "checkConstraints": {
1573
+ "deployment_plans_status": {
1574
+ "name": "deployment_plans_status",
1575
+ "value": "\"deployment_plans\".\"status\" IN ('READY', 'WAITING_APPROVAL', 'AUTHORIZED', 'APPLYING', 'HEALTH_CHECK', 'SUCCEEDED', 'FAILED', 'CANCELLED', 'EXPIRED', 'INVALIDATED', 'UNKNOWN')"
1576
+ },
1577
+ "deployment_plans_hash": {
1578
+ "name": "deployment_plans_hash",
1579
+ "value": "length(\"deployment_plans\".\"plan_hash\") = 64"
1580
+ },
1581
+ "deployment_plans_previous": {
1582
+ "name": "deployment_plans_previous",
1583
+ "value": "(\"deployment_plans\".\"previous_artifact_id\" IS NULL) = (\"deployment_plans\".\"previous_version\" IS NULL)"
1584
+ }
1585
+ }
1586
+ },
1587
+ "deployment_targets": {
1588
+ "name": "deployment_targets",
1589
+ "columns": {
1590
+ "id": {
1591
+ "name": "id",
1592
+ "type": "text",
1593
+ "primaryKey": true,
1594
+ "notNull": true,
1595
+ "autoincrement": false
1596
+ },
1597
+ "project_id": {
1598
+ "name": "project_id",
1599
+ "type": "text",
1600
+ "primaryKey": false,
1601
+ "notNull": true,
1602
+ "autoincrement": false
1603
+ },
1604
+ "name": {
1605
+ "name": "name",
1606
+ "type": "text",
1607
+ "primaryKey": false,
1608
+ "notNull": true,
1609
+ "autoincrement": false
1610
+ },
1611
+ "current_artifact_id": {
1612
+ "name": "current_artifact_id",
1613
+ "type": "text",
1614
+ "primaryKey": false,
1615
+ "notNull": false,
1616
+ "autoincrement": false
1617
+ },
1618
+ "current_version": {
1619
+ "name": "current_version",
1620
+ "type": "text",
1621
+ "primaryKey": false,
1622
+ "notNull": false,
1623
+ "autoincrement": false
1624
+ },
1625
+ "created_at": {
1626
+ "name": "created_at",
1627
+ "type": "integer",
1628
+ "primaryKey": false,
1629
+ "notNull": true,
1630
+ "autoincrement": false
1631
+ },
1632
+ "updated_at": {
1633
+ "name": "updated_at",
1634
+ "type": "integer",
1635
+ "primaryKey": false,
1636
+ "notNull": true,
1637
+ "autoincrement": false
1638
+ }
1639
+ },
1640
+ "indexes": {
1641
+ "deployment_targets_project_name": {
1642
+ "name": "deployment_targets_project_name",
1643
+ "columns": ["project_id", "name"],
1644
+ "isUnique": true
1645
+ },
1646
+ "deployment_targets_project_updated": {
1647
+ "name": "deployment_targets_project_updated",
1648
+ "columns": ["project_id", "updated_at"],
1649
+ "isUnique": false
1650
+ }
1651
+ },
1652
+ "foreignKeys": {
1653
+ "deployment_targets_project_id_projects_id_fk": {
1654
+ "name": "deployment_targets_project_id_projects_id_fk",
1655
+ "tableFrom": "deployment_targets",
1656
+ "tableTo": "projects",
1657
+ "columnsFrom": ["project_id"],
1658
+ "columnsTo": ["id"],
1659
+ "onDelete": "no action",
1660
+ "onUpdate": "no action"
1661
+ }
1662
+ },
1663
+ "compositePrimaryKeys": {},
1664
+ "uniqueConstraints": {},
1665
+ "checkConstraints": {
1666
+ "deployment_targets_current": {
1667
+ "name": "deployment_targets_current",
1668
+ "value": "(\"deployment_targets\".\"current_artifact_id\" IS NULL) = (\"deployment_targets\".\"current_version\" IS NULL)"
1669
+ }
1670
+ }
1671
+ },
1672
+ "device_requests": {
1673
+ "name": "device_requests",
1674
+ "columns": {
1675
+ "id": {
1676
+ "name": "id",
1677
+ "type": "text",
1678
+ "primaryKey": true,
1679
+ "notNull": true,
1680
+ "autoincrement": false
1681
+ },
1682
+ "short_code": {
1683
+ "name": "short_code",
1684
+ "type": "text",
1685
+ "primaryKey": false,
1686
+ "notNull": true,
1687
+ "autoincrement": false
1688
+ },
1689
+ "status": {
1690
+ "name": "status",
1691
+ "type": "text",
1692
+ "primaryKey": false,
1693
+ "notNull": true,
1694
+ "autoincrement": false
1695
+ },
1696
+ "decision": {
1697
+ "name": "decision",
1698
+ "type": "text",
1699
+ "primaryKey": false,
1700
+ "notNull": false,
1701
+ "autoincrement": false
1702
+ },
1703
+ "client_label": {
1704
+ "name": "client_label",
1705
+ "type": "text",
1706
+ "primaryKey": false,
1707
+ "notNull": false,
1708
+ "autoincrement": false
1709
+ },
1710
+ "user_agent": {
1711
+ "name": "user_agent",
1712
+ "type": "text",
1713
+ "primaryKey": false,
1714
+ "notNull": false,
1715
+ "autoincrement": false
1716
+ },
1717
+ "ip": {
1718
+ "name": "ip",
1719
+ "type": "text",
1720
+ "primaryKey": false,
1721
+ "notNull": false,
1722
+ "autoincrement": false
1723
+ },
1724
+ "client_origin": {
1725
+ "name": "client_origin",
1726
+ "type": "text",
1727
+ "primaryKey": false,
1728
+ "notNull": false,
1729
+ "autoincrement": false
1730
+ },
1731
+ "poll_token_hash": {
1732
+ "name": "poll_token_hash",
1733
+ "type": "text",
1734
+ "primaryKey": false,
1735
+ "notNull": true,
1736
+ "autoincrement": false
1737
+ },
1738
+ "code_hash": {
1739
+ "name": "code_hash",
1740
+ "type": "text",
1741
+ "primaryKey": false,
1742
+ "notNull": false,
1743
+ "autoincrement": false
1744
+ },
1745
+ "code_expires_at": {
1746
+ "name": "code_expires_at",
1747
+ "type": "integer",
1748
+ "primaryKey": false,
1749
+ "notNull": false,
1750
+ "autoincrement": false
1751
+ },
1752
+ "attempts": {
1753
+ "name": "attempts",
1754
+ "type": "integer",
1755
+ "primaryKey": false,
1756
+ "notNull": true,
1757
+ "autoincrement": false,
1758
+ "default": 0
1759
+ },
1760
+ "enrollment_token_hash": {
1761
+ "name": "enrollment_token_hash",
1762
+ "type": "text",
1763
+ "primaryKey": false,
1764
+ "notNull": false,
1765
+ "autoincrement": false
1766
+ },
1767
+ "enrollment_expires_at": {
1768
+ "name": "enrollment_expires_at",
1769
+ "type": "integer",
1770
+ "primaryKey": false,
1771
+ "notNull": false,
1772
+ "autoincrement": false
1773
+ },
1774
+ "created_at": {
1775
+ "name": "created_at",
1776
+ "type": "integer",
1777
+ "primaryKey": false,
1778
+ "notNull": true,
1779
+ "autoincrement": false
1780
+ },
1781
+ "expires_at": {
1782
+ "name": "expires_at",
1783
+ "type": "integer",
1784
+ "primaryKey": false,
1785
+ "notNull": true,
1786
+ "autoincrement": false
1787
+ },
1788
+ "decided_at": {
1789
+ "name": "decided_at",
1790
+ "type": "integer",
1791
+ "primaryKey": false,
1792
+ "notNull": false,
1793
+ "autoincrement": false
1794
+ },
1795
+ "redeemed_at": {
1796
+ "name": "redeemed_at",
1797
+ "type": "integer",
1798
+ "primaryKey": false,
1799
+ "notNull": false,
1800
+ "autoincrement": false
1801
+ }
1802
+ },
1803
+ "indexes": {
1804
+ "device_requests_short_code_unique": {
1805
+ "name": "device_requests_short_code_unique",
1806
+ "columns": ["short_code"],
1807
+ "isUnique": true
1808
+ },
1809
+ "idx_device_requests_status": {
1810
+ "name": "idx_device_requests_status",
1811
+ "columns": ["status", "expires_at"],
1812
+ "isUnique": false
1813
+ }
1814
+ },
1815
+ "foreignKeys": {},
1816
+ "compositePrimaryKeys": {},
1817
+ "uniqueConstraints": {},
1818
+ "checkConstraints": {}
1819
+ },
1820
+ "file_versions": {
1821
+ "name": "file_versions",
1822
+ "columns": {
1823
+ "scope_key": {
1824
+ "name": "scope_key",
1825
+ "type": "text",
1826
+ "primaryKey": false,
1827
+ "notNull": true,
1828
+ "autoincrement": false
1829
+ },
1830
+ "path": {
1831
+ "name": "path",
1832
+ "type": "text",
1833
+ "primaryKey": false,
1834
+ "notNull": true,
1835
+ "autoincrement": false
1836
+ },
1837
+ "real_path": {
1838
+ "name": "real_path",
1839
+ "type": "text",
1840
+ "primaryKey": false,
1841
+ "notNull": true,
1842
+ "autoincrement": false
1843
+ },
1844
+ "version_hash": {
1845
+ "name": "version_hash",
1846
+ "type": "text",
1847
+ "primaryKey": false,
1848
+ "notNull": true,
1849
+ "autoincrement": false
1850
+ },
1851
+ "size": {
1852
+ "name": "size",
1853
+ "type": "integer",
1854
+ "primaryKey": false,
1855
+ "notNull": true,
1856
+ "autoincrement": false
1857
+ },
1858
+ "mtime": {
1859
+ "name": "mtime",
1860
+ "type": "integer",
1861
+ "primaryKey": false,
1862
+ "notNull": true,
1863
+ "autoincrement": false
1864
+ },
1865
+ "updated_at": {
1866
+ "name": "updated_at",
1867
+ "type": "integer",
1868
+ "primaryKey": false,
1869
+ "notNull": true,
1870
+ "autoincrement": false
1871
+ }
1872
+ },
1873
+ "indexes": {
1874
+ "file_versions_scope_path": {
1875
+ "name": "file_versions_scope_path",
1876
+ "columns": ["scope_key", "path"],
1877
+ "isUnique": true
1878
+ }
1879
+ },
1880
+ "foreignKeys": {},
1881
+ "compositePrimaryKeys": {},
1882
+ "uniqueConstraints": {},
1883
+ "checkConstraints": {}
1884
+ },
1885
+ "model_catalog_cache": {
1886
+ "name": "model_catalog_cache",
1887
+ "columns": {
1888
+ "credential_profile_id": {
1889
+ "name": "credential_profile_id",
1890
+ "type": "text",
1891
+ "primaryKey": true,
1892
+ "notNull": true,
1893
+ "autoincrement": false
1894
+ },
1895
+ "provider": {
1896
+ "name": "provider",
1897
+ "type": "text",
1898
+ "primaryKey": false,
1899
+ "notNull": true,
1900
+ "autoincrement": false
1901
+ },
1902
+ "endpoint": {
1903
+ "name": "endpoint",
1904
+ "type": "text",
1905
+ "primaryKey": false,
1906
+ "notNull": true,
1907
+ "autoincrement": false
1908
+ },
1909
+ "models_json": {
1910
+ "name": "models_json",
1911
+ "type": "text",
1912
+ "primaryKey": false,
1913
+ "notNull": true,
1914
+ "autoincrement": false,
1915
+ "default": "'[]'"
1916
+ },
1917
+ "synced_at": {
1918
+ "name": "synced_at",
1919
+ "type": "integer",
1920
+ "primaryKey": false,
1921
+ "notNull": false,
1922
+ "autoincrement": false
1923
+ },
1924
+ "last_attempt_at": {
1925
+ "name": "last_attempt_at",
1926
+ "type": "integer",
1927
+ "primaryKey": false,
1928
+ "notNull": false,
1929
+ "autoincrement": false
1930
+ },
1931
+ "last_error_code": {
1932
+ "name": "last_error_code",
1933
+ "type": "text",
1934
+ "primaryKey": false,
1935
+ "notNull": false,
1936
+ "autoincrement": false
1937
+ }
1938
+ },
1939
+ "indexes": {},
1940
+ "foreignKeys": {
1941
+ "model_catalog_cache_credential_profile_id_credential_profiles_id_fk": {
1942
+ "name": "model_catalog_cache_credential_profile_id_credential_profiles_id_fk",
1943
+ "tableFrom": "model_catalog_cache",
1944
+ "tableTo": "credential_profiles",
1945
+ "columnsFrom": ["credential_profile_id"],
1946
+ "columnsTo": ["id"],
1947
+ "onDelete": "cascade",
1948
+ "onUpdate": "no action"
1949
+ }
1950
+ },
1951
+ "compositePrimaryKeys": {},
1952
+ "uniqueConstraints": {},
1953
+ "checkConstraints": {}
1954
+ },
1955
+ "model_profiles": {
1956
+ "name": "model_profiles",
1957
+ "columns": {
1958
+ "id": {
1959
+ "name": "id",
1960
+ "type": "text",
1961
+ "primaryKey": true,
1962
+ "notNull": true,
1963
+ "autoincrement": false
1964
+ },
1965
+ "label": {
1966
+ "name": "label",
1967
+ "type": "text",
1968
+ "primaryKey": false,
1969
+ "notNull": true,
1970
+ "autoincrement": false
1971
+ },
1972
+ "provider": {
1973
+ "name": "provider",
1974
+ "type": "text",
1975
+ "primaryKey": false,
1976
+ "notNull": true,
1977
+ "autoincrement": false
1978
+ },
1979
+ "model": {
1980
+ "name": "model",
1981
+ "type": "text",
1982
+ "primaryKey": false,
1983
+ "notNull": true,
1984
+ "autoincrement": false
1985
+ },
1986
+ "credential_profile_id": {
1987
+ "name": "credential_profile_id",
1988
+ "type": "text",
1989
+ "primaryKey": false,
1990
+ "notNull": false,
1991
+ "autoincrement": false
1992
+ },
1993
+ "endpoint": {
1994
+ "name": "endpoint",
1995
+ "type": "text",
1996
+ "primaryKey": false,
1997
+ "notNull": false,
1998
+ "autoincrement": false
1999
+ },
2000
+ "capabilities_json": {
2001
+ "name": "capabilities_json",
2002
+ "type": "text",
2003
+ "primaryKey": false,
2004
+ "notNull": true,
2005
+ "autoincrement": false,
2006
+ "default": "'{}'"
2007
+ },
2008
+ "created_at": {
2009
+ "name": "created_at",
2010
+ "type": "integer",
2011
+ "primaryKey": false,
2012
+ "notNull": true,
2013
+ "autoincrement": false
2014
+ }
2015
+ },
2016
+ "indexes": {
2017
+ "idx_model_profiles_provider": {
2018
+ "name": "idx_model_profiles_provider",
2019
+ "columns": ["provider"],
2020
+ "isUnique": false
2021
+ }
2022
+ },
2023
+ "foreignKeys": {
2024
+ "model_profiles_credential_profile_id_credential_profiles_id_fk": {
2025
+ "name": "model_profiles_credential_profile_id_credential_profiles_id_fk",
2026
+ "tableFrom": "model_profiles",
2027
+ "tableTo": "credential_profiles",
2028
+ "columnsFrom": ["credential_profile_id"],
2029
+ "columnsTo": ["id"],
2030
+ "onDelete": "set null",
2031
+ "onUpdate": "no action"
2032
+ }
2033
+ },
2034
+ "compositePrimaryKeys": {},
2035
+ "uniqueConstraints": {},
2036
+ "checkConstraints": {}
2037
+ },
2038
+ "projects": {
2039
+ "name": "projects",
2040
+ "columns": {
2041
+ "id": {
2042
+ "name": "id",
2043
+ "type": "text",
2044
+ "primaryKey": true,
2045
+ "notNull": true,
2046
+ "autoincrement": false
2047
+ },
2048
+ "name": {
2049
+ "name": "name",
2050
+ "type": "text",
2051
+ "primaryKey": false,
2052
+ "notNull": true,
2053
+ "autoincrement": false
2054
+ },
2055
+ "root_path": {
2056
+ "name": "root_path",
2057
+ "type": "text",
2058
+ "primaryKey": false,
2059
+ "notNull": true,
2060
+ "autoincrement": false
2061
+ },
2062
+ "real_path": {
2063
+ "name": "real_path",
2064
+ "type": "text",
2065
+ "primaryKey": false,
2066
+ "notNull": true,
2067
+ "autoincrement": false
2068
+ },
2069
+ "settings_json": {
2070
+ "name": "settings_json",
2071
+ "type": "text",
2072
+ "primaryKey": false,
2073
+ "notNull": true,
2074
+ "autoincrement": false,
2075
+ "default": "'{}'"
2076
+ },
2077
+ "git_detected": {
2078
+ "name": "git_detected",
2079
+ "type": "integer",
2080
+ "primaryKey": false,
2081
+ "notNull": true,
2082
+ "autoincrement": false,
2083
+ "default": false
2084
+ },
2085
+ "created_at": {
2086
+ "name": "created_at",
2087
+ "type": "integer",
2088
+ "primaryKey": false,
2089
+ "notNull": true,
2090
+ "autoincrement": false
2091
+ },
2092
+ "updated_at": {
2093
+ "name": "updated_at",
2094
+ "type": "integer",
2095
+ "primaryKey": false,
2096
+ "notNull": true,
2097
+ "autoincrement": false
2098
+ }
2099
+ },
2100
+ "indexes": {
2101
+ "projects_real_path_unique": {
2102
+ "name": "projects_real_path_unique",
2103
+ "columns": ["real_path"],
2104
+ "isUnique": true
2105
+ },
2106
+ "idx_projects_updated": {
2107
+ "name": "idx_projects_updated",
2108
+ "columns": ["updated_at"],
2109
+ "isUnique": false
2110
+ }
2111
+ },
2112
+ "foreignKeys": {},
2113
+ "compositePrimaryKeys": {},
2114
+ "uniqueConstraints": {},
2115
+ "checkConstraints": {}
2116
+ },
2117
+ "resource_actions": {
2118
+ "name": "resource_actions",
2119
+ "columns": {
2120
+ "id": {
2121
+ "name": "id",
2122
+ "type": "text",
2123
+ "primaryKey": true,
2124
+ "notNull": true,
2125
+ "autoincrement": false
2126
+ },
2127
+ "operation_id": {
2128
+ "name": "operation_id",
2129
+ "type": "text",
2130
+ "primaryKey": false,
2131
+ "notNull": true,
2132
+ "autoincrement": false
2133
+ },
2134
+ "project_id": {
2135
+ "name": "project_id",
2136
+ "type": "text",
2137
+ "primaryKey": false,
2138
+ "notNull": true,
2139
+ "autoincrement": false
2140
+ },
2141
+ "kind": {
2142
+ "name": "kind",
2143
+ "type": "text",
2144
+ "primaryKey": false,
2145
+ "notNull": true,
2146
+ "autoincrement": false
2147
+ },
2148
+ "risk": {
2149
+ "name": "risk",
2150
+ "type": "text",
2151
+ "primaryKey": false,
2152
+ "notNull": true,
2153
+ "autoincrement": false
2154
+ },
2155
+ "status": {
2156
+ "name": "status",
2157
+ "type": "text",
2158
+ "primaryKey": false,
2159
+ "notNull": true,
2160
+ "autoincrement": false
2161
+ },
2162
+ "params_json": {
2163
+ "name": "params_json",
2164
+ "type": "text",
2165
+ "primaryKey": false,
2166
+ "notNull": true,
2167
+ "autoincrement": false
2168
+ },
2169
+ "params_hash": {
2170
+ "name": "params_hash",
2171
+ "type": "text",
2172
+ "primaryKey": false,
2173
+ "notNull": true,
2174
+ "autoincrement": false
2175
+ },
2176
+ "snapshot_hash": {
2177
+ "name": "snapshot_hash",
2178
+ "type": "text",
2179
+ "primaryKey": false,
2180
+ "notNull": true,
2181
+ "autoincrement": false
2182
+ },
2183
+ "requested_by": {
2184
+ "name": "requested_by",
2185
+ "type": "text",
2186
+ "primaryKey": false,
2187
+ "notNull": true,
2188
+ "autoincrement": false
2189
+ },
2190
+ "decided_by": {
2191
+ "name": "decided_by",
2192
+ "type": "text",
2193
+ "primaryKey": false,
2194
+ "notNull": false,
2195
+ "autoincrement": false
2196
+ },
2197
+ "expires_at": {
2198
+ "name": "expires_at",
2199
+ "type": "integer",
2200
+ "primaryKey": false,
2201
+ "notNull": true,
2202
+ "autoincrement": false
2203
+ },
2204
+ "decided_at": {
2205
+ "name": "decided_at",
2206
+ "type": "integer",
2207
+ "primaryKey": false,
2208
+ "notNull": false,
2209
+ "autoincrement": false
2210
+ },
2211
+ "started_at": {
2212
+ "name": "started_at",
2213
+ "type": "integer",
2214
+ "primaryKey": false,
2215
+ "notNull": false,
2216
+ "autoincrement": false
2217
+ },
2218
+ "ended_at": {
2219
+ "name": "ended_at",
2220
+ "type": "integer",
2221
+ "primaryKey": false,
2222
+ "notNull": false,
2223
+ "autoincrement": false
2224
+ },
2225
+ "result_json": {
2226
+ "name": "result_json",
2227
+ "type": "text",
2228
+ "primaryKey": false,
2229
+ "notNull": false,
2230
+ "autoincrement": false
2231
+ },
2232
+ "created_at": {
2233
+ "name": "created_at",
2234
+ "type": "integer",
2235
+ "primaryKey": false,
2236
+ "notNull": true,
2237
+ "autoincrement": false
2238
+ }
2239
+ },
2240
+ "indexes": {
2241
+ "resource_actions_operation": {
2242
+ "name": "resource_actions_operation",
2243
+ "columns": ["operation_id"],
2244
+ "isUnique": true
2245
+ },
2246
+ "resource_actions_project_status": {
2247
+ "name": "resource_actions_project_status",
2248
+ "columns": ["project_id", "status"],
2249
+ "isUnique": false
2250
+ }
2251
+ },
2252
+ "foreignKeys": {
2253
+ "resource_actions_operation_id_resource_operations_id_fk": {
2254
+ "name": "resource_actions_operation_id_resource_operations_id_fk",
2255
+ "tableFrom": "resource_actions",
2256
+ "tableTo": "resource_operations",
2257
+ "columnsFrom": ["operation_id"],
2258
+ "columnsTo": ["id"],
2259
+ "onDelete": "no action",
2260
+ "onUpdate": "no action"
2261
+ },
2262
+ "resource_actions_project_id_projects_id_fk": {
2263
+ "name": "resource_actions_project_id_projects_id_fk",
2264
+ "tableFrom": "resource_actions",
2265
+ "tableTo": "projects",
2266
+ "columnsFrom": ["project_id"],
2267
+ "columnsTo": ["id"],
2268
+ "onDelete": "no action",
2269
+ "onUpdate": "no action"
2270
+ }
2271
+ },
2272
+ "compositePrimaryKeys": {},
2273
+ "uniqueConstraints": {},
2274
+ "checkConstraints": {}
2275
+ },
2276
+ "resource_events": {
2277
+ "name": "resource_events",
2278
+ "columns": {
2279
+ "id": {
2280
+ "name": "id",
2281
+ "type": "text",
2282
+ "primaryKey": true,
2283
+ "notNull": true,
2284
+ "autoincrement": false
2285
+ },
2286
+ "stream_id": {
2287
+ "name": "stream_id",
2288
+ "type": "text",
2289
+ "primaryKey": false,
2290
+ "notNull": true,
2291
+ "autoincrement": false
2292
+ },
2293
+ "seq": {
2294
+ "name": "seq",
2295
+ "type": "integer",
2296
+ "primaryKey": false,
2297
+ "notNull": true,
2298
+ "autoincrement": false
2299
+ },
2300
+ "type": {
2301
+ "name": "type",
2302
+ "type": "text",
2303
+ "primaryKey": false,
2304
+ "notNull": true,
2305
+ "autoincrement": false
2306
+ },
2307
+ "payload_json": {
2308
+ "name": "payload_json",
2309
+ "type": "text",
2310
+ "primaryKey": false,
2311
+ "notNull": true,
2312
+ "autoincrement": false
2313
+ },
2314
+ "created_at": {
2315
+ "name": "created_at",
2316
+ "type": "integer",
2317
+ "primaryKey": false,
2318
+ "notNull": true,
2319
+ "autoincrement": false
2320
+ }
2321
+ },
2322
+ "indexes": {
2323
+ "resource_events_stream_seq": {
2324
+ "name": "resource_events_stream_seq",
2325
+ "columns": ["stream_id", "seq"],
2326
+ "isUnique": true
2327
+ }
2328
+ },
2329
+ "foreignKeys": {
2330
+ "resource_events_stream_id_resource_streams_stream_id_fk": {
2331
+ "name": "resource_events_stream_id_resource_streams_stream_id_fk",
2332
+ "tableFrom": "resource_events",
2333
+ "tableTo": "resource_streams",
2334
+ "columnsFrom": ["stream_id"],
2335
+ "columnsTo": ["stream_id"],
2336
+ "onDelete": "no action",
2337
+ "onUpdate": "no action"
2338
+ }
2339
+ },
2340
+ "compositePrimaryKeys": {},
2341
+ "uniqueConstraints": {},
2342
+ "checkConstraints": {}
2343
+ },
2344
+ "resource_locks": {
2345
+ "name": "resource_locks",
2346
+ "columns": {
2347
+ "id": {
2348
+ "name": "id",
2349
+ "type": "text",
2350
+ "primaryKey": true,
2351
+ "notNull": true,
2352
+ "autoincrement": false
2353
+ },
2354
+ "resource_type": {
2355
+ "name": "resource_type",
2356
+ "type": "text",
2357
+ "primaryKey": false,
2358
+ "notNull": true,
2359
+ "autoincrement": false
2360
+ },
2361
+ "resource_id": {
2362
+ "name": "resource_id",
2363
+ "type": "text",
2364
+ "primaryKey": false,
2365
+ "notNull": true,
2366
+ "autoincrement": false
2367
+ },
2368
+ "root_real_path": {
2369
+ "name": "root_real_path",
2370
+ "type": "text",
2371
+ "primaryKey": false,
2372
+ "notNull": false,
2373
+ "autoincrement": false
2374
+ },
2375
+ "owner": {
2376
+ "name": "owner",
2377
+ "type": "text",
2378
+ "primaryKey": false,
2379
+ "notNull": true,
2380
+ "autoincrement": false
2381
+ },
2382
+ "execution_id": {
2383
+ "name": "execution_id",
2384
+ "type": "text",
2385
+ "primaryKey": false,
2386
+ "notNull": true,
2387
+ "autoincrement": false
2388
+ },
2389
+ "fencing_token": {
2390
+ "name": "fencing_token",
2391
+ "type": "integer",
2392
+ "primaryKey": false,
2393
+ "notNull": true,
2394
+ "autoincrement": false
2395
+ },
2396
+ "expires_at": {
2397
+ "name": "expires_at",
2398
+ "type": "integer",
2399
+ "primaryKey": false,
2400
+ "notNull": true,
2401
+ "autoincrement": false
2402
+ },
2403
+ "heartbeat_at": {
2404
+ "name": "heartbeat_at",
2405
+ "type": "integer",
2406
+ "primaryKey": false,
2407
+ "notNull": true,
2408
+ "autoincrement": false
2409
+ },
2410
+ "created_at": {
2411
+ "name": "created_at",
2412
+ "type": "integer",
2413
+ "primaryKey": false,
2414
+ "notNull": true,
2415
+ "autoincrement": false
2416
+ }
2417
+ },
2418
+ "indexes": {
2419
+ "resource_locks_resource_unique": {
2420
+ "name": "resource_locks_resource_unique",
2421
+ "columns": ["resource_type", "resource_id"],
2422
+ "isUnique": true
2423
+ },
2424
+ "idx_resource_locks_expiry": {
2425
+ "name": "idx_resource_locks_expiry",
2426
+ "columns": ["expires_at"],
2427
+ "isUnique": false
2428
+ }
2429
+ },
2430
+ "foreignKeys": {},
2431
+ "compositePrimaryKeys": {},
2432
+ "uniqueConstraints": {},
2433
+ "checkConstraints": {}
2434
+ },
2435
+ "resource_operations": {
2436
+ "name": "resource_operations",
2437
+ "columns": {
2438
+ "id": {
2439
+ "name": "id",
2440
+ "type": "text",
2441
+ "primaryKey": true,
2442
+ "notNull": true,
2443
+ "autoincrement": false
2444
+ },
2445
+ "scope_key": {
2446
+ "name": "scope_key",
2447
+ "type": "text",
2448
+ "primaryKey": false,
2449
+ "notNull": true,
2450
+ "autoincrement": false
2451
+ },
2452
+ "root_real_path": {
2453
+ "name": "root_real_path",
2454
+ "type": "text",
2455
+ "primaryKey": false,
2456
+ "notNull": true,
2457
+ "autoincrement": false
2458
+ },
2459
+ "kind": {
2460
+ "name": "kind",
2461
+ "type": "text",
2462
+ "primaryKey": false,
2463
+ "notNull": true,
2464
+ "autoincrement": false
2465
+ },
2466
+ "status": {
2467
+ "name": "status",
2468
+ "type": "text",
2469
+ "primaryKey": false,
2470
+ "notNull": true,
2471
+ "autoincrement": false
2472
+ },
2473
+ "params_hash": {
2474
+ "name": "params_hash",
2475
+ "type": "text",
2476
+ "primaryKey": false,
2477
+ "notNull": true,
2478
+ "autoincrement": false
2479
+ },
2480
+ "idempotency_key": {
2481
+ "name": "idempotency_key",
2482
+ "type": "text",
2483
+ "primaryKey": false,
2484
+ "notNull": true,
2485
+ "autoincrement": false
2486
+ },
2487
+ "client_session_id": {
2488
+ "name": "client_session_id",
2489
+ "type": "text",
2490
+ "primaryKey": false,
2491
+ "notNull": true,
2492
+ "autoincrement": false
2493
+ },
2494
+ "path": {
2495
+ "name": "path",
2496
+ "type": "text",
2497
+ "primaryKey": false,
2498
+ "notNull": true,
2499
+ "autoincrement": false
2500
+ },
2501
+ "expected_version": {
2502
+ "name": "expected_version",
2503
+ "type": "text",
2504
+ "primaryKey": false,
2505
+ "notNull": true,
2506
+ "autoincrement": false
2507
+ },
2508
+ "target_version": {
2509
+ "name": "target_version",
2510
+ "type": "text",
2511
+ "primaryKey": false,
2512
+ "notNull": true,
2513
+ "autoincrement": false
2514
+ },
2515
+ "lock_id": {
2516
+ "name": "lock_id",
2517
+ "type": "text",
2518
+ "primaryKey": false,
2519
+ "notNull": true,
2520
+ "autoincrement": false
2521
+ },
2522
+ "fencing_token": {
2523
+ "name": "fencing_token",
2524
+ "type": "integer",
2525
+ "primaryKey": false,
2526
+ "notNull": true,
2527
+ "autoincrement": false
2528
+ },
2529
+ "result_json": {
2530
+ "name": "result_json",
2531
+ "type": "text",
2532
+ "primaryKey": false,
2533
+ "notNull": false,
2534
+ "autoincrement": false
2535
+ },
2536
+ "error_code": {
2537
+ "name": "error_code",
2538
+ "type": "text",
2539
+ "primaryKey": false,
2540
+ "notNull": false,
2541
+ "autoincrement": false
2542
+ },
2543
+ "created_at": {
2544
+ "name": "created_at",
2545
+ "type": "integer",
2546
+ "primaryKey": false,
2547
+ "notNull": true,
2548
+ "autoincrement": false
2549
+ },
2550
+ "updated_at": {
2551
+ "name": "updated_at",
2552
+ "type": "integer",
2553
+ "primaryKey": false,
2554
+ "notNull": true,
2555
+ "autoincrement": false
2556
+ }
2557
+ },
2558
+ "indexes": {
2559
+ "resource_operations_client_kind_key": {
2560
+ "name": "resource_operations_client_kind_key",
2561
+ "columns": ["client_session_id", "kind", "idempotency_key"],
2562
+ "isUnique": true
2563
+ },
2564
+ "resource_operations_status": {
2565
+ "name": "resource_operations_status",
2566
+ "columns": ["status"],
2567
+ "isUnique": false
2568
+ }
2569
+ },
2570
+ "foreignKeys": {},
2571
+ "compositePrimaryKeys": {},
2572
+ "uniqueConstraints": {},
2573
+ "checkConstraints": {}
2574
+ },
2575
+ "resource_streams": {
2576
+ "name": "resource_streams",
2577
+ "columns": {
2578
+ "stream_id": {
2579
+ "name": "stream_id",
2580
+ "type": "text",
2581
+ "primaryKey": true,
2582
+ "notNull": true,
2583
+ "autoincrement": false
2584
+ },
2585
+ "last_seq": {
2586
+ "name": "last_seq",
2587
+ "type": "integer",
2588
+ "primaryKey": false,
2589
+ "notNull": true,
2590
+ "autoincrement": false,
2591
+ "default": 0
2592
+ }
2593
+ },
2594
+ "indexes": {},
2595
+ "foreignKeys": {},
2596
+ "compositePrimaryKeys": {},
2597
+ "uniqueConstraints": {},
2598
+ "checkConstraints": {}
2599
+ },
2600
+ "secrets": {
2601
+ "name": "secrets",
2602
+ "columns": {
2603
+ "id": {
2604
+ "name": "id",
2605
+ "type": "text",
2606
+ "primaryKey": true,
2607
+ "notNull": true,
2608
+ "autoincrement": false
2609
+ },
2610
+ "ciphertext": {
2611
+ "name": "ciphertext",
2612
+ "type": "text",
2613
+ "primaryKey": false,
2614
+ "notNull": true,
2615
+ "autoincrement": false
2616
+ },
2617
+ "nonce": {
2618
+ "name": "nonce",
2619
+ "type": "text",
2620
+ "primaryKey": false,
2621
+ "notNull": true,
2622
+ "autoincrement": false
2623
+ },
2624
+ "tag": {
2625
+ "name": "tag",
2626
+ "type": "text",
2627
+ "primaryKey": false,
2628
+ "notNull": true,
2629
+ "autoincrement": false
2630
+ },
2631
+ "created_at": {
2632
+ "name": "created_at",
2633
+ "type": "integer",
2634
+ "primaryKey": false,
2635
+ "notNull": true,
2636
+ "autoincrement": false
2637
+ }
2638
+ },
2639
+ "indexes": {},
2640
+ "foreignKeys": {},
2641
+ "compositePrimaryKeys": {},
2642
+ "uniqueConstraints": {},
2643
+ "checkConstraints": {}
2644
+ },
2645
+ "service_action_authorizations": {
2646
+ "name": "service_action_authorizations",
2647
+ "columns": {
2648
+ "id": {
2649
+ "name": "id",
2650
+ "type": "text",
2651
+ "primaryKey": true,
2652
+ "notNull": true,
2653
+ "autoincrement": false
2654
+ },
2655
+ "target_id": {
2656
+ "name": "target_id",
2657
+ "type": "text",
2658
+ "primaryKey": false,
2659
+ "notNull": true,
2660
+ "autoincrement": false
2661
+ },
2662
+ "project_id": {
2663
+ "name": "project_id",
2664
+ "type": "text",
2665
+ "primaryKey": false,
2666
+ "notNull": true,
2667
+ "autoincrement": false
2668
+ },
2669
+ "action": {
2670
+ "name": "action",
2671
+ "type": "text",
2672
+ "primaryKey": false,
2673
+ "notNull": true,
2674
+ "autoincrement": false
2675
+ },
2676
+ "actor_type": {
2677
+ "name": "actor_type",
2678
+ "type": "text",
2679
+ "primaryKey": false,
2680
+ "notNull": true,
2681
+ "autoincrement": false
2682
+ },
2683
+ "actor_id": {
2684
+ "name": "actor_id",
2685
+ "type": "text",
2686
+ "primaryKey": false,
2687
+ "notNull": true,
2688
+ "autoincrement": false
2689
+ },
2690
+ "client_session_id": {
2691
+ "name": "client_session_id",
2692
+ "type": "text",
2693
+ "primaryKey": false,
2694
+ "notNull": false,
2695
+ "autoincrement": false
2696
+ },
2697
+ "session_id": {
2698
+ "name": "session_id",
2699
+ "type": "text",
2700
+ "primaryKey": false,
2701
+ "notNull": false,
2702
+ "autoincrement": false
2703
+ },
2704
+ "turn_id": {
2705
+ "name": "turn_id",
2706
+ "type": "text",
2707
+ "primaryKey": false,
2708
+ "notNull": false,
2709
+ "autoincrement": false
2710
+ },
2711
+ "policy": {
2712
+ "name": "policy",
2713
+ "type": "text",
2714
+ "primaryKey": false,
2715
+ "notNull": true,
2716
+ "autoincrement": false
2717
+ },
2718
+ "policy_snapshot_id": {
2719
+ "name": "policy_snapshot_id",
2720
+ "type": "text",
2721
+ "primaryKey": false,
2722
+ "notNull": true,
2723
+ "autoincrement": false
2724
+ },
2725
+ "status": {
2726
+ "name": "status",
2727
+ "type": "text",
2728
+ "primaryKey": false,
2729
+ "notNull": true,
2730
+ "autoincrement": false
2731
+ },
2732
+ "artifact_hash": {
2733
+ "name": "artifact_hash",
2734
+ "type": "text",
2735
+ "primaryKey": false,
2736
+ "notNull": true,
2737
+ "autoincrement": false
2738
+ },
2739
+ "version": {
2740
+ "name": "version",
2741
+ "type": "text",
2742
+ "primaryKey": false,
2743
+ "notNull": true,
2744
+ "autoincrement": false
2745
+ },
2746
+ "scope_json": {
2747
+ "name": "scope_json",
2748
+ "type": "text",
2749
+ "primaryKey": false,
2750
+ "notNull": true,
2751
+ "autoincrement": false
2752
+ },
2753
+ "scope_hash": {
2754
+ "name": "scope_hash",
2755
+ "type": "text",
2756
+ "primaryKey": false,
2757
+ "notNull": true,
2758
+ "autoincrement": false
2759
+ },
2760
+ "request_key": {
2761
+ "name": "request_key",
2762
+ "type": "text",
2763
+ "primaryKey": false,
2764
+ "notNull": true,
2765
+ "autoincrement": false
2766
+ },
2767
+ "expires_at": {
2768
+ "name": "expires_at",
2769
+ "type": "integer",
2770
+ "primaryKey": false,
2771
+ "notNull": true,
2772
+ "autoincrement": false
2773
+ },
2774
+ "decided_at": {
2775
+ "name": "decided_at",
2776
+ "type": "integer",
2777
+ "primaryKey": false,
2778
+ "notNull": false,
2779
+ "autoincrement": false
2780
+ },
2781
+ "decided_by": {
2782
+ "name": "decided_by",
2783
+ "type": "text",
2784
+ "primaryKey": false,
2785
+ "notNull": false,
2786
+ "autoincrement": false
2787
+ },
2788
+ "consumed_at": {
2789
+ "name": "consumed_at",
2790
+ "type": "integer",
2791
+ "primaryKey": false,
2792
+ "notNull": false,
2793
+ "autoincrement": false
2794
+ },
2795
+ "consume_key": {
2796
+ "name": "consume_key",
2797
+ "type": "text",
2798
+ "primaryKey": false,
2799
+ "notNull": false,
2800
+ "autoincrement": false
2801
+ },
2802
+ "reason_code": {
2803
+ "name": "reason_code",
2804
+ "type": "text",
2805
+ "primaryKey": false,
2806
+ "notNull": false,
2807
+ "autoincrement": false
2808
+ },
2809
+ "created_at": {
2810
+ "name": "created_at",
2811
+ "type": "integer",
2812
+ "primaryKey": false,
2813
+ "notNull": true,
2814
+ "autoincrement": false
2815
+ }
2816
+ },
2817
+ "indexes": {
2818
+ "service_action_authorizations_request": {
2819
+ "name": "service_action_authorizations_request",
2820
+ "columns": ["request_key"],
2821
+ "isUnique": true
2822
+ },
2823
+ "service_action_authorizations_target_status": {
2824
+ "name": "service_action_authorizations_target_status",
2825
+ "columns": ["target_id", "status"],
2826
+ "isUnique": false
2827
+ },
2828
+ "service_action_authorizations_status_expires": {
2829
+ "name": "service_action_authorizations_status_expires",
2830
+ "columns": ["status", "expires_at"],
2831
+ "isUnique": false
2832
+ }
2833
+ },
2834
+ "foreignKeys": {
2835
+ "service_action_authorizations_target_id_deployment_targets_id_fk": {
2836
+ "name": "service_action_authorizations_target_id_deployment_targets_id_fk",
2837
+ "tableFrom": "service_action_authorizations",
2838
+ "tableTo": "deployment_targets",
2839
+ "columnsFrom": ["target_id"],
2840
+ "columnsTo": ["id"],
2841
+ "onDelete": "no action",
2842
+ "onUpdate": "no action"
2843
+ },
2844
+ "service_action_authorizations_project_id_projects_id_fk": {
2845
+ "name": "service_action_authorizations_project_id_projects_id_fk",
2846
+ "tableFrom": "service_action_authorizations",
2847
+ "tableTo": "projects",
2848
+ "columnsFrom": ["project_id"],
2849
+ "columnsTo": ["id"],
2850
+ "onDelete": "no action",
2851
+ "onUpdate": "no action"
2852
+ }
2853
+ },
2854
+ "compositePrimaryKeys": {},
2855
+ "uniqueConstraints": {},
2856
+ "checkConstraints": {
2857
+ "service_action_authorizations_action": {
2858
+ "name": "service_action_authorizations_action",
2859
+ "value": "\"service_action_authorizations\".\"action\" IN ('start', 'stop', 'restart', 'recover')"
2860
+ },
2861
+ "service_action_authorizations_status": {
2862
+ "name": "service_action_authorizations_status",
2863
+ "value": "\"service_action_authorizations\".\"status\" IN ('PENDING', 'AUTHORIZED', 'DENIED', 'EXPIRED', 'REVOKED', 'CONSUMED')"
2864
+ },
2865
+ "service_action_authorizations_artifact_hash": {
2866
+ "name": "service_action_authorizations_artifact_hash",
2867
+ "value": "length(\"service_action_authorizations\".\"artifact_hash\") = 64"
2868
+ },
2869
+ "service_action_authorizations_scope_hash": {
2870
+ "name": "service_action_authorizations_scope_hash",
2871
+ "value": "length(\"service_action_authorizations\".\"scope_hash\") = 64"
2872
+ }
2873
+ }
2874
+ },
2875
+ "service_ops_deployments": {
2876
+ "name": "service_ops_deployments",
2877
+ "columns": {
2878
+ "id": {
2879
+ "name": "id",
2880
+ "type": "text",
2881
+ "primaryKey": true,
2882
+ "notNull": true,
2883
+ "autoincrement": false
2884
+ },
2885
+ "target_id": {
2886
+ "name": "target_id",
2887
+ "type": "text",
2888
+ "primaryKey": false,
2889
+ "notNull": true,
2890
+ "autoincrement": false
2891
+ },
2892
+ "project_id": {
2893
+ "name": "project_id",
2894
+ "type": "text",
2895
+ "primaryKey": false,
2896
+ "notNull": true,
2897
+ "autoincrement": false
2898
+ },
2899
+ "plan_id": {
2900
+ "name": "plan_id",
2901
+ "type": "text",
2902
+ "primaryKey": false,
2903
+ "notNull": true,
2904
+ "autoincrement": false
2905
+ },
2906
+ "authorization_id": {
2907
+ "name": "authorization_id",
2908
+ "type": "text",
2909
+ "primaryKey": false,
2910
+ "notNull": true,
2911
+ "autoincrement": false
2912
+ },
2913
+ "artifact_id": {
2914
+ "name": "artifact_id",
2915
+ "type": "text",
2916
+ "primaryKey": false,
2917
+ "notNull": true,
2918
+ "autoincrement": false
2919
+ },
2920
+ "previous_artifact_id": {
2921
+ "name": "previous_artifact_id",
2922
+ "type": "text",
2923
+ "primaryKey": false,
2924
+ "notNull": false,
2925
+ "autoincrement": false
2926
+ },
2927
+ "previous_version": {
2928
+ "name": "previous_version",
2929
+ "type": "text",
2930
+ "primaryKey": false,
2931
+ "notNull": false,
2932
+ "autoincrement": false
2933
+ },
2934
+ "version": {
2935
+ "name": "version",
2936
+ "type": "text",
2937
+ "primaryKey": false,
2938
+ "notNull": true,
2939
+ "autoincrement": false
2940
+ },
2941
+ "status": {
2942
+ "name": "status",
2943
+ "type": "text",
2944
+ "primaryKey": false,
2945
+ "notNull": true,
2946
+ "autoincrement": false
2947
+ },
2948
+ "plan_hash": {
2949
+ "name": "plan_hash",
2950
+ "type": "text",
2951
+ "primaryKey": false,
2952
+ "notNull": true,
2953
+ "autoincrement": false
2954
+ },
2955
+ "artifact_hash": {
2956
+ "name": "artifact_hash",
2957
+ "type": "text",
2958
+ "primaryKey": false,
2959
+ "notNull": true,
2960
+ "autoincrement": false
2961
+ },
2962
+ "actor_type": {
2963
+ "name": "actor_type",
2964
+ "type": "text",
2965
+ "primaryKey": false,
2966
+ "notNull": true,
2967
+ "autoincrement": false
2968
+ },
2969
+ "actor_id": {
2970
+ "name": "actor_id",
2971
+ "type": "text",
2972
+ "primaryKey": false,
2973
+ "notNull": true,
2974
+ "autoincrement": false
2975
+ },
2976
+ "policy": {
2977
+ "name": "policy",
2978
+ "type": "text",
2979
+ "primaryKey": false,
2980
+ "notNull": true,
2981
+ "autoincrement": false
2982
+ },
2983
+ "policy_snapshot_id": {
2984
+ "name": "policy_snapshot_id",
2985
+ "type": "text",
2986
+ "primaryKey": false,
2987
+ "notNull": true,
2988
+ "autoincrement": false
2989
+ },
2990
+ "reason_code": {
2991
+ "name": "reason_code",
2992
+ "type": "text",
2993
+ "primaryKey": false,
2994
+ "notNull": false,
2995
+ "autoincrement": false
2996
+ },
2997
+ "health_json": {
2998
+ "name": "health_json",
2999
+ "type": "text",
3000
+ "primaryKey": false,
3001
+ "notNull": false,
3002
+ "autoincrement": false
3003
+ },
3004
+ "result_json": {
3005
+ "name": "result_json",
3006
+ "type": "text",
3007
+ "primaryKey": false,
3008
+ "notNull": false,
3009
+ "autoincrement": false
3010
+ },
3011
+ "started_at": {
3012
+ "name": "started_at",
3013
+ "type": "integer",
3014
+ "primaryKey": false,
3015
+ "notNull": true,
3016
+ "autoincrement": false
3017
+ },
3018
+ "ended_at": {
3019
+ "name": "ended_at",
3020
+ "type": "integer",
3021
+ "primaryKey": false,
3022
+ "notNull": false,
3023
+ "autoincrement": false
3024
+ },
3025
+ "created_at": {
3026
+ "name": "created_at",
3027
+ "type": "integer",
3028
+ "primaryKey": false,
3029
+ "notNull": true,
3030
+ "autoincrement": false
3031
+ }
3032
+ },
3033
+ "indexes": {
3034
+ "service_ops_deployments_plan": {
3035
+ "name": "service_ops_deployments_plan",
3036
+ "columns": ["plan_id"],
3037
+ "isUnique": true
3038
+ },
3039
+ "service_ops_deployments_authorization": {
3040
+ "name": "service_ops_deployments_authorization",
3041
+ "columns": ["authorization_id"],
3042
+ "isUnique": true
3043
+ },
3044
+ "service_ops_deployments_target_created": {
3045
+ "name": "service_ops_deployments_target_created",
3046
+ "columns": ["target_id", "created_at"],
3047
+ "isUnique": false
3048
+ },
3049
+ "service_ops_deployments_status": {
3050
+ "name": "service_ops_deployments_status",
3051
+ "columns": ["status"],
3052
+ "isUnique": false
3053
+ }
3054
+ },
3055
+ "foreignKeys": {
3056
+ "service_ops_deployments_target_id_deployment_targets_id_fk": {
3057
+ "name": "service_ops_deployments_target_id_deployment_targets_id_fk",
3058
+ "tableFrom": "service_ops_deployments",
3059
+ "tableTo": "deployment_targets",
3060
+ "columnsFrom": ["target_id"],
3061
+ "columnsTo": ["id"],
3062
+ "onDelete": "no action",
3063
+ "onUpdate": "no action"
3064
+ },
3065
+ "service_ops_deployments_project_id_projects_id_fk": {
3066
+ "name": "service_ops_deployments_project_id_projects_id_fk",
3067
+ "tableFrom": "service_ops_deployments",
3068
+ "tableTo": "projects",
3069
+ "columnsFrom": ["project_id"],
3070
+ "columnsTo": ["id"],
3071
+ "onDelete": "no action",
3072
+ "onUpdate": "no action"
3073
+ },
3074
+ "service_ops_deployments_plan_id_deployment_plans_id_fk": {
3075
+ "name": "service_ops_deployments_plan_id_deployment_plans_id_fk",
3076
+ "tableFrom": "service_ops_deployments",
3077
+ "tableTo": "deployment_plans",
3078
+ "columnsFrom": ["plan_id"],
3079
+ "columnsTo": ["id"],
3080
+ "onDelete": "no action",
3081
+ "onUpdate": "no action"
3082
+ },
3083
+ "service_ops_deployments_authorization_id_deployment_authorizations_id_fk": {
3084
+ "name": "service_ops_deployments_authorization_id_deployment_authorizations_id_fk",
3085
+ "tableFrom": "service_ops_deployments",
3086
+ "tableTo": "deployment_authorizations",
3087
+ "columnsFrom": ["authorization_id"],
3088
+ "columnsTo": ["id"],
3089
+ "onDelete": "no action",
3090
+ "onUpdate": "no action"
3091
+ },
3092
+ "service_ops_deployments_artifact_id_deployment_artifacts_id_fk": {
3093
+ "name": "service_ops_deployments_artifact_id_deployment_artifacts_id_fk",
3094
+ "tableFrom": "service_ops_deployments",
3095
+ "tableTo": "deployment_artifacts",
3096
+ "columnsFrom": ["artifact_id"],
3097
+ "columnsTo": ["id"],
3098
+ "onDelete": "no action",
3099
+ "onUpdate": "no action"
3100
+ },
3101
+ "service_ops_deployments_previous_artifact_id_deployment_artifacts_id_fk": {
3102
+ "name": "service_ops_deployments_previous_artifact_id_deployment_artifacts_id_fk",
3103
+ "tableFrom": "service_ops_deployments",
3104
+ "tableTo": "deployment_artifacts",
3105
+ "columnsFrom": ["previous_artifact_id"],
3106
+ "columnsTo": ["id"],
3107
+ "onDelete": "no action",
3108
+ "onUpdate": "no action"
3109
+ }
3110
+ },
3111
+ "compositePrimaryKeys": {},
3112
+ "uniqueConstraints": {},
3113
+ "checkConstraints": {
3114
+ "service_ops_deployments_status": {
3115
+ "name": "service_ops_deployments_status",
3116
+ "value": "\"service_ops_deployments\".\"status\" IN ('APPLYING', 'HEALTH_CHECK', 'SUCCEEDED', 'FAILED', 'UNKNOWN')"
3117
+ },
3118
+ "service_ops_deployments_plan_hash": {
3119
+ "name": "service_ops_deployments_plan_hash",
3120
+ "value": "length(\"service_ops_deployments\".\"plan_hash\") = 64"
3121
+ },
3122
+ "service_ops_deployments_artifact_hash": {
3123
+ "name": "service_ops_deployments_artifact_hash",
3124
+ "value": "length(\"service_ops_deployments\".\"artifact_hash\") = 64"
3125
+ },
3126
+ "service_ops_deployments_previous": {
3127
+ "name": "service_ops_deployments_previous",
3128
+ "value": "(\"service_ops_deployments\".\"previous_artifact_id\" IS NULL) = (\"service_ops_deployments\".\"previous_version\" IS NULL)"
3129
+ }
3130
+ }
3131
+ },
3132
+ "service_ops_services": {
3133
+ "name": "service_ops_services",
3134
+ "columns": {
3135
+ "target_id": {
3136
+ "name": "target_id",
3137
+ "type": "text",
3138
+ "primaryKey": true,
3139
+ "notNull": true,
3140
+ "autoincrement": false
3141
+ },
3142
+ "project_id": {
3143
+ "name": "project_id",
3144
+ "type": "text",
3145
+ "primaryKey": false,
3146
+ "notNull": true,
3147
+ "autoincrement": false
3148
+ },
3149
+ "name": {
3150
+ "name": "name",
3151
+ "type": "text",
3152
+ "primaryKey": false,
3153
+ "notNull": true,
3154
+ "autoincrement": false
3155
+ },
3156
+ "namespace": {
3157
+ "name": "namespace",
3158
+ "type": "text",
3159
+ "primaryKey": false,
3160
+ "notNull": true,
3161
+ "autoincrement": false
3162
+ },
3163
+ "pm2_name": {
3164
+ "name": "pm2_name",
3165
+ "type": "text",
3166
+ "primaryKey": false,
3167
+ "notNull": true,
3168
+ "autoincrement": false
3169
+ },
3170
+ "desired_state": {
3171
+ "name": "desired_state",
3172
+ "type": "text",
3173
+ "primaryKey": false,
3174
+ "notNull": true,
3175
+ "autoincrement": false
3176
+ },
3177
+ "observed_state": {
3178
+ "name": "observed_state",
3179
+ "type": "text",
3180
+ "primaryKey": false,
3181
+ "notNull": true,
3182
+ "autoincrement": false
3183
+ },
3184
+ "current_artifact_id": {
3185
+ "name": "current_artifact_id",
3186
+ "type": "text",
3187
+ "primaryKey": false,
3188
+ "notNull": false,
3189
+ "autoincrement": false
3190
+ },
3191
+ "current_version": {
3192
+ "name": "current_version",
3193
+ "type": "text",
3194
+ "primaryKey": false,
3195
+ "notNull": false,
3196
+ "autoincrement": false
3197
+ },
3198
+ "config_json": {
3199
+ "name": "config_json",
3200
+ "type": "text",
3201
+ "primaryKey": false,
3202
+ "notNull": true,
3203
+ "autoincrement": false
3204
+ },
3205
+ "pid": {
3206
+ "name": "pid",
3207
+ "type": "integer",
3208
+ "primaryKey": false,
3209
+ "notNull": false,
3210
+ "autoincrement": false
3211
+ },
3212
+ "last_health_at": {
3213
+ "name": "last_health_at",
3214
+ "type": "integer",
3215
+ "primaryKey": false,
3216
+ "notNull": false,
3217
+ "autoincrement": false
3218
+ },
3219
+ "reason_code": {
3220
+ "name": "reason_code",
3221
+ "type": "text",
3222
+ "primaryKey": false,
3223
+ "notNull": false,
3224
+ "autoincrement": false
3225
+ },
3226
+ "created_at": {
3227
+ "name": "created_at",
3228
+ "type": "integer",
3229
+ "primaryKey": false,
3230
+ "notNull": true,
3231
+ "autoincrement": false
3232
+ },
3233
+ "updated_at": {
3234
+ "name": "updated_at",
3235
+ "type": "integer",
3236
+ "primaryKey": false,
3237
+ "notNull": true,
3238
+ "autoincrement": false
3239
+ }
3240
+ },
3241
+ "indexes": {
3242
+ "service_ops_services_pm2_name_unique": {
3243
+ "name": "service_ops_services_pm2_name_unique",
3244
+ "columns": ["pm2_name"],
3245
+ "isUnique": true
3246
+ },
3247
+ "service_ops_services_project": {
3248
+ "name": "service_ops_services_project",
3249
+ "columns": ["project_id", "updated_at"],
3250
+ "isUnique": false
3251
+ }
3252
+ },
3253
+ "foreignKeys": {
3254
+ "service_ops_services_target_id_deployment_targets_id_fk": {
3255
+ "name": "service_ops_services_target_id_deployment_targets_id_fk",
3256
+ "tableFrom": "service_ops_services",
3257
+ "tableTo": "deployment_targets",
3258
+ "columnsFrom": ["target_id"],
3259
+ "columnsTo": ["id"],
3260
+ "onDelete": "no action",
3261
+ "onUpdate": "no action"
3262
+ },
3263
+ "service_ops_services_project_id_projects_id_fk": {
3264
+ "name": "service_ops_services_project_id_projects_id_fk",
3265
+ "tableFrom": "service_ops_services",
3266
+ "tableTo": "projects",
3267
+ "columnsFrom": ["project_id"],
3268
+ "columnsTo": ["id"],
3269
+ "onDelete": "no action",
3270
+ "onUpdate": "no action"
3271
+ },
3272
+ "service_ops_services_current_artifact_id_deployment_artifacts_id_fk": {
3273
+ "name": "service_ops_services_current_artifact_id_deployment_artifacts_id_fk",
3274
+ "tableFrom": "service_ops_services",
3275
+ "tableTo": "deployment_artifacts",
3276
+ "columnsFrom": ["current_artifact_id"],
3277
+ "columnsTo": ["id"],
3278
+ "onDelete": "no action",
3279
+ "onUpdate": "no action"
3280
+ }
3281
+ },
3282
+ "compositePrimaryKeys": {},
3283
+ "uniqueConstraints": {},
3284
+ "checkConstraints": {
3285
+ "service_ops_services_desired": {
3286
+ "name": "service_ops_services_desired",
3287
+ "value": "\"service_ops_services\".\"desired_state\" IN ('running', 'stopped')"
3288
+ },
3289
+ "service_ops_services_observed": {
3290
+ "name": "service_ops_services_observed",
3291
+ "value": "\"service_ops_services\".\"observed_state\" IN ('stopped', 'starting', 'running', 'unhealthy', 'stopping', 'failed', 'unknown')"
3292
+ }
3293
+ }
3294
+ },
3295
+ "services": {
3296
+ "name": "services",
3297
+ "columns": {
3298
+ "id": {
3299
+ "name": "id",
3300
+ "type": "text",
3301
+ "primaryKey": true,
3302
+ "notNull": true,
3303
+ "autoincrement": false
3304
+ },
3305
+ "operation_id": {
3306
+ "name": "operation_id",
3307
+ "type": "text",
3308
+ "primaryKey": false,
3309
+ "notNull": true,
3310
+ "autoincrement": false
3311
+ },
3312
+ "project_id": {
3313
+ "name": "project_id",
3314
+ "type": "text",
3315
+ "primaryKey": false,
3316
+ "notNull": true,
3317
+ "autoincrement": false
3318
+ },
3319
+ "source_session_id": {
3320
+ "name": "source_session_id",
3321
+ "type": "text",
3322
+ "primaryKey": false,
3323
+ "notNull": false,
3324
+ "autoincrement": false
3325
+ },
3326
+ "terminal_id": {
3327
+ "name": "terminal_id",
3328
+ "type": "text",
3329
+ "primaryKey": false,
3330
+ "notNull": true,
3331
+ "autoincrement": false
3332
+ },
3333
+ "name": {
3334
+ "name": "name",
3335
+ "type": "text",
3336
+ "primaryKey": false,
3337
+ "notNull": true,
3338
+ "autoincrement": false
3339
+ },
3340
+ "kind": {
3341
+ "name": "kind",
3342
+ "type": "text",
3343
+ "primaryKey": false,
3344
+ "notNull": true,
3345
+ "autoincrement": false
3346
+ },
3347
+ "status": {
3348
+ "name": "status",
3349
+ "type": "text",
3350
+ "primaryKey": false,
3351
+ "notNull": true,
3352
+ "autoincrement": false
3353
+ },
3354
+ "terminal_execution_id": {
3355
+ "name": "terminal_execution_id",
3356
+ "type": "text",
3357
+ "primaryKey": false,
3358
+ "notNull": true,
3359
+ "autoincrement": false
3360
+ },
3361
+ "endpoint_generation": {
3362
+ "name": "endpoint_generation",
3363
+ "type": "integer",
3364
+ "primaryKey": false,
3365
+ "notNull": true,
3366
+ "autoincrement": false
3367
+ },
3368
+ "endpoint_host": {
3369
+ "name": "endpoint_host",
3370
+ "type": "text",
3371
+ "primaryKey": false,
3372
+ "notNull": true,
3373
+ "autoincrement": false
3374
+ },
3375
+ "endpoint_port": {
3376
+ "name": "endpoint_port",
3377
+ "type": "integer",
3378
+ "primaryKey": false,
3379
+ "notNull": true,
3380
+ "autoincrement": false
3381
+ },
3382
+ "endpoint_protocol": {
3383
+ "name": "endpoint_protocol",
3384
+ "type": "text",
3385
+ "primaryKey": false,
3386
+ "notNull": true,
3387
+ "autoincrement": false
3388
+ },
3389
+ "identity_json": {
3390
+ "name": "identity_json",
3391
+ "type": "text",
3392
+ "primaryKey": false,
3393
+ "notNull": true,
3394
+ "autoincrement": false
3395
+ },
3396
+ "reason_code": {
3397
+ "name": "reason_code",
3398
+ "type": "text",
3399
+ "primaryKey": false,
3400
+ "notNull": false,
3401
+ "autoincrement": false
3402
+ },
3403
+ "created_at": {
3404
+ "name": "created_at",
3405
+ "type": "integer",
3406
+ "primaryKey": false,
3407
+ "notNull": true,
3408
+ "autoincrement": false
3409
+ },
3410
+ "updated_at": {
3411
+ "name": "updated_at",
3412
+ "type": "integer",
3413
+ "primaryKey": false,
3414
+ "notNull": true,
3415
+ "autoincrement": false
3416
+ },
3417
+ "ended_at": {
3418
+ "name": "ended_at",
3419
+ "type": "integer",
3420
+ "primaryKey": false,
3421
+ "notNull": false,
3422
+ "autoincrement": false
3423
+ }
3424
+ },
3425
+ "indexes": {
3426
+ "services_operation": {
3427
+ "name": "services_operation",
3428
+ "columns": ["operation_id"],
3429
+ "isUnique": true
3430
+ },
3431
+ "services_project_status": {
3432
+ "name": "services_project_status",
3433
+ "columns": ["project_id", "status"],
3434
+ "isUnique": false
3435
+ },
3436
+ "services_terminal": {
3437
+ "name": "services_terminal",
3438
+ "columns": ["terminal_id"],
3439
+ "isUnique": false
3440
+ },
3441
+ "services_active_endpoint": {
3442
+ "name": "services_active_endpoint",
3443
+ "columns": ["terminal_id", "endpoint_host", "endpoint_port"],
3444
+ "isUnique": true,
3445
+ "where": "\"services\".\"status\" IN ('REGISTERING', 'STARTING', 'RUNNING')"
3446
+ }
3447
+ },
3448
+ "foreignKeys": {
3449
+ "services_operation_id_resource_operations_id_fk": {
3450
+ "name": "services_operation_id_resource_operations_id_fk",
3451
+ "tableFrom": "services",
3452
+ "tableTo": "resource_operations",
3453
+ "columnsFrom": ["operation_id"],
3454
+ "columnsTo": ["id"],
3455
+ "onDelete": "no action",
3456
+ "onUpdate": "no action"
3457
+ },
3458
+ "services_project_id_projects_id_fk": {
3459
+ "name": "services_project_id_projects_id_fk",
3460
+ "tableFrom": "services",
3461
+ "tableTo": "projects",
3462
+ "columnsFrom": ["project_id"],
3463
+ "columnsTo": ["id"],
3464
+ "onDelete": "no action",
3465
+ "onUpdate": "no action"
3466
+ },
3467
+ "services_terminal_id_terminals_id_fk": {
3468
+ "name": "services_terminal_id_terminals_id_fk",
3469
+ "tableFrom": "services",
3470
+ "tableTo": "terminals",
3471
+ "columnsFrom": ["terminal_id"],
3472
+ "columnsTo": ["id"],
3473
+ "onDelete": "no action",
3474
+ "onUpdate": "no action"
3475
+ }
3476
+ },
3477
+ "compositePrimaryKeys": {},
3478
+ "uniqueConstraints": {},
3479
+ "checkConstraints": {
3480
+ "services_status": {
3481
+ "name": "services_status",
3482
+ "value": "\"services\".\"status\" IN ('REGISTERING', 'STARTING', 'RUNNING', 'UNKNOWN', 'UNREGISTERED')"
3483
+ },
3484
+ "services_host": {
3485
+ "name": "services_host",
3486
+ "value": "\"services\".\"endpoint_host\" IN ('127.0.0.1', '::1')"
3487
+ },
3488
+ "services_port": {
3489
+ "name": "services_port",
3490
+ "value": "\"services\".\"endpoint_port\" BETWEEN 1 AND 65535"
3491
+ },
3492
+ "services_protocol": {
3493
+ "name": "services_protocol",
3494
+ "value": "\"services\".\"endpoint_protocol\" = 'http'"
3495
+ }
3496
+ }
3497
+ },
3498
+ "sessions": {
3499
+ "name": "sessions",
3500
+ "columns": {
3501
+ "id": {
3502
+ "name": "id",
3503
+ "type": "text",
3504
+ "primaryKey": true,
3505
+ "notNull": true,
3506
+ "autoincrement": false
3507
+ },
3508
+ "project_id": {
3509
+ "name": "project_id",
3510
+ "type": "text",
3511
+ "primaryKey": false,
3512
+ "notNull": false,
3513
+ "autoincrement": false
3514
+ },
3515
+ "workspace_path": {
3516
+ "name": "workspace_path",
3517
+ "type": "text",
3518
+ "primaryKey": false,
3519
+ "notNull": true,
3520
+ "autoincrement": false
3521
+ },
3522
+ "title": {
3523
+ "name": "title",
3524
+ "type": "text",
3525
+ "primaryKey": false,
3526
+ "notNull": true,
3527
+ "autoincrement": false
3528
+ },
3529
+ "status": {
3530
+ "name": "status",
3531
+ "type": "text",
3532
+ "primaryKey": false,
3533
+ "notNull": true,
3534
+ "autoincrement": false,
3535
+ "default": "'active'"
3536
+ },
3537
+ "model_profile_id": {
3538
+ "name": "model_profile_id",
3539
+ "type": "text",
3540
+ "primaryKey": false,
3541
+ "notNull": false,
3542
+ "autoincrement": false
3543
+ },
3544
+ "model": {
3545
+ "name": "model",
3546
+ "type": "text",
3547
+ "primaryKey": false,
3548
+ "notNull": false,
3549
+ "autoincrement": false
3550
+ },
3551
+ "thinking": {
3552
+ "name": "thinking",
3553
+ "type": "text",
3554
+ "primaryKey": false,
3555
+ "notNull": false,
3556
+ "autoincrement": false
3557
+ },
3558
+ "approval_policy_id": {
3559
+ "name": "approval_policy_id",
3560
+ "type": "text",
3561
+ "primaryKey": false,
3562
+ "notNull": true,
3563
+ "autoincrement": false,
3564
+ "default": "'standard'"
3565
+ },
3566
+ "created_at": {
3567
+ "name": "created_at",
3568
+ "type": "integer",
3569
+ "primaryKey": false,
3570
+ "notNull": true,
3571
+ "autoincrement": false
3572
+ },
3573
+ "updated_at": {
3574
+ "name": "updated_at",
3575
+ "type": "integer",
3576
+ "primaryKey": false,
3577
+ "notNull": true,
3578
+ "autoincrement": false
3579
+ },
3580
+ "last_activity_at": {
3581
+ "name": "last_activity_at",
3582
+ "type": "integer",
3583
+ "primaryKey": false,
3584
+ "notNull": true,
3585
+ "autoincrement": false
3586
+ }
3587
+ },
3588
+ "indexes": {
3589
+ "idx_sessions_project_updated": {
3590
+ "name": "idx_sessions_project_updated",
3591
+ "columns": ["project_id", "updated_at"],
3592
+ "isUnique": false
3593
+ },
3594
+ "idx_sessions_updated": {
3595
+ "name": "idx_sessions_updated",
3596
+ "columns": ["updated_at"],
3597
+ "isUnique": false
3598
+ }
3599
+ },
3600
+ "foreignKeys": {
3601
+ "sessions_project_id_projects_id_fk": {
3602
+ "name": "sessions_project_id_projects_id_fk",
3603
+ "tableFrom": "sessions",
3604
+ "tableTo": "projects",
3605
+ "columnsFrom": ["project_id"],
3606
+ "columnsTo": ["id"],
3607
+ "onDelete": "set null",
3608
+ "onUpdate": "no action"
3609
+ }
3610
+ },
3611
+ "compositePrimaryKeys": {},
3612
+ "uniqueConstraints": {},
3613
+ "checkConstraints": {}
3614
+ },
3615
+ "terminal_leases": {
3616
+ "name": "terminal_leases",
3617
+ "columns": {
3618
+ "terminal_id": {
3619
+ "name": "terminal_id",
3620
+ "type": "text",
3621
+ "primaryKey": true,
3622
+ "notNull": true,
3623
+ "autoincrement": false
3624
+ },
3625
+ "generation": {
3626
+ "name": "generation",
3627
+ "type": "integer",
3628
+ "primaryKey": false,
3629
+ "notNull": true,
3630
+ "autoincrement": false,
3631
+ "default": 0
3632
+ },
3633
+ "owner_type": {
3634
+ "name": "owner_type",
3635
+ "type": "text",
3636
+ "primaryKey": false,
3637
+ "notNull": false,
3638
+ "autoincrement": false
3639
+ },
3640
+ "owner_client_session_id": {
3641
+ "name": "owner_client_session_id",
3642
+ "type": "text",
3643
+ "primaryKey": false,
3644
+ "notNull": false,
3645
+ "autoincrement": false
3646
+ },
3647
+ "owner_connection_id": {
3648
+ "name": "owner_connection_id",
3649
+ "type": "text",
3650
+ "primaryKey": false,
3651
+ "notNull": false,
3652
+ "autoincrement": false
3653
+ },
3654
+ "owner_session_id": {
3655
+ "name": "owner_session_id",
3656
+ "type": "text",
3657
+ "primaryKey": false,
3658
+ "notNull": false,
3659
+ "autoincrement": false
3660
+ },
3661
+ "owner_turn_id": {
3662
+ "name": "owner_turn_id",
3663
+ "type": "text",
3664
+ "primaryKey": false,
3665
+ "notNull": false,
3666
+ "autoincrement": false
3667
+ },
3668
+ "owner_execution_id": {
3669
+ "name": "owner_execution_id",
3670
+ "type": "text",
3671
+ "primaryKey": false,
3672
+ "notNull": false,
3673
+ "autoincrement": false
3674
+ },
3675
+ "expires_at": {
3676
+ "name": "expires_at",
3677
+ "type": "integer",
3678
+ "primaryKey": false,
3679
+ "notNull": true,
3680
+ "autoincrement": false,
3681
+ "default": 0
3682
+ },
3683
+ "heartbeat_at": {
3684
+ "name": "heartbeat_at",
3685
+ "type": "integer",
3686
+ "primaryKey": false,
3687
+ "notNull": true,
3688
+ "autoincrement": false,
3689
+ "default": 0
3690
+ },
3691
+ "input_sequence": {
3692
+ "name": "input_sequence",
3693
+ "type": "integer",
3694
+ "primaryKey": false,
3695
+ "notNull": true,
3696
+ "autoincrement": false,
3697
+ "default": 0
3698
+ }
3699
+ },
3700
+ "indexes": {},
3701
+ "foreignKeys": {
3702
+ "terminal_leases_terminal_id_terminals_id_fk": {
3703
+ "name": "terminal_leases_terminal_id_terminals_id_fk",
3704
+ "tableFrom": "terminal_leases",
3705
+ "tableTo": "terminals",
3706
+ "columnsFrom": ["terminal_id"],
3707
+ "columnsTo": ["id"],
3708
+ "onDelete": "no action",
3709
+ "onUpdate": "no action"
3710
+ }
3711
+ },
3712
+ "compositePrimaryKeys": {},
3713
+ "uniqueConstraints": {},
3714
+ "checkConstraints": {}
3715
+ },
3716
+ "terminals": {
3717
+ "name": "terminals",
3718
+ "columns": {
3719
+ "id": {
3720
+ "name": "id",
3721
+ "type": "text",
3722
+ "primaryKey": true,
3723
+ "notNull": true,
3724
+ "autoincrement": false
3725
+ },
3726
+ "operation_id": {
3727
+ "name": "operation_id",
3728
+ "type": "text",
3729
+ "primaryKey": false,
3730
+ "notNull": true,
3731
+ "autoincrement": false
3732
+ },
3733
+ "project_id": {
3734
+ "name": "project_id",
3735
+ "type": "text",
3736
+ "primaryKey": false,
3737
+ "notNull": false,
3738
+ "autoincrement": false
3739
+ },
3740
+ "workspace_session_id": {
3741
+ "name": "workspace_session_id",
3742
+ "type": "text",
3743
+ "primaryKey": false,
3744
+ "notNull": false,
3745
+ "autoincrement": false
3746
+ },
3747
+ "source_session_id": {
3748
+ "name": "source_session_id",
3749
+ "type": "text",
3750
+ "primaryKey": false,
3751
+ "notNull": false,
3752
+ "autoincrement": false
3753
+ },
3754
+ "cwd": {
3755
+ "name": "cwd",
3756
+ "type": "text",
3757
+ "primaryKey": false,
3758
+ "notNull": true,
3759
+ "autoincrement": false
3760
+ },
3761
+ "shell": {
3762
+ "name": "shell",
3763
+ "type": "text",
3764
+ "primaryKey": false,
3765
+ "notNull": true,
3766
+ "autoincrement": false
3767
+ },
3768
+ "mode": {
3769
+ "name": "mode",
3770
+ "type": "text",
3771
+ "primaryKey": false,
3772
+ "notNull": true,
3773
+ "autoincrement": false
3774
+ },
3775
+ "role": {
3776
+ "name": "role",
3777
+ "type": "text",
3778
+ "primaryKey": false,
3779
+ "notNull": false,
3780
+ "autoincrement": false
3781
+ },
3782
+ "title": {
3783
+ "name": "title",
3784
+ "type": "text",
3785
+ "primaryKey": false,
3786
+ "notNull": false,
3787
+ "autoincrement": false
3788
+ },
3789
+ "launch_params_json": {
3790
+ "name": "launch_params_json",
3791
+ "type": "text",
3792
+ "primaryKey": false,
3793
+ "notNull": false,
3794
+ "autoincrement": false
3795
+ },
3796
+ "launch_params_hash": {
3797
+ "name": "launch_params_hash",
3798
+ "type": "text",
3799
+ "primaryKey": false,
3800
+ "notNull": false,
3801
+ "autoincrement": false
3802
+ },
3803
+ "created_by_turn_id": {
3804
+ "name": "created_by_turn_id",
3805
+ "type": "text",
3806
+ "primaryKey": false,
3807
+ "notNull": false,
3808
+ "autoincrement": false
3809
+ },
3810
+ "status": {
3811
+ "name": "status",
3812
+ "type": "text",
3813
+ "primaryKey": false,
3814
+ "notNull": true,
3815
+ "autoincrement": false
3816
+ },
3817
+ "process_identity_json": {
3818
+ "name": "process_identity_json",
3819
+ "type": "text",
3820
+ "primaryKey": false,
3821
+ "notNull": false,
3822
+ "autoincrement": false
3823
+ },
3824
+ "reason_code": {
3825
+ "name": "reason_code",
3826
+ "type": "text",
3827
+ "primaryKey": false,
3828
+ "notNull": false,
3829
+ "autoincrement": false
3830
+ },
3831
+ "output_cursor": {
3832
+ "name": "output_cursor",
3833
+ "type": "integer",
3834
+ "primaryKey": false,
3835
+ "notNull": true,
3836
+ "autoincrement": false,
3837
+ "default": 0
3838
+ },
3839
+ "created_at": {
3840
+ "name": "created_at",
3841
+ "type": "integer",
3842
+ "primaryKey": false,
3843
+ "notNull": true,
3844
+ "autoincrement": false
3845
+ },
3846
+ "started_at": {
3847
+ "name": "started_at",
3848
+ "type": "integer",
3849
+ "primaryKey": false,
3850
+ "notNull": false,
3851
+ "autoincrement": false
3852
+ },
3853
+ "ended_at": {
3854
+ "name": "ended_at",
3855
+ "type": "integer",
3856
+ "primaryKey": false,
3857
+ "notNull": false,
3858
+ "autoincrement": false
3859
+ },
3860
+ "exit_code": {
3861
+ "name": "exit_code",
3862
+ "type": "integer",
3863
+ "primaryKey": false,
3864
+ "notNull": false,
3865
+ "autoincrement": false
3866
+ }
3867
+ },
3868
+ "indexes": {
3869
+ "terminals_operation": {
3870
+ "name": "terminals_operation",
3871
+ "columns": ["operation_id"],
3872
+ "isUnique": true
3873
+ },
3874
+ "terminals_status": {
3875
+ "name": "terminals_status",
3876
+ "columns": ["status"],
3877
+ "isUnique": false
3878
+ },
3879
+ "terminals_active_role": {
3880
+ "name": "terminals_active_role",
3881
+ "columns": ["project_id", "role"],
3882
+ "isUnique": true,
3883
+ "where": "\"terminals\".\"mode\" = 'dev' AND \"terminals\".\"status\" IN ('CREATED', 'RUNNING', 'STOPPING')"
3884
+ }
3885
+ },
3886
+ "foreignKeys": {
3887
+ "terminals_operation_id_resource_operations_id_fk": {
3888
+ "name": "terminals_operation_id_resource_operations_id_fk",
3889
+ "tableFrom": "terminals",
3890
+ "tableTo": "resource_operations",
3891
+ "columnsFrom": ["operation_id"],
3892
+ "columnsTo": ["id"],
3893
+ "onDelete": "no action",
3894
+ "onUpdate": "no action"
3895
+ }
3896
+ },
3897
+ "compositePrimaryKeys": {},
3898
+ "uniqueConstraints": {},
3899
+ "checkConstraints": {}
3900
+ },
3901
+ "trusted_devices": {
3902
+ "name": "trusted_devices",
3903
+ "columns": {
3904
+ "id": {
3905
+ "name": "id",
3906
+ "type": "text",
3907
+ "primaryKey": true,
3908
+ "notNull": true,
3909
+ "autoincrement": false
3910
+ },
3911
+ "label": {
3912
+ "name": "label",
3913
+ "type": "text",
3914
+ "primaryKey": false,
3915
+ "notNull": true,
3916
+ "autoincrement": false
3917
+ },
3918
+ "created_by_request_id": {
3919
+ "name": "created_by_request_id",
3920
+ "type": "text",
3921
+ "primaryKey": false,
3922
+ "notNull": false,
3923
+ "autoincrement": false
3924
+ },
3925
+ "user_agent": {
3926
+ "name": "user_agent",
3927
+ "type": "text",
3928
+ "primaryKey": false,
3929
+ "notNull": false,
3930
+ "autoincrement": false
3931
+ },
3932
+ "created_at": {
3933
+ "name": "created_at",
3934
+ "type": "integer",
3935
+ "primaryKey": false,
3936
+ "notNull": true,
3937
+ "autoincrement": false
3938
+ },
3939
+ "last_seen_at": {
3940
+ "name": "last_seen_at",
3941
+ "type": "integer",
3942
+ "primaryKey": false,
3943
+ "notNull": false,
3944
+ "autoincrement": false
3945
+ },
3946
+ "revoked_at": {
3947
+ "name": "revoked_at",
3948
+ "type": "integer",
3949
+ "primaryKey": false,
3950
+ "notNull": false,
3951
+ "autoincrement": false
3952
+ }
3953
+ },
3954
+ "indexes": {},
3955
+ "foreignKeys": {
3956
+ "trusted_devices_created_by_request_id_device_requests_id_fk": {
3957
+ "name": "trusted_devices_created_by_request_id_device_requests_id_fk",
3958
+ "tableFrom": "trusted_devices",
3959
+ "tableTo": "device_requests",
3960
+ "columnsFrom": ["created_by_request_id"],
3961
+ "columnsTo": ["id"],
3962
+ "onDelete": "no action",
3963
+ "onUpdate": "no action"
3964
+ }
3965
+ },
3966
+ "compositePrimaryKeys": {},
3967
+ "uniqueConstraints": {},
3968
+ "checkConstraints": {}
3969
+ },
3970
+ "turns": {
3971
+ "name": "turns",
3972
+ "columns": {
3973
+ "id": {
3974
+ "name": "id",
3975
+ "type": "text",
3976
+ "primaryKey": true,
3977
+ "notNull": true,
3978
+ "autoincrement": false
3979
+ },
3980
+ "session_id": {
3981
+ "name": "session_id",
3982
+ "type": "text",
3983
+ "primaryKey": false,
3984
+ "notNull": true,
3985
+ "autoincrement": false
3986
+ },
3987
+ "model_profile_id": {
3988
+ "name": "model_profile_id",
3989
+ "type": "text",
3990
+ "primaryKey": false,
3991
+ "notNull": false,
3992
+ "autoincrement": false
3993
+ },
3994
+ "provider": {
3995
+ "name": "provider",
3996
+ "type": "text",
3997
+ "primaryKey": false,
3998
+ "notNull": false,
3999
+ "autoincrement": false
4000
+ },
4001
+ "model": {
4002
+ "name": "model",
4003
+ "type": "text",
4004
+ "primaryKey": false,
4005
+ "notNull": false,
4006
+ "autoincrement": false
4007
+ },
4008
+ "thinking": {
4009
+ "name": "thinking",
4010
+ "type": "text",
4011
+ "primaryKey": false,
4012
+ "notNull": false,
4013
+ "autoincrement": false
4014
+ },
4015
+ "context_window": {
4016
+ "name": "context_window",
4017
+ "type": "integer",
4018
+ "primaryKey": false,
4019
+ "notNull": false,
4020
+ "autoincrement": false
4021
+ },
4022
+ "status": {
4023
+ "name": "status",
4024
+ "type": "text",
4025
+ "primaryKey": false,
4026
+ "notNull": true,
4027
+ "autoincrement": false
4028
+ },
4029
+ "input_json": {
4030
+ "name": "input_json",
4031
+ "type": "text",
4032
+ "primaryKey": false,
4033
+ "notNull": true,
4034
+ "autoincrement": false
4035
+ },
4036
+ "usage_json": {
4037
+ "name": "usage_json",
4038
+ "type": "text",
4039
+ "primaryKey": false,
4040
+ "notNull": false,
4041
+ "autoincrement": false
4042
+ },
4043
+ "error_json": {
4044
+ "name": "error_json",
4045
+ "type": "text",
4046
+ "primaryKey": false,
4047
+ "notNull": false,
4048
+ "autoincrement": false
4049
+ },
4050
+ "idempotency_key": {
4051
+ "name": "idempotency_key",
4052
+ "type": "text",
4053
+ "primaryKey": false,
4054
+ "notNull": false,
4055
+ "autoincrement": false
4056
+ },
4057
+ "created_at": {
4058
+ "name": "created_at",
4059
+ "type": "integer",
4060
+ "primaryKey": false,
4061
+ "notNull": true,
4062
+ "autoincrement": false
4063
+ },
4064
+ "started_at": {
4065
+ "name": "started_at",
4066
+ "type": "integer",
4067
+ "primaryKey": false,
4068
+ "notNull": false,
4069
+ "autoincrement": false
4070
+ },
4071
+ "ended_at": {
4072
+ "name": "ended_at",
4073
+ "type": "integer",
4074
+ "primaryKey": false,
4075
+ "notNull": false,
4076
+ "autoincrement": false
4077
+ }
4078
+ },
4079
+ "indexes": {
4080
+ "turns_session_idempotency_unique": {
4081
+ "name": "turns_session_idempotency_unique",
4082
+ "columns": ["session_id", "idempotency_key"],
4083
+ "isUnique": true
4084
+ },
4085
+ "idx_turns_session_created": {
4086
+ "name": "idx_turns_session_created",
4087
+ "columns": ["session_id", "created_at"],
4088
+ "isUnique": false
4089
+ },
4090
+ "idx_turns_session_status": {
4091
+ "name": "idx_turns_session_status",
4092
+ "columns": ["session_id", "status"],
4093
+ "isUnique": false
4094
+ }
4095
+ },
4096
+ "foreignKeys": {
4097
+ "turns_session_id_sessions_id_fk": {
4098
+ "name": "turns_session_id_sessions_id_fk",
4099
+ "tableFrom": "turns",
4100
+ "tableTo": "sessions",
4101
+ "columnsFrom": ["session_id"],
4102
+ "columnsTo": ["id"],
4103
+ "onDelete": "cascade",
4104
+ "onUpdate": "no action"
4105
+ }
4106
+ },
4107
+ "compositePrimaryKeys": {},
4108
+ "uniqueConstraints": {},
4109
+ "checkConstraints": {}
4110
+ },
4111
+ "webauthn_challenges": {
4112
+ "name": "webauthn_challenges",
4113
+ "columns": {
4114
+ "id": {
4115
+ "name": "id",
4116
+ "type": "text",
4117
+ "primaryKey": true,
4118
+ "notNull": true,
4119
+ "autoincrement": false
4120
+ },
4121
+ "type": {
4122
+ "name": "type",
4123
+ "type": "text",
4124
+ "primaryKey": false,
4125
+ "notNull": true,
4126
+ "autoincrement": false
4127
+ },
4128
+ "challenge": {
4129
+ "name": "challenge",
4130
+ "type": "text",
4131
+ "primaryKey": false,
4132
+ "notNull": true,
4133
+ "autoincrement": false
4134
+ },
4135
+ "request_id": {
4136
+ "name": "request_id",
4137
+ "type": "text",
4138
+ "primaryKey": false,
4139
+ "notNull": false,
4140
+ "autoincrement": false
4141
+ },
4142
+ "device_id": {
4143
+ "name": "device_id",
4144
+ "type": "text",
4145
+ "primaryKey": false,
4146
+ "notNull": false,
4147
+ "autoincrement": false
4148
+ },
4149
+ "created_at": {
4150
+ "name": "created_at",
4151
+ "type": "integer",
4152
+ "primaryKey": false,
4153
+ "notNull": true,
4154
+ "autoincrement": false
4155
+ },
4156
+ "expires_at": {
4157
+ "name": "expires_at",
4158
+ "type": "integer",
4159
+ "primaryKey": false,
4160
+ "notNull": true,
4161
+ "autoincrement": false
4162
+ },
4163
+ "consumed_at": {
4164
+ "name": "consumed_at",
4165
+ "type": "integer",
4166
+ "primaryKey": false,
4167
+ "notNull": false,
4168
+ "autoincrement": false
4169
+ }
4170
+ },
4171
+ "indexes": {
4172
+ "idx_webauthn_challenges_expiry": {
4173
+ "name": "idx_webauthn_challenges_expiry",
4174
+ "columns": ["expires_at"],
4175
+ "isUnique": false
4176
+ }
4177
+ },
4178
+ "foreignKeys": {
4179
+ "webauthn_challenges_request_id_device_requests_id_fk": {
4180
+ "name": "webauthn_challenges_request_id_device_requests_id_fk",
4181
+ "tableFrom": "webauthn_challenges",
4182
+ "tableTo": "device_requests",
4183
+ "columnsFrom": ["request_id"],
4184
+ "columnsTo": ["id"],
4185
+ "onDelete": "no action",
4186
+ "onUpdate": "no action"
4187
+ },
4188
+ "webauthn_challenges_device_id_trusted_devices_id_fk": {
4189
+ "name": "webauthn_challenges_device_id_trusted_devices_id_fk",
4190
+ "tableFrom": "webauthn_challenges",
4191
+ "tableTo": "trusted_devices",
4192
+ "columnsFrom": ["device_id"],
4193
+ "columnsTo": ["id"],
4194
+ "onDelete": "no action",
4195
+ "onUpdate": "no action"
4196
+ }
4197
+ },
4198
+ "compositePrimaryKeys": {},
4199
+ "uniqueConstraints": {},
4200
+ "checkConstraints": {}
4201
+ },
4202
+ "webauthn_credentials": {
4203
+ "name": "webauthn_credentials",
4204
+ "columns": {
4205
+ "id": {
4206
+ "name": "id",
4207
+ "type": "text",
4208
+ "primaryKey": true,
4209
+ "notNull": true,
4210
+ "autoincrement": false
4211
+ },
4212
+ "device_id": {
4213
+ "name": "device_id",
4214
+ "type": "text",
4215
+ "primaryKey": false,
4216
+ "notNull": true,
4217
+ "autoincrement": false
4218
+ },
4219
+ "credential_id": {
4220
+ "name": "credential_id",
4221
+ "type": "text",
4222
+ "primaryKey": false,
4223
+ "notNull": true,
4224
+ "autoincrement": false
4225
+ },
4226
+ "public_key": {
4227
+ "name": "public_key",
4228
+ "type": "text",
4229
+ "primaryKey": false,
4230
+ "notNull": true,
4231
+ "autoincrement": false
4232
+ },
4233
+ "counter": {
4234
+ "name": "counter",
4235
+ "type": "integer",
4236
+ "primaryKey": false,
4237
+ "notNull": true,
4238
+ "autoincrement": false,
4239
+ "default": 0
4240
+ },
4241
+ "transports_json": {
4242
+ "name": "transports_json",
4243
+ "type": "text",
4244
+ "primaryKey": false,
4245
+ "notNull": true,
4246
+ "autoincrement": false,
4247
+ "default": "'[]'"
4248
+ },
4249
+ "aaguid": {
4250
+ "name": "aaguid",
4251
+ "type": "text",
4252
+ "primaryKey": false,
4253
+ "notNull": false,
4254
+ "autoincrement": false
4255
+ },
4256
+ "backup_eligible": {
4257
+ "name": "backup_eligible",
4258
+ "type": "integer",
4259
+ "primaryKey": false,
4260
+ "notNull": true,
4261
+ "autoincrement": false,
4262
+ "default": false
4263
+ },
4264
+ "backup_state": {
4265
+ "name": "backup_state",
4266
+ "type": "integer",
4267
+ "primaryKey": false,
4268
+ "notNull": true,
4269
+ "autoincrement": false,
4270
+ "default": false
4271
+ },
4272
+ "created_at": {
4273
+ "name": "created_at",
4274
+ "type": "integer",
4275
+ "primaryKey": false,
4276
+ "notNull": true,
4277
+ "autoincrement": false
4278
+ },
4279
+ "last_used_at": {
4280
+ "name": "last_used_at",
4281
+ "type": "integer",
4282
+ "primaryKey": false,
4283
+ "notNull": false,
4284
+ "autoincrement": false
4285
+ },
4286
+ "revoked_at": {
4287
+ "name": "revoked_at",
4288
+ "type": "integer",
4289
+ "primaryKey": false,
4290
+ "notNull": false,
4291
+ "autoincrement": false
4292
+ }
4293
+ },
4294
+ "indexes": {
4295
+ "webauthn_credentials_credential_id_unique": {
4296
+ "name": "webauthn_credentials_credential_id_unique",
4297
+ "columns": ["credential_id"],
4298
+ "isUnique": true
4299
+ },
4300
+ "idx_webauthn_credentials_device": {
4301
+ "name": "idx_webauthn_credentials_device",
4302
+ "columns": ["device_id"],
4303
+ "isUnique": false
4304
+ }
4305
+ },
4306
+ "foreignKeys": {
4307
+ "webauthn_credentials_device_id_trusted_devices_id_fk": {
4308
+ "name": "webauthn_credentials_device_id_trusted_devices_id_fk",
4309
+ "tableFrom": "webauthn_credentials",
4310
+ "tableTo": "trusted_devices",
4311
+ "columnsFrom": ["device_id"],
4312
+ "columnsTo": ["id"],
4313
+ "onDelete": "no action",
4314
+ "onUpdate": "no action"
4315
+ }
4316
+ },
4317
+ "compositePrimaryKeys": {},
4318
+ "uniqueConstraints": {},
4319
+ "checkConstraints": {}
4320
+ }
4321
+ },
4322
+ "views": {},
4323
+ "enums": {},
4324
+ "_meta": {
4325
+ "schemas": {},
4326
+ "tables": {},
4327
+ "columns": {}
4328
+ },
4329
+ "internal": {
4330
+ "indexes": {}
4331
+ }
4332
+ }