sandcms 0.5.3 → 0.6.1

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 (147) hide show
  1. package/README.md +5 -3
  2. package/dist/admin/Account.svelte +4 -1
  3. package/dist/admin/ApiKeys.svelte +159 -0
  4. package/dist/admin/ApiKeys.svelte.d.ts +3 -0
  5. package/dist/admin/AssetAttachment.svelte +6 -4
  6. package/dist/admin/BlueprintFields.svelte +86 -0
  7. package/dist/admin/BlueprintFields.svelte.d.ts +15 -0
  8. package/dist/admin/Collection.svelte +40 -7
  9. package/dist/admin/Editor.svelte +57 -17
  10. package/dist/admin/Fields.svelte +217 -144
  11. package/dist/admin/Fields.svelte.d.ts +1 -0
  12. package/dist/admin/FocusPicker.svelte +136 -0
  13. package/dist/admin/FocusPicker.svelte.d.ts +11 -0
  14. package/dist/admin/Gallery.svelte +40 -34
  15. package/dist/admin/GlobalSearch.svelte +56 -0
  16. package/dist/admin/GlobalSearch.svelte.d.ts +3 -0
  17. package/dist/admin/Inbox.svelte +8 -5
  18. package/dist/admin/LinkField.svelte +116 -0
  19. package/dist/admin/LinkField.svelte.d.ts +17 -0
  20. package/dist/admin/MediaLibrary.svelte +41 -14
  21. package/dist/admin/MediaPicker.svelte +12 -2
  22. package/dist/admin/NotificationSettings.svelte +2 -2
  23. package/dist/admin/SearchList.svelte +55 -0
  24. package/dist/admin/SearchList.svelte.d.ts +42 -0
  25. package/dist/admin/SelectField.svelte +3 -1
  26. package/dist/admin/SelectField.svelte.d.ts +1 -0
  27. package/dist/admin/Shell.svelte +4 -2
  28. package/dist/admin/UnsavedChanges.svelte +1 -1
  29. package/dist/admin/Users.svelte +11 -5
  30. package/dist/admin/client.js +2 -1
  31. package/dist/admin/generated/admin.css +109 -0
  32. package/dist/admin/types.d.ts +5 -1
  33. package/dist/admin/uploads.js +27 -6
  34. package/dist/blueprints/conditions.d.ts +2 -0
  35. package/dist/blueprints/conditions.js +4 -0
  36. package/dist/blueprints/extends.d.ts +5 -0
  37. package/dist/blueprints/extends.js +76 -0
  38. package/dist/blueprints/files.d.ts +3 -1
  39. package/dist/blueprints/files.js +35 -2
  40. package/dist/blueprints/layout.d.ts +4 -0
  41. package/dist/blueprints/layout.js +12 -0
  42. package/dist/blueprints/load.d.ts +1 -1
  43. package/dist/blueprints/load.js +123 -12
  44. package/dist/blueprints/types.d.ts +35 -1
  45. package/dist/blueprints/validate.js +30 -6
  46. package/dist/cli/cloudflare.js +17 -5
  47. package/dist/cli/doctor.js +6 -3
  48. package/dist/cli/files.js +1 -1
  49. package/dist/cli/scaffold.js +8 -6
  50. package/dist/cli/setup.js +9 -2
  51. package/dist/cli/upgrade.js +2 -1
  52. package/dist/email-failure.d.ts +17 -0
  53. package/dist/email-failure.js +22 -0
  54. package/dist/index.d.ts +2 -1
  55. package/dist/index.js +1 -0
  56. package/dist/link.d.ts +17 -0
  57. package/dist/link.js +44 -0
  58. package/dist/notification-fields.js +1 -1
  59. package/dist/search.d.ts +8 -0
  60. package/dist/search.js +1 -0
  61. package/dist/server/access.d.ts +2 -0
  62. package/dist/server/access.js +59 -23
  63. package/dist/server/admin-load.d.ts +11 -2
  64. package/dist/server/admin-load.js +4 -2
  65. package/dist/server/api-access.d.ts +31 -0
  66. package/dist/server/api-access.js +52 -0
  67. package/dist/server/api-pagination.d.ts +34 -0
  68. package/dist/server/api-pagination.js +87 -0
  69. package/dist/server/api.js +224 -32
  70. package/dist/server/auth.d.ts +1150 -0
  71. package/dist/server/auth.js +11 -1
  72. package/dist/server/cms.d.ts +1210 -4
  73. package/dist/server/cms.js +12 -0
  74. package/dist/server/content.d.ts +17 -2
  75. package/dist/server/content.js +89 -14
  76. package/dist/server/db/auto-migrate.d.ts +12 -0
  77. package/dist/server/db/auto-migrate.js +23 -0
  78. package/dist/server/db/migration-data.js +24 -0
  79. package/dist/server/db/migrations/0001_independent_password_resets.sql +3 -0
  80. package/dist/server/db/migrations/0002_email_failure_reason.sql +1 -0
  81. package/dist/server/db/migrations/0003_direct_r2_uploads.sql +10 -0
  82. package/dist/server/db/migrations/0004_agent_api_keys.sql +38 -0
  83. package/dist/server/db/migrations/0005_api_retention_and_pagination.sql +3 -0
  84. package/dist/server/db/migrations/0006_durable_media_deletion.sql +7 -0
  85. package/dist/server/db/migrations/meta/0001_snapshot.json +1197 -0
  86. package/dist/server/db/migrations/meta/0002_snapshot.json +1204 -0
  87. package/dist/server/db/migrations/meta/0003_snapshot.json +1281 -0
  88. package/dist/server/db/migrations/meta/0004_snapshot.json +1546 -0
  89. package/dist/server/db/migrations/meta/0005_snapshot.json +1572 -0
  90. package/dist/server/db/migrations/meta/0006_snapshot.json +1627 -0
  91. package/dist/server/db/migrations/meta/_journal.json +42 -0
  92. package/dist/server/db/schema.d.ts +742 -2
  93. package/dist/server/db/schema.js +77 -5
  94. package/dist/server/db/store.js +24 -9
  95. package/dist/server/email/index.d.ts +11 -1
  96. package/dist/server/email/index.js +69 -6
  97. package/dist/server/forms.js +12 -2
  98. package/dist/server/hooks.d.ts +1 -1
  99. package/dist/server/hooks.js +37 -14
  100. package/dist/server/index.d.ts +2 -1
  101. package/dist/server/index.js +2 -1
  102. package/dist/server/links.d.ts +5 -0
  103. package/dist/server/links.js +44 -0
  104. package/dist/server/media/deletions.d.ts +2 -0
  105. package/dist/server/media/deletions.js +58 -0
  106. package/dist/server/media/presets.d.ts +10 -2
  107. package/dist/server/media/presets.js +14 -2
  108. package/dist/server/media/runner.d.ts +1 -1
  109. package/dist/server/media/runner.js +105 -8
  110. package/dist/server/media/service.d.ts +41 -3
  111. package/dist/server/media/service.js +146 -33
  112. package/dist/server/notifications.d.ts +1 -0
  113. package/dist/server/notifications.js +4 -2
  114. package/dist/server/request.d.ts +2 -0
  115. package/dist/server/request.js +5 -0
  116. package/dist/server/search.d.ts +13 -0
  117. package/dist/server/search.js +97 -0
  118. package/dist/worker/index.d.ts +4 -4
  119. package/dist/worker/index.js +208 -67
  120. package/dist/worker/local.d.ts +5 -0
  121. package/dist/worker/local.js +57 -0
  122. package/dist/worker/source.d.ts +1 -1
  123. package/dist/worker/source.js +2 -2
  124. package/dist/worker/uploads.d.ts +22 -0
  125. package/dist/worker/uploads.js +48 -0
  126. package/docs/api.md +73 -0
  127. package/docs/cloudflare.md +37 -10
  128. package/docs/content.md +162 -4
  129. package/docs/deployment.md +33 -4
  130. package/docs/email.md +11 -7
  131. package/docs/forms.md +3 -1
  132. package/docs/media.md +33 -4
  133. package/docs/package.md +6 -4
  134. package/docs/releases.md +54 -1
  135. package/docs/upgrades.md +91 -3
  136. package/package.json +19 -10
  137. package/templates/hooks.server.ts +2 -2
  138. package/templates/integration.ts +3 -2
  139. package/templates/routes/admin/+page.server.ts +1 -1
  140. package/templates/routes/api/+server.ts +1 -1
  141. package/templates/sandcms/blueprints/collections/projects.yaml +16 -8
  142. package/templates/sandcms/blueprints/fields/seo.yaml +5 -0
  143. package/templates/sandcms/blueprints/files/image.yaml +1 -0
  144. package/templates/sandcms/blueprints/pages/home.yaml +1 -0
  145. package/templates/sandcms/config.yaml +1 -0
  146. package/templates/sandcms/worker/local.ts +1 -0
  147. package/templates/sandcms/worker/wrangler.jsonc +1 -2
@@ -0,0 +1,1627 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "1ac16fb4-baa9-467d-b6f2-ca591eb23eff",
5
+ "prevId": "25f28235-0f2a-46d7-9b5b-46899997f8e2",
6
+ "tables": {
7
+ "access_links": {
8
+ "name": "access_links",
9
+ "columns": {
10
+ "id": {
11
+ "name": "id",
12
+ "type": "text",
13
+ "primaryKey": true,
14
+ "notNull": true,
15
+ "autoincrement": false
16
+ },
17
+ "kind": {
18
+ "name": "kind",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true,
22
+ "autoincrement": false
23
+ },
24
+ "email": {
25
+ "name": "email",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": true,
29
+ "autoincrement": false
30
+ },
31
+ "role": {
32
+ "name": "role",
33
+ "type": "text",
34
+ "primaryKey": false,
35
+ "notNull": true,
36
+ "autoincrement": false,
37
+ "default": "'editor'"
38
+ },
39
+ "tokenHash": {
40
+ "name": "tokenHash",
41
+ "type": "text",
42
+ "primaryKey": false,
43
+ "notNull": true,
44
+ "autoincrement": false
45
+ },
46
+ "credentialHash": {
47
+ "name": "credentialHash",
48
+ "type": "text",
49
+ "primaryKey": false,
50
+ "notNull": false,
51
+ "autoincrement": false
52
+ },
53
+ "expiresAt": {
54
+ "name": "expiresAt",
55
+ "type": "integer",
56
+ "primaryKey": false,
57
+ "notNull": true,
58
+ "autoincrement": false
59
+ },
60
+ "status": {
61
+ "name": "status",
62
+ "type": "text",
63
+ "primaryKey": false,
64
+ "notNull": true,
65
+ "autoincrement": false
66
+ },
67
+ "failureReason": {
68
+ "name": "failureReason",
69
+ "type": "text",
70
+ "primaryKey": false,
71
+ "notNull": false,
72
+ "autoincrement": false
73
+ },
74
+ "createdAt": {
75
+ "name": "createdAt",
76
+ "type": "integer",
77
+ "primaryKey": false,
78
+ "notNull": true,
79
+ "autoincrement": false
80
+ }
81
+ },
82
+ "indexes": {
83
+ "access_links_tokenHash_unique": {
84
+ "name": "access_links_tokenHash_unique",
85
+ "columns": [
86
+ "tokenHash"
87
+ ],
88
+ "isUnique": true
89
+ },
90
+ "access_link_recipient": {
91
+ "name": "access_link_recipient",
92
+ "columns": [
93
+ "kind",
94
+ "email"
95
+ ],
96
+ "isUnique": false
97
+ },
98
+ "access_invite_recipient": {
99
+ "name": "access_invite_recipient",
100
+ "columns": [
101
+ "kind",
102
+ "email"
103
+ ],
104
+ "isUnique": true,
105
+ "where": "\"access_links\".\"kind\" = 'invite'"
106
+ }
107
+ },
108
+ "foreignKeys": {},
109
+ "compositePrimaryKeys": {},
110
+ "uniqueConstraints": {},
111
+ "checkConstraints": {}
112
+ },
113
+ "account": {
114
+ "name": "account",
115
+ "columns": {
116
+ "id": {
117
+ "name": "id",
118
+ "type": "text",
119
+ "primaryKey": true,
120
+ "notNull": true,
121
+ "autoincrement": false
122
+ },
123
+ "accountId": {
124
+ "name": "accountId",
125
+ "type": "text",
126
+ "primaryKey": false,
127
+ "notNull": true,
128
+ "autoincrement": false
129
+ },
130
+ "providerId": {
131
+ "name": "providerId",
132
+ "type": "text",
133
+ "primaryKey": false,
134
+ "notNull": true,
135
+ "autoincrement": false
136
+ },
137
+ "userId": {
138
+ "name": "userId",
139
+ "type": "text",
140
+ "primaryKey": false,
141
+ "notNull": true,
142
+ "autoincrement": false
143
+ },
144
+ "accessToken": {
145
+ "name": "accessToken",
146
+ "type": "text",
147
+ "primaryKey": false,
148
+ "notNull": false,
149
+ "autoincrement": false
150
+ },
151
+ "refreshToken": {
152
+ "name": "refreshToken",
153
+ "type": "text",
154
+ "primaryKey": false,
155
+ "notNull": false,
156
+ "autoincrement": false
157
+ },
158
+ "idToken": {
159
+ "name": "idToken",
160
+ "type": "text",
161
+ "primaryKey": false,
162
+ "notNull": false,
163
+ "autoincrement": false
164
+ },
165
+ "accessTokenExpiresAt": {
166
+ "name": "accessTokenExpiresAt",
167
+ "type": "integer",
168
+ "primaryKey": false,
169
+ "notNull": false,
170
+ "autoincrement": false
171
+ },
172
+ "refreshTokenExpiresAt": {
173
+ "name": "refreshTokenExpiresAt",
174
+ "type": "integer",
175
+ "primaryKey": false,
176
+ "notNull": false,
177
+ "autoincrement": false
178
+ },
179
+ "scope": {
180
+ "name": "scope",
181
+ "type": "text",
182
+ "primaryKey": false,
183
+ "notNull": false,
184
+ "autoincrement": false
185
+ },
186
+ "password": {
187
+ "name": "password",
188
+ "type": "text",
189
+ "primaryKey": false,
190
+ "notNull": false,
191
+ "autoincrement": false
192
+ },
193
+ "createdAt": {
194
+ "name": "createdAt",
195
+ "type": "integer",
196
+ "primaryKey": false,
197
+ "notNull": true,
198
+ "autoincrement": false
199
+ },
200
+ "updatedAt": {
201
+ "name": "updatedAt",
202
+ "type": "integer",
203
+ "primaryKey": false,
204
+ "notNull": true,
205
+ "autoincrement": false
206
+ }
207
+ },
208
+ "indexes": {
209
+ "account_user": {
210
+ "name": "account_user",
211
+ "columns": [
212
+ "userId"
213
+ ],
214
+ "isUnique": false
215
+ }
216
+ },
217
+ "foreignKeys": {
218
+ "account_userId_user_id_fk": {
219
+ "name": "account_userId_user_id_fk",
220
+ "tableFrom": "account",
221
+ "tableTo": "user",
222
+ "columnsFrom": [
223
+ "userId"
224
+ ],
225
+ "columnsTo": [
226
+ "id"
227
+ ],
228
+ "onDelete": "cascade",
229
+ "onUpdate": "no action"
230
+ }
231
+ },
232
+ "compositePrimaryKeys": {},
233
+ "uniqueConstraints": {},
234
+ "checkConstraints": {}
235
+ },
236
+ "api_requests": {
237
+ "name": "api_requests",
238
+ "columns": {
239
+ "id": {
240
+ "name": "id",
241
+ "type": "text",
242
+ "primaryKey": true,
243
+ "notNull": true,
244
+ "autoincrement": false
245
+ },
246
+ "userId": {
247
+ "name": "userId",
248
+ "type": "text",
249
+ "primaryKey": false,
250
+ "notNull": true,
251
+ "autoincrement": false
252
+ },
253
+ "fingerprint": {
254
+ "name": "fingerprint",
255
+ "type": "text",
256
+ "primaryKey": false,
257
+ "notNull": true,
258
+ "autoincrement": false
259
+ },
260
+ "response": {
261
+ "name": "response",
262
+ "type": "text",
263
+ "primaryKey": false,
264
+ "notNull": true,
265
+ "autoincrement": false
266
+ },
267
+ "createdAt": {
268
+ "name": "createdAt",
269
+ "type": "integer",
270
+ "primaryKey": false,
271
+ "notNull": true,
272
+ "autoincrement": false
273
+ }
274
+ },
275
+ "indexes": {
276
+ "api_requests_created": {
277
+ "name": "api_requests_created",
278
+ "columns": [
279
+ "createdAt"
280
+ ],
281
+ "isUnique": false
282
+ }
283
+ },
284
+ "foreignKeys": {
285
+ "api_requests_userId_user_id_fk": {
286
+ "name": "api_requests_userId_user_id_fk",
287
+ "tableFrom": "api_requests",
288
+ "tableTo": "user",
289
+ "columnsFrom": [
290
+ "userId"
291
+ ],
292
+ "columnsTo": [
293
+ "id"
294
+ ],
295
+ "onDelete": "cascade",
296
+ "onUpdate": "no action"
297
+ }
298
+ },
299
+ "compositePrimaryKeys": {},
300
+ "uniqueConstraints": {},
301
+ "checkConstraints": {}
302
+ },
303
+ "apikey": {
304
+ "name": "apikey",
305
+ "columns": {
306
+ "id": {
307
+ "name": "id",
308
+ "type": "text",
309
+ "primaryKey": true,
310
+ "notNull": true,
311
+ "autoincrement": false
312
+ },
313
+ "configId": {
314
+ "name": "configId",
315
+ "type": "text",
316
+ "primaryKey": false,
317
+ "notNull": true,
318
+ "autoincrement": false,
319
+ "default": "'default'"
320
+ },
321
+ "name": {
322
+ "name": "name",
323
+ "type": "text",
324
+ "primaryKey": false,
325
+ "notNull": false,
326
+ "autoincrement": false
327
+ },
328
+ "start": {
329
+ "name": "start",
330
+ "type": "text",
331
+ "primaryKey": false,
332
+ "notNull": false,
333
+ "autoincrement": false
334
+ },
335
+ "prefix": {
336
+ "name": "prefix",
337
+ "type": "text",
338
+ "primaryKey": false,
339
+ "notNull": false,
340
+ "autoincrement": false
341
+ },
342
+ "key": {
343
+ "name": "key",
344
+ "type": "text",
345
+ "primaryKey": false,
346
+ "notNull": true,
347
+ "autoincrement": false
348
+ },
349
+ "referenceId": {
350
+ "name": "referenceId",
351
+ "type": "text",
352
+ "primaryKey": false,
353
+ "notNull": true,
354
+ "autoincrement": false
355
+ },
356
+ "refillInterval": {
357
+ "name": "refillInterval",
358
+ "type": "integer",
359
+ "primaryKey": false,
360
+ "notNull": false,
361
+ "autoincrement": false
362
+ },
363
+ "refillAmount": {
364
+ "name": "refillAmount",
365
+ "type": "integer",
366
+ "primaryKey": false,
367
+ "notNull": false,
368
+ "autoincrement": false
369
+ },
370
+ "lastRefillAt": {
371
+ "name": "lastRefillAt",
372
+ "type": "integer",
373
+ "primaryKey": false,
374
+ "notNull": false,
375
+ "autoincrement": false
376
+ },
377
+ "enabled": {
378
+ "name": "enabled",
379
+ "type": "integer",
380
+ "primaryKey": false,
381
+ "notNull": false,
382
+ "autoincrement": false,
383
+ "default": true
384
+ },
385
+ "rateLimitEnabled": {
386
+ "name": "rateLimitEnabled",
387
+ "type": "integer",
388
+ "primaryKey": false,
389
+ "notNull": false,
390
+ "autoincrement": false,
391
+ "default": true
392
+ },
393
+ "rateLimitTimeWindow": {
394
+ "name": "rateLimitTimeWindow",
395
+ "type": "integer",
396
+ "primaryKey": false,
397
+ "notNull": false,
398
+ "autoincrement": false,
399
+ "default": 60000
400
+ },
401
+ "rateLimitMax": {
402
+ "name": "rateLimitMax",
403
+ "type": "integer",
404
+ "primaryKey": false,
405
+ "notNull": false,
406
+ "autoincrement": false,
407
+ "default": 120
408
+ },
409
+ "requestCount": {
410
+ "name": "requestCount",
411
+ "type": "integer",
412
+ "primaryKey": false,
413
+ "notNull": false,
414
+ "autoincrement": false,
415
+ "default": 0
416
+ },
417
+ "remaining": {
418
+ "name": "remaining",
419
+ "type": "integer",
420
+ "primaryKey": false,
421
+ "notNull": false,
422
+ "autoincrement": false
423
+ },
424
+ "lastRequest": {
425
+ "name": "lastRequest",
426
+ "type": "integer",
427
+ "primaryKey": false,
428
+ "notNull": false,
429
+ "autoincrement": false
430
+ },
431
+ "expiresAt": {
432
+ "name": "expiresAt",
433
+ "type": "integer",
434
+ "primaryKey": false,
435
+ "notNull": false,
436
+ "autoincrement": false
437
+ },
438
+ "createdAt": {
439
+ "name": "createdAt",
440
+ "type": "integer",
441
+ "primaryKey": false,
442
+ "notNull": true,
443
+ "autoincrement": false
444
+ },
445
+ "updatedAt": {
446
+ "name": "updatedAt",
447
+ "type": "integer",
448
+ "primaryKey": false,
449
+ "notNull": true,
450
+ "autoincrement": false
451
+ },
452
+ "permissions": {
453
+ "name": "permissions",
454
+ "type": "text",
455
+ "primaryKey": false,
456
+ "notNull": false,
457
+ "autoincrement": false
458
+ },
459
+ "metadata": {
460
+ "name": "metadata",
461
+ "type": "text",
462
+ "primaryKey": false,
463
+ "notNull": false,
464
+ "autoincrement": false
465
+ }
466
+ },
467
+ "indexes": {
468
+ "apikey_owner": {
469
+ "name": "apikey_owner",
470
+ "columns": [
471
+ "referenceId"
472
+ ],
473
+ "isUnique": false
474
+ },
475
+ "apikey_config": {
476
+ "name": "apikey_config",
477
+ "columns": [
478
+ "configId"
479
+ ],
480
+ "isUnique": false
481
+ },
482
+ "apikey_hash": {
483
+ "name": "apikey_hash",
484
+ "columns": [
485
+ "key"
486
+ ],
487
+ "isUnique": true
488
+ }
489
+ },
490
+ "foreignKeys": {
491
+ "apikey_referenceId_user_id_fk": {
492
+ "name": "apikey_referenceId_user_id_fk",
493
+ "tableFrom": "apikey",
494
+ "tableTo": "user",
495
+ "columnsFrom": [
496
+ "referenceId"
497
+ ],
498
+ "columnsTo": [
499
+ "id"
500
+ ],
501
+ "onDelete": "cascade",
502
+ "onUpdate": "no action"
503
+ }
504
+ },
505
+ "compositePrimaryKeys": {},
506
+ "uniqueConstraints": {},
507
+ "checkConstraints": {}
508
+ },
509
+ "audit": {
510
+ "name": "audit",
511
+ "columns": {
512
+ "id": {
513
+ "name": "id",
514
+ "type": "text",
515
+ "primaryKey": true,
516
+ "notNull": true,
517
+ "autoincrement": false
518
+ },
519
+ "action": {
520
+ "name": "action",
521
+ "type": "text",
522
+ "primaryKey": false,
523
+ "notNull": true,
524
+ "autoincrement": false
525
+ },
526
+ "actor": {
527
+ "name": "actor",
528
+ "type": "text",
529
+ "primaryKey": false,
530
+ "notNull": true,
531
+ "autoincrement": false
532
+ },
533
+ "detail": {
534
+ "name": "detail",
535
+ "type": "text",
536
+ "primaryKey": false,
537
+ "notNull": true,
538
+ "autoincrement": false
539
+ },
540
+ "createdAt": {
541
+ "name": "createdAt",
542
+ "type": "integer",
543
+ "primaryKey": false,
544
+ "notNull": true,
545
+ "autoincrement": false
546
+ }
547
+ },
548
+ "indexes": {},
549
+ "foreignKeys": {},
550
+ "compositePrimaryKeys": {},
551
+ "uniqueConstraints": {},
552
+ "checkConstraints": {}
553
+ },
554
+ "documents": {
555
+ "name": "documents",
556
+ "columns": {
557
+ "id": {
558
+ "name": "id",
559
+ "type": "text",
560
+ "primaryKey": true,
561
+ "notNull": true,
562
+ "autoincrement": false
563
+ },
564
+ "blueprint": {
565
+ "name": "blueprint",
566
+ "type": "text",
567
+ "primaryKey": false,
568
+ "notNull": true,
569
+ "autoincrement": false
570
+ },
571
+ "singleton": {
572
+ "name": "singleton",
573
+ "type": "text",
574
+ "primaryKey": false,
575
+ "notNull": false,
576
+ "autoincrement": false
577
+ },
578
+ "draft": {
579
+ "name": "draft",
580
+ "type": "text",
581
+ "primaryKey": false,
582
+ "notNull": true,
583
+ "autoincrement": false
584
+ },
585
+ "published": {
586
+ "name": "published",
587
+ "type": "text",
588
+ "primaryKey": false,
589
+ "notNull": false,
590
+ "autoincrement": false
591
+ },
592
+ "draftSlug": {
593
+ "name": "draftSlug",
594
+ "type": "text",
595
+ "primaryKey": false,
596
+ "notNull": false,
597
+ "autoincrement": false
598
+ },
599
+ "publishedSlug": {
600
+ "name": "publishedSlug",
601
+ "type": "text",
602
+ "primaryKey": false,
603
+ "notNull": false,
604
+ "autoincrement": false
605
+ },
606
+ "version": {
607
+ "name": "version",
608
+ "type": "integer",
609
+ "primaryKey": false,
610
+ "notNull": true,
611
+ "autoincrement": false,
612
+ "default": 1
613
+ },
614
+ "publishedAt": {
615
+ "name": "publishedAt",
616
+ "type": "integer",
617
+ "primaryKey": false,
618
+ "notNull": false,
619
+ "autoincrement": false
620
+ },
621
+ "updatedAt": {
622
+ "name": "updatedAt",
623
+ "type": "integer",
624
+ "primaryKey": false,
625
+ "notNull": true,
626
+ "autoincrement": false
627
+ },
628
+ "createdAt": {
629
+ "name": "createdAt",
630
+ "type": "integer",
631
+ "primaryKey": false,
632
+ "notNull": true,
633
+ "autoincrement": false
634
+ }
635
+ },
636
+ "indexes": {
637
+ "documents_singleton_unique": {
638
+ "name": "documents_singleton_unique",
639
+ "columns": [
640
+ "singleton"
641
+ ],
642
+ "isUnique": true
643
+ },
644
+ "draft_slug": {
645
+ "name": "draft_slug",
646
+ "columns": [
647
+ "blueprint",
648
+ "draftSlug"
649
+ ],
650
+ "isUnique": true
651
+ },
652
+ "published_slug": {
653
+ "name": "published_slug",
654
+ "columns": [
655
+ "blueprint",
656
+ "publishedSlug"
657
+ ],
658
+ "isUnique": true
659
+ },
660
+ "documents_blueprint": {
661
+ "name": "documents_blueprint",
662
+ "columns": [
663
+ "blueprint"
664
+ ],
665
+ "isUnique": false
666
+ },
667
+ "documents_api_page": {
668
+ "name": "documents_api_page",
669
+ "columns": [
670
+ "blueprint",
671
+ "updatedAt",
672
+ "id"
673
+ ],
674
+ "isUnique": false
675
+ }
676
+ },
677
+ "foreignKeys": {},
678
+ "compositePrimaryKeys": {},
679
+ "uniqueConstraints": {},
680
+ "checkConstraints": {}
681
+ },
682
+ "form_notifications": {
683
+ "name": "form_notifications",
684
+ "columns": {
685
+ "formId": {
686
+ "name": "formId",
687
+ "type": "text",
688
+ "primaryKey": true,
689
+ "notNull": true,
690
+ "autoincrement": false
691
+ },
692
+ "settings": {
693
+ "name": "settings",
694
+ "type": "text",
695
+ "primaryKey": false,
696
+ "notNull": true,
697
+ "autoincrement": false
698
+ }
699
+ },
700
+ "indexes": {},
701
+ "foreignKeys": {},
702
+ "compositePrimaryKeys": {},
703
+ "uniqueConstraints": {},
704
+ "checkConstraints": {}
705
+ },
706
+ "jobs": {
707
+ "name": "jobs",
708
+ "columns": {
709
+ "id": {
710
+ "name": "id",
711
+ "type": "text",
712
+ "primaryKey": true,
713
+ "notNull": true,
714
+ "autoincrement": false
715
+ },
716
+ "mediaId": {
717
+ "name": "mediaId",
718
+ "type": "text",
719
+ "primaryKey": false,
720
+ "notNull": true,
721
+ "autoincrement": false
722
+ },
723
+ "version": {
724
+ "name": "version",
725
+ "type": "text",
726
+ "primaryKey": false,
727
+ "notNull": true,
728
+ "autoincrement": false
729
+ },
730
+ "spec": {
731
+ "name": "spec",
732
+ "type": "text",
733
+ "primaryKey": false,
734
+ "notNull": true,
735
+ "autoincrement": false
736
+ },
737
+ "status": {
738
+ "name": "status",
739
+ "type": "text",
740
+ "primaryKey": false,
741
+ "notNull": true,
742
+ "autoincrement": false,
743
+ "default": "'pending'"
744
+ },
745
+ "attempts": {
746
+ "name": "attempts",
747
+ "type": "integer",
748
+ "primaryKey": false,
749
+ "notNull": true,
750
+ "autoincrement": false,
751
+ "default": 0
752
+ },
753
+ "leaseUntil": {
754
+ "name": "leaseUntil",
755
+ "type": "integer",
756
+ "primaryKey": false,
757
+ "notNull": true,
758
+ "autoincrement": false,
759
+ "default": 0
760
+ },
761
+ "nextAttempt": {
762
+ "name": "nextAttempt",
763
+ "type": "integer",
764
+ "primaryKey": false,
765
+ "notNull": true,
766
+ "autoincrement": false,
767
+ "default": 0
768
+ },
769
+ "error": {
770
+ "name": "error",
771
+ "type": "text",
772
+ "primaryKey": false,
773
+ "notNull": false,
774
+ "autoincrement": false
775
+ },
776
+ "result": {
777
+ "name": "result",
778
+ "type": "text",
779
+ "primaryKey": false,
780
+ "notNull": false,
781
+ "autoincrement": false
782
+ }
783
+ },
784
+ "indexes": {
785
+ "job_due": {
786
+ "name": "job_due",
787
+ "columns": [
788
+ "status",
789
+ "nextAttempt"
790
+ ],
791
+ "isUnique": false
792
+ }
793
+ },
794
+ "foreignKeys": {
795
+ "jobs_mediaId_media_id_fk": {
796
+ "name": "jobs_mediaId_media_id_fk",
797
+ "tableFrom": "jobs",
798
+ "tableTo": "media",
799
+ "columnsFrom": [
800
+ "mediaId"
801
+ ],
802
+ "columnsTo": [
803
+ "id"
804
+ ],
805
+ "onDelete": "cascade",
806
+ "onUpdate": "no action"
807
+ }
808
+ },
809
+ "compositePrimaryKeys": {},
810
+ "uniqueConstraints": {},
811
+ "checkConstraints": {}
812
+ },
813
+ "media": {
814
+ "name": "media",
815
+ "columns": {
816
+ "blueprint": {
817
+ "name": "blueprint",
818
+ "type": "text",
819
+ "primaryKey": false,
820
+ "notNull": true,
821
+ "autoincrement": false
822
+ },
823
+ "metadata": {
824
+ "name": "metadata",
825
+ "type": "text",
826
+ "primaryKey": false,
827
+ "notNull": true,
828
+ "autoincrement": false,
829
+ "default": "'{}'"
830
+ },
831
+ "id": {
832
+ "name": "id",
833
+ "type": "text",
834
+ "primaryKey": true,
835
+ "notNull": true,
836
+ "autoincrement": false
837
+ },
838
+ "filename": {
839
+ "name": "filename",
840
+ "type": "text",
841
+ "primaryKey": false,
842
+ "notNull": true,
843
+ "autoincrement": false
844
+ },
845
+ "mime": {
846
+ "name": "mime",
847
+ "type": "text",
848
+ "primaryKey": false,
849
+ "notNull": true,
850
+ "autoincrement": false
851
+ },
852
+ "bytes": {
853
+ "name": "bytes",
854
+ "type": "integer",
855
+ "primaryKey": false,
856
+ "notNull": true,
857
+ "autoincrement": false
858
+ },
859
+ "status": {
860
+ "name": "status",
861
+ "type": "text",
862
+ "primaryKey": false,
863
+ "notNull": true,
864
+ "autoincrement": false
865
+ },
866
+ "activeVersion": {
867
+ "name": "activeVersion",
868
+ "type": "text",
869
+ "primaryKey": false,
870
+ "notNull": false,
871
+ "autoincrement": false
872
+ },
873
+ "targetVersion": {
874
+ "name": "targetVersion",
875
+ "type": "text",
876
+ "primaryKey": false,
877
+ "notNull": true,
878
+ "autoincrement": false
879
+ },
880
+ "variants": {
881
+ "name": "variants",
882
+ "type": "text",
883
+ "primaryKey": false,
884
+ "notNull": true,
885
+ "autoincrement": false,
886
+ "default": "'[]'"
887
+ },
888
+ "error": {
889
+ "name": "error",
890
+ "type": "text",
891
+ "primaryKey": false,
892
+ "notNull": false,
893
+ "autoincrement": false
894
+ },
895
+ "createdAt": {
896
+ "name": "createdAt",
897
+ "type": "integer",
898
+ "primaryKey": false,
899
+ "notNull": true,
900
+ "autoincrement": false
901
+ }
902
+ },
903
+ "indexes": {
904
+ "media_api_page": {
905
+ "name": "media_api_page",
906
+ "columns": [
907
+ "createdAt",
908
+ "id"
909
+ ],
910
+ "isUnique": false
911
+ }
912
+ },
913
+ "foreignKeys": {},
914
+ "compositePrimaryKeys": {},
915
+ "uniqueConstraints": {},
916
+ "checkConstraints": {}
917
+ },
918
+ "media_deletions": {
919
+ "name": "media_deletions",
920
+ "columns": {
921
+ "mediaId": {
922
+ "name": "mediaId",
923
+ "type": "text",
924
+ "primaryKey": true,
925
+ "notNull": true,
926
+ "autoincrement": false
927
+ },
928
+ "attempts": {
929
+ "name": "attempts",
930
+ "type": "integer",
931
+ "primaryKey": false,
932
+ "notNull": true,
933
+ "autoincrement": false,
934
+ "default": 0
935
+ },
936
+ "nextAttempt": {
937
+ "name": "nextAttempt",
938
+ "type": "integer",
939
+ "primaryKey": false,
940
+ "notNull": true,
941
+ "autoincrement": false,
942
+ "default": 0
943
+ },
944
+ "leaseUntil": {
945
+ "name": "leaseUntil",
946
+ "type": "integer",
947
+ "primaryKey": false,
948
+ "notNull": true,
949
+ "autoincrement": false,
950
+ "default": 0
951
+ }
952
+ },
953
+ "indexes": {},
954
+ "foreignKeys": {
955
+ "media_deletions_mediaId_media_id_fk": {
956
+ "name": "media_deletions_mediaId_media_id_fk",
957
+ "tableFrom": "media_deletions",
958
+ "tableTo": "media",
959
+ "columnsFrom": [
960
+ "mediaId"
961
+ ],
962
+ "columnsTo": [
963
+ "id"
964
+ ],
965
+ "onDelete": "cascade",
966
+ "onUpdate": "no action"
967
+ }
968
+ },
969
+ "compositePrimaryKeys": {},
970
+ "uniqueConstraints": {},
971
+ "checkConstraints": {}
972
+ },
973
+ "rate_limits": {
974
+ "name": "rate_limits",
975
+ "columns": {
976
+ "key": {
977
+ "name": "key",
978
+ "type": "text",
979
+ "primaryKey": true,
980
+ "notNull": true,
981
+ "autoincrement": false
982
+ },
983
+ "count": {
984
+ "name": "count",
985
+ "type": "integer",
986
+ "primaryKey": false,
987
+ "notNull": true,
988
+ "autoincrement": false
989
+ },
990
+ "resetAt": {
991
+ "name": "resetAt",
992
+ "type": "integer",
993
+ "primaryKey": false,
994
+ "notNull": true,
995
+ "autoincrement": false
996
+ }
997
+ },
998
+ "indexes": {},
999
+ "foreignKeys": {},
1000
+ "compositePrimaryKeys": {},
1001
+ "uniqueConstraints": {},
1002
+ "checkConstraints": {}
1003
+ },
1004
+ "content_references": {
1005
+ "name": "content_references",
1006
+ "columns": {
1007
+ "id": {
1008
+ "name": "id",
1009
+ "type": "text",
1010
+ "primaryKey": true,
1011
+ "notNull": true,
1012
+ "autoincrement": false
1013
+ },
1014
+ "documentId": {
1015
+ "name": "documentId",
1016
+ "type": "text",
1017
+ "primaryKey": false,
1018
+ "notNull": true,
1019
+ "autoincrement": false
1020
+ },
1021
+ "targetId": {
1022
+ "name": "targetId",
1023
+ "type": "text",
1024
+ "primaryKey": false,
1025
+ "notNull": true,
1026
+ "autoincrement": false
1027
+ },
1028
+ "kind": {
1029
+ "name": "kind",
1030
+ "type": "text",
1031
+ "primaryKey": false,
1032
+ "notNull": true,
1033
+ "autoincrement": false
1034
+ },
1035
+ "snapshot": {
1036
+ "name": "snapshot",
1037
+ "type": "text",
1038
+ "primaryKey": false,
1039
+ "notNull": true,
1040
+ "autoincrement": false
1041
+ }
1042
+ },
1043
+ "indexes": {
1044
+ "reference_target": {
1045
+ "name": "reference_target",
1046
+ "columns": [
1047
+ "targetId"
1048
+ ],
1049
+ "isUnique": false
1050
+ }
1051
+ },
1052
+ "foreignKeys": {
1053
+ "content_references_documentId_documents_id_fk": {
1054
+ "name": "content_references_documentId_documents_id_fk",
1055
+ "tableFrom": "content_references",
1056
+ "tableTo": "documents",
1057
+ "columnsFrom": [
1058
+ "documentId"
1059
+ ],
1060
+ "columnsTo": [
1061
+ "id"
1062
+ ],
1063
+ "onDelete": "cascade",
1064
+ "onUpdate": "no action"
1065
+ }
1066
+ },
1067
+ "compositePrimaryKeys": {},
1068
+ "uniqueConstraints": {},
1069
+ "checkConstraints": {}
1070
+ },
1071
+ "session": {
1072
+ "name": "session",
1073
+ "columns": {
1074
+ "id": {
1075
+ "name": "id",
1076
+ "type": "text",
1077
+ "primaryKey": true,
1078
+ "notNull": true,
1079
+ "autoincrement": false
1080
+ },
1081
+ "expiresAt": {
1082
+ "name": "expiresAt",
1083
+ "type": "integer",
1084
+ "primaryKey": false,
1085
+ "notNull": true,
1086
+ "autoincrement": false
1087
+ },
1088
+ "token": {
1089
+ "name": "token",
1090
+ "type": "text",
1091
+ "primaryKey": false,
1092
+ "notNull": true,
1093
+ "autoincrement": false
1094
+ },
1095
+ "createdAt": {
1096
+ "name": "createdAt",
1097
+ "type": "integer",
1098
+ "primaryKey": false,
1099
+ "notNull": true,
1100
+ "autoincrement": false
1101
+ },
1102
+ "updatedAt": {
1103
+ "name": "updatedAt",
1104
+ "type": "integer",
1105
+ "primaryKey": false,
1106
+ "notNull": true,
1107
+ "autoincrement": false
1108
+ },
1109
+ "ipAddress": {
1110
+ "name": "ipAddress",
1111
+ "type": "text",
1112
+ "primaryKey": false,
1113
+ "notNull": false,
1114
+ "autoincrement": false
1115
+ },
1116
+ "userAgent": {
1117
+ "name": "userAgent",
1118
+ "type": "text",
1119
+ "primaryKey": false,
1120
+ "notNull": false,
1121
+ "autoincrement": false
1122
+ },
1123
+ "userId": {
1124
+ "name": "userId",
1125
+ "type": "text",
1126
+ "primaryKey": false,
1127
+ "notNull": true,
1128
+ "autoincrement": false
1129
+ }
1130
+ },
1131
+ "indexes": {
1132
+ "session_token_unique": {
1133
+ "name": "session_token_unique",
1134
+ "columns": [
1135
+ "token"
1136
+ ],
1137
+ "isUnique": true
1138
+ },
1139
+ "session_user": {
1140
+ "name": "session_user",
1141
+ "columns": [
1142
+ "userId"
1143
+ ],
1144
+ "isUnique": false
1145
+ }
1146
+ },
1147
+ "foreignKeys": {
1148
+ "session_userId_user_id_fk": {
1149
+ "name": "session_userId_user_id_fk",
1150
+ "tableFrom": "session",
1151
+ "tableTo": "user",
1152
+ "columnsFrom": [
1153
+ "userId"
1154
+ ],
1155
+ "columnsTo": [
1156
+ "id"
1157
+ ],
1158
+ "onDelete": "cascade",
1159
+ "onUpdate": "no action"
1160
+ }
1161
+ },
1162
+ "compositePrimaryKeys": {},
1163
+ "uniqueConstraints": {},
1164
+ "checkConstraints": {}
1165
+ },
1166
+ "submissions": {
1167
+ "name": "submissions",
1168
+ "columns": {
1169
+ "id": {
1170
+ "name": "id",
1171
+ "type": "text",
1172
+ "primaryKey": true,
1173
+ "notNull": true,
1174
+ "autoincrement": false
1175
+ },
1176
+ "formId": {
1177
+ "name": "formId",
1178
+ "type": "text",
1179
+ "primaryKey": false,
1180
+ "notNull": true,
1181
+ "autoincrement": false
1182
+ },
1183
+ "data": {
1184
+ "name": "data",
1185
+ "type": "text",
1186
+ "primaryKey": false,
1187
+ "notNull": true,
1188
+ "autoincrement": false
1189
+ },
1190
+ "schema": {
1191
+ "name": "schema",
1192
+ "type": "text",
1193
+ "primaryKey": false,
1194
+ "notNull": true,
1195
+ "autoincrement": false
1196
+ },
1197
+ "read": {
1198
+ "name": "read",
1199
+ "type": "integer",
1200
+ "primaryKey": false,
1201
+ "notNull": true,
1202
+ "autoincrement": false,
1203
+ "default": false
1204
+ },
1205
+ "notification": {
1206
+ "name": "notification",
1207
+ "type": "text",
1208
+ "primaryKey": false,
1209
+ "notNull": false,
1210
+ "autoincrement": false
1211
+ },
1212
+ "createdAt": {
1213
+ "name": "createdAt",
1214
+ "type": "integer",
1215
+ "primaryKey": false,
1216
+ "notNull": true,
1217
+ "autoincrement": false
1218
+ }
1219
+ },
1220
+ "indexes": {
1221
+ "submission_form": {
1222
+ "name": "submission_form",
1223
+ "columns": [
1224
+ "formId",
1225
+ "createdAt"
1226
+ ],
1227
+ "isUnique": false
1228
+ }
1229
+ },
1230
+ "foreignKeys": {},
1231
+ "compositePrimaryKeys": {},
1232
+ "uniqueConstraints": {},
1233
+ "checkConstraints": {}
1234
+ },
1235
+ "twoFactor": {
1236
+ "name": "twoFactor",
1237
+ "columns": {
1238
+ "id": {
1239
+ "name": "id",
1240
+ "type": "text",
1241
+ "primaryKey": true,
1242
+ "notNull": true,
1243
+ "autoincrement": false
1244
+ },
1245
+ "secret": {
1246
+ "name": "secret",
1247
+ "type": "text",
1248
+ "primaryKey": false,
1249
+ "notNull": true,
1250
+ "autoincrement": false
1251
+ },
1252
+ "backupCodes": {
1253
+ "name": "backupCodes",
1254
+ "type": "text",
1255
+ "primaryKey": false,
1256
+ "notNull": true,
1257
+ "autoincrement": false
1258
+ },
1259
+ "userId": {
1260
+ "name": "userId",
1261
+ "type": "text",
1262
+ "primaryKey": false,
1263
+ "notNull": true,
1264
+ "autoincrement": false
1265
+ },
1266
+ "verified": {
1267
+ "name": "verified",
1268
+ "type": "integer",
1269
+ "primaryKey": false,
1270
+ "notNull": false,
1271
+ "autoincrement": false,
1272
+ "default": true
1273
+ },
1274
+ "failedVerificationCount": {
1275
+ "name": "failedVerificationCount",
1276
+ "type": "integer",
1277
+ "primaryKey": false,
1278
+ "notNull": false,
1279
+ "autoincrement": false,
1280
+ "default": 0
1281
+ },
1282
+ "lockedUntil": {
1283
+ "name": "lockedUntil",
1284
+ "type": "integer",
1285
+ "primaryKey": false,
1286
+ "notNull": false,
1287
+ "autoincrement": false
1288
+ }
1289
+ },
1290
+ "indexes": {
1291
+ "twofactor_user": {
1292
+ "name": "twofactor_user",
1293
+ "columns": [
1294
+ "userId"
1295
+ ],
1296
+ "isUnique": false
1297
+ },
1298
+ "twofactor_secret": {
1299
+ "name": "twofactor_secret",
1300
+ "columns": [
1301
+ "secret"
1302
+ ],
1303
+ "isUnique": false
1304
+ }
1305
+ },
1306
+ "foreignKeys": {
1307
+ "twoFactor_userId_user_id_fk": {
1308
+ "name": "twoFactor_userId_user_id_fk",
1309
+ "tableFrom": "twoFactor",
1310
+ "tableTo": "user",
1311
+ "columnsFrom": [
1312
+ "userId"
1313
+ ],
1314
+ "columnsTo": [
1315
+ "id"
1316
+ ],
1317
+ "onDelete": "cascade",
1318
+ "onUpdate": "no action"
1319
+ }
1320
+ },
1321
+ "compositePrimaryKeys": {},
1322
+ "uniqueConstraints": {},
1323
+ "checkConstraints": {}
1324
+ },
1325
+ "upload_sessions": {
1326
+ "name": "upload_sessions",
1327
+ "columns": {
1328
+ "mediaId": {
1329
+ "name": "mediaId",
1330
+ "type": "text",
1331
+ "primaryKey": true,
1332
+ "notNull": true,
1333
+ "autoincrement": false
1334
+ },
1335
+ "attempt": {
1336
+ "name": "attempt",
1337
+ "type": "text",
1338
+ "primaryKey": false,
1339
+ "notNull": true,
1340
+ "autoincrement": false
1341
+ },
1342
+ "expiresAt": {
1343
+ "name": "expiresAt",
1344
+ "type": "integer",
1345
+ "primaryKey": false,
1346
+ "notNull": true,
1347
+ "autoincrement": false
1348
+ },
1349
+ "status": {
1350
+ "name": "status",
1351
+ "type": "text",
1352
+ "primaryKey": false,
1353
+ "notNull": true,
1354
+ "autoincrement": false,
1355
+ "default": "'uploading'"
1356
+ },
1357
+ "attempts": {
1358
+ "name": "attempts",
1359
+ "type": "integer",
1360
+ "primaryKey": false,
1361
+ "notNull": true,
1362
+ "autoincrement": false,
1363
+ "default": 0
1364
+ },
1365
+ "nextAttempt": {
1366
+ "name": "nextAttempt",
1367
+ "type": "integer",
1368
+ "primaryKey": false,
1369
+ "notNull": true,
1370
+ "autoincrement": false,
1371
+ "default": 0
1372
+ },
1373
+ "leaseUntil": {
1374
+ "name": "leaseUntil",
1375
+ "type": "integer",
1376
+ "primaryKey": false,
1377
+ "notNull": true,
1378
+ "autoincrement": false,
1379
+ "default": 0
1380
+ }
1381
+ },
1382
+ "indexes": {},
1383
+ "foreignKeys": {
1384
+ "upload_sessions_mediaId_media_id_fk": {
1385
+ "name": "upload_sessions_mediaId_media_id_fk",
1386
+ "tableFrom": "upload_sessions",
1387
+ "tableTo": "media",
1388
+ "columnsFrom": [
1389
+ "mediaId"
1390
+ ],
1391
+ "columnsTo": [
1392
+ "id"
1393
+ ],
1394
+ "onDelete": "cascade",
1395
+ "onUpdate": "no action"
1396
+ }
1397
+ },
1398
+ "compositePrimaryKeys": {},
1399
+ "uniqueConstraints": {},
1400
+ "checkConstraints": {}
1401
+ },
1402
+ "uploads": {
1403
+ "name": "uploads",
1404
+ "columns": {
1405
+ "mediaId": {
1406
+ "name": "mediaId",
1407
+ "type": "text",
1408
+ "primaryKey": true,
1409
+ "notNull": true,
1410
+ "autoincrement": false
1411
+ },
1412
+ "body": {
1413
+ "name": "body",
1414
+ "type": "blob",
1415
+ "primaryKey": false,
1416
+ "notNull": true,
1417
+ "autoincrement": false
1418
+ },
1419
+ "attempts": {
1420
+ "name": "attempts",
1421
+ "type": "integer",
1422
+ "primaryKey": false,
1423
+ "notNull": true,
1424
+ "autoincrement": false,
1425
+ "default": 0
1426
+ },
1427
+ "nextAttempt": {
1428
+ "name": "nextAttempt",
1429
+ "type": "integer",
1430
+ "primaryKey": false,
1431
+ "notNull": true,
1432
+ "autoincrement": false,
1433
+ "default": 0
1434
+ },
1435
+ "leaseUntil": {
1436
+ "name": "leaseUntil",
1437
+ "type": "integer",
1438
+ "primaryKey": false,
1439
+ "notNull": true,
1440
+ "autoincrement": false,
1441
+ "default": 0
1442
+ }
1443
+ },
1444
+ "indexes": {},
1445
+ "foreignKeys": {
1446
+ "uploads_mediaId_media_id_fk": {
1447
+ "name": "uploads_mediaId_media_id_fk",
1448
+ "tableFrom": "uploads",
1449
+ "tableTo": "media",
1450
+ "columnsFrom": [
1451
+ "mediaId"
1452
+ ],
1453
+ "columnsTo": [
1454
+ "id"
1455
+ ],
1456
+ "onDelete": "cascade",
1457
+ "onUpdate": "no action"
1458
+ }
1459
+ },
1460
+ "compositePrimaryKeys": {},
1461
+ "uniqueConstraints": {},
1462
+ "checkConstraints": {}
1463
+ },
1464
+ "user": {
1465
+ "name": "user",
1466
+ "columns": {
1467
+ "id": {
1468
+ "name": "id",
1469
+ "type": "text",
1470
+ "primaryKey": true,
1471
+ "notNull": true,
1472
+ "autoincrement": false
1473
+ },
1474
+ "name": {
1475
+ "name": "name",
1476
+ "type": "text",
1477
+ "primaryKey": false,
1478
+ "notNull": true,
1479
+ "autoincrement": false
1480
+ },
1481
+ "email": {
1482
+ "name": "email",
1483
+ "type": "text",
1484
+ "primaryKey": false,
1485
+ "notNull": true,
1486
+ "autoincrement": false
1487
+ },
1488
+ "emailVerified": {
1489
+ "name": "emailVerified",
1490
+ "type": "integer",
1491
+ "primaryKey": false,
1492
+ "notNull": true,
1493
+ "autoincrement": false,
1494
+ "default": false
1495
+ },
1496
+ "image": {
1497
+ "name": "image",
1498
+ "type": "text",
1499
+ "primaryKey": false,
1500
+ "notNull": false,
1501
+ "autoincrement": false
1502
+ },
1503
+ "createdAt": {
1504
+ "name": "createdAt",
1505
+ "type": "integer",
1506
+ "primaryKey": false,
1507
+ "notNull": true,
1508
+ "autoincrement": false
1509
+ },
1510
+ "updatedAt": {
1511
+ "name": "updatedAt",
1512
+ "type": "integer",
1513
+ "primaryKey": false,
1514
+ "notNull": true,
1515
+ "autoincrement": false
1516
+ },
1517
+ "role": {
1518
+ "name": "role",
1519
+ "type": "text",
1520
+ "primaryKey": false,
1521
+ "notNull": true,
1522
+ "autoincrement": false,
1523
+ "default": "'editor'"
1524
+ },
1525
+ "mustChangePassword": {
1526
+ "name": "mustChangePassword",
1527
+ "type": "integer",
1528
+ "primaryKey": false,
1529
+ "notNull": true,
1530
+ "autoincrement": false,
1531
+ "default": true
1532
+ },
1533
+ "twoFactorEnabled": {
1534
+ "name": "twoFactorEnabled",
1535
+ "type": "integer",
1536
+ "primaryKey": false,
1537
+ "notNull": false,
1538
+ "autoincrement": false,
1539
+ "default": false
1540
+ }
1541
+ },
1542
+ "indexes": {
1543
+ "user_email_unique": {
1544
+ "name": "user_email_unique",
1545
+ "columns": [
1546
+ "email"
1547
+ ],
1548
+ "isUnique": true
1549
+ }
1550
+ },
1551
+ "foreignKeys": {},
1552
+ "compositePrimaryKeys": {},
1553
+ "uniqueConstraints": {},
1554
+ "checkConstraints": {}
1555
+ },
1556
+ "verification": {
1557
+ "name": "verification",
1558
+ "columns": {
1559
+ "id": {
1560
+ "name": "id",
1561
+ "type": "text",
1562
+ "primaryKey": true,
1563
+ "notNull": true,
1564
+ "autoincrement": false
1565
+ },
1566
+ "identifier": {
1567
+ "name": "identifier",
1568
+ "type": "text",
1569
+ "primaryKey": false,
1570
+ "notNull": true,
1571
+ "autoincrement": false
1572
+ },
1573
+ "value": {
1574
+ "name": "value",
1575
+ "type": "text",
1576
+ "primaryKey": false,
1577
+ "notNull": true,
1578
+ "autoincrement": false
1579
+ },
1580
+ "expiresAt": {
1581
+ "name": "expiresAt",
1582
+ "type": "integer",
1583
+ "primaryKey": false,
1584
+ "notNull": true,
1585
+ "autoincrement": false
1586
+ },
1587
+ "createdAt": {
1588
+ "name": "createdAt",
1589
+ "type": "integer",
1590
+ "primaryKey": false,
1591
+ "notNull": true,
1592
+ "autoincrement": false
1593
+ },
1594
+ "updatedAt": {
1595
+ "name": "updatedAt",
1596
+ "type": "integer",
1597
+ "primaryKey": false,
1598
+ "notNull": true,
1599
+ "autoincrement": false
1600
+ }
1601
+ },
1602
+ "indexes": {
1603
+ "verification_identifier": {
1604
+ "name": "verification_identifier",
1605
+ "columns": [
1606
+ "identifier"
1607
+ ],
1608
+ "isUnique": false
1609
+ }
1610
+ },
1611
+ "foreignKeys": {},
1612
+ "compositePrimaryKeys": {},
1613
+ "uniqueConstraints": {},
1614
+ "checkConstraints": {}
1615
+ }
1616
+ },
1617
+ "views": {},
1618
+ "enums": {},
1619
+ "_meta": {
1620
+ "schemas": {},
1621
+ "tables": {},
1622
+ "columns": {}
1623
+ },
1624
+ "internal": {
1625
+ "indexes": {}
1626
+ }
1627
+ }