@jant/core 0.3.44 → 0.3.46

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 (62) hide show
  1. package/bin/commands/import-site.js +40 -39
  2. package/dist/app-CM7sb3xO.js +5 -0
  3. package/dist/{app-CtJDxZBb.js → app-DB-P66E5.js} +147 -203
  4. package/dist/client/.vite/manifest.json +3 -3
  5. package/dist/client/_assets/client-DDs6NzB3.css +2 -0
  6. package/dist/client/_assets/{client-auth-CXILhW1b.js → client-auth-BLCUje4M.js} +193 -174
  7. package/dist/client/_assets/{client-D95FNDg5.js → client-dSfWfMe9.js} +7 -7
  8. package/dist/{github-sync-7y_nTXx1.js → github-sync-CQ1x271f.js} +3 -0
  9. package/dist/index.js +4 -87
  10. package/dist/node.js +3 -3
  11. package/package.json +1 -1
  12. package/src/__tests__/import-site-command.test.ts +18 -0
  13. package/src/client/components/jant-compose-dialog.ts +94 -15
  14. package/src/client/components/jant-compose-editor.ts +11 -6
  15. package/src/client/components/jant-post-menu.ts +23 -5
  16. package/src/client/compose-bridge.ts +2 -1
  17. package/src/client/random-uuid.ts +23 -0
  18. package/src/client/toast.ts +29 -2
  19. package/src/client/upload-session.ts +1 -1
  20. package/src/db/migrations/0020_free_zaladane.sql +1 -0
  21. package/src/db/migrations/meta/0020_snapshot.json +2129 -0
  22. package/src/db/migrations/meta/_journal.json +7 -0
  23. package/src/db/migrations/pg/0018_red_warlock.sql +1 -0
  24. package/src/db/migrations/pg/meta/0018_snapshot.json +2739 -0
  25. package/src/db/migrations/pg/meta/_journal.json +7 -0
  26. package/src/db/pg/schema.ts +0 -30
  27. package/src/db/schema.ts +0 -39
  28. package/src/i18n/locales/public/en.po +10 -5
  29. package/src/i18n/locales/public/en.ts +1 -1
  30. package/src/i18n/locales/public/zh-Hans.po +10 -5
  31. package/src/i18n/locales/public/zh-Hans.ts +1 -1
  32. package/src/i18n/locales/public/zh-Hant.po +10 -5
  33. package/src/i18n/locales/public/zh-Hant.ts +1 -1
  34. package/src/index.ts +0 -3
  35. package/src/lib/__tests__/resolve-config.test.ts +4 -4
  36. package/src/lib/__tests__/startup-config.test.ts +27 -2
  37. package/src/lib/constants.ts +1 -0
  38. package/src/lib/github-sync-trigger.ts +7 -51
  39. package/src/lib/startup-config.ts +53 -6
  40. package/src/routes/api/github-sync.tsx +36 -14
  41. package/src/routes/pages/home.tsx +2 -0
  42. package/src/routes/pages/latest.tsx +2 -0
  43. package/src/runtime/__tests__/readiness.test.ts +34 -0
  44. package/src/runtime/readiness.ts +8 -4
  45. package/src/services/__tests__/collection.test.ts +13 -11
  46. package/src/services/github-sync.ts +6 -0
  47. package/src/styles/components.css +14 -0
  48. package/src/styles/ui.css +97 -0
  49. package/src/types/bindings.ts +0 -2
  50. package/src/types/config.ts +1 -1
  51. package/src/types/props.ts +2 -0
  52. package/src/ui/__tests__/font-themes.test.ts +2 -2
  53. package/src/ui/dash/settings/SettingsRootContent.tsx +17 -17
  54. package/src/ui/font-themes.ts +17 -17
  55. package/src/ui/pages/HomePage.tsx +18 -5
  56. package/dist/app-BI9bnCkO.js +0 -5
  57. package/dist/client/_assets/client-BQH7AQ24.css +0 -2
  58. package/src/lib/github-sync-queue-handler.ts +0 -69
  59. package/src/lib/github-sync-worker.ts +0 -72
  60. package/src/lib/job-queue-cf.ts +0 -18
  61. package/src/lib/job-queue-db.ts +0 -149
  62. package/src/lib/job-queue.ts +0 -35
@@ -0,0 +1,2129 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "63b04dd1-f05a-40f7-b648-64ad298ef51e",
5
+ "prevId": "bbaf8846-d7be-4e96-bc2d-b26db02dccc0",
6
+ "tables": {
7
+ "account": {
8
+ "name": "account",
9
+ "columns": {
10
+ "id": {
11
+ "name": "id",
12
+ "type": "text",
13
+ "primaryKey": true,
14
+ "notNull": true,
15
+ "autoincrement": false
16
+ },
17
+ "account_id": {
18
+ "name": "account_id",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true,
22
+ "autoincrement": false
23
+ },
24
+ "provider_id": {
25
+ "name": "provider_id",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": true,
29
+ "autoincrement": false
30
+ },
31
+ "user_id": {
32
+ "name": "user_id",
33
+ "type": "text",
34
+ "primaryKey": false,
35
+ "notNull": true,
36
+ "autoincrement": false
37
+ },
38
+ "access_token": {
39
+ "name": "access_token",
40
+ "type": "text",
41
+ "primaryKey": false,
42
+ "notNull": false,
43
+ "autoincrement": false
44
+ },
45
+ "refresh_token": {
46
+ "name": "refresh_token",
47
+ "type": "text",
48
+ "primaryKey": false,
49
+ "notNull": false,
50
+ "autoincrement": false
51
+ },
52
+ "id_token": {
53
+ "name": "id_token",
54
+ "type": "text",
55
+ "primaryKey": false,
56
+ "notNull": false,
57
+ "autoincrement": false
58
+ },
59
+ "access_token_expires_at": {
60
+ "name": "access_token_expires_at",
61
+ "type": "integer",
62
+ "primaryKey": false,
63
+ "notNull": false,
64
+ "autoincrement": false
65
+ },
66
+ "refresh_token_expires_at": {
67
+ "name": "refresh_token_expires_at",
68
+ "type": "integer",
69
+ "primaryKey": false,
70
+ "notNull": false,
71
+ "autoincrement": false
72
+ },
73
+ "scope": {
74
+ "name": "scope",
75
+ "type": "text",
76
+ "primaryKey": false,
77
+ "notNull": false,
78
+ "autoincrement": false
79
+ },
80
+ "password": {
81
+ "name": "password",
82
+ "type": "text",
83
+ "primaryKey": false,
84
+ "notNull": false,
85
+ "autoincrement": false
86
+ },
87
+ "created_at": {
88
+ "name": "created_at",
89
+ "type": "integer",
90
+ "primaryKey": false,
91
+ "notNull": true,
92
+ "autoincrement": false
93
+ },
94
+ "updated_at": {
95
+ "name": "updated_at",
96
+ "type": "integer",
97
+ "primaryKey": false,
98
+ "notNull": true,
99
+ "autoincrement": false
100
+ }
101
+ },
102
+ "indexes": {},
103
+ "foreignKeys": {
104
+ "account_user_id_user_id_fk": {
105
+ "name": "account_user_id_user_id_fk",
106
+ "tableFrom": "account",
107
+ "tableTo": "user",
108
+ "columnsFrom": ["user_id"],
109
+ "columnsTo": ["id"],
110
+ "onDelete": "no action",
111
+ "onUpdate": "no action"
112
+ }
113
+ },
114
+ "compositePrimaryKeys": {},
115
+ "uniqueConstraints": {},
116
+ "checkConstraints": {}
117
+ },
118
+ "api_token": {
119
+ "name": "api_token",
120
+ "columns": {
121
+ "id": {
122
+ "name": "id",
123
+ "type": "text",
124
+ "primaryKey": true,
125
+ "notNull": true,
126
+ "autoincrement": false
127
+ },
128
+ "site_id": {
129
+ "name": "site_id",
130
+ "type": "text",
131
+ "primaryKey": false,
132
+ "notNull": true,
133
+ "autoincrement": false
134
+ },
135
+ "name": {
136
+ "name": "name",
137
+ "type": "text",
138
+ "primaryKey": false,
139
+ "notNull": true,
140
+ "autoincrement": false
141
+ },
142
+ "token_hash": {
143
+ "name": "token_hash",
144
+ "type": "text",
145
+ "primaryKey": false,
146
+ "notNull": true,
147
+ "autoincrement": false
148
+ },
149
+ "prefix": {
150
+ "name": "prefix",
151
+ "type": "text",
152
+ "primaryKey": false,
153
+ "notNull": true,
154
+ "autoincrement": false
155
+ },
156
+ "last_used_at": {
157
+ "name": "last_used_at",
158
+ "type": "integer",
159
+ "primaryKey": false,
160
+ "notNull": false,
161
+ "autoincrement": false
162
+ },
163
+ "created_at": {
164
+ "name": "created_at",
165
+ "type": "integer",
166
+ "primaryKey": false,
167
+ "notNull": true,
168
+ "autoincrement": false
169
+ },
170
+ "updated_at": {
171
+ "name": "updated_at",
172
+ "type": "integer",
173
+ "primaryKey": false,
174
+ "notNull": true,
175
+ "autoincrement": false
176
+ }
177
+ },
178
+ "indexes": {
179
+ "api_token_token_hash_unique": {
180
+ "name": "api_token_token_hash_unique",
181
+ "columns": ["token_hash"],
182
+ "isUnique": true
183
+ },
184
+ "idx_api_token_site_id": {
185
+ "name": "idx_api_token_site_id",
186
+ "columns": ["site_id"],
187
+ "isUnique": false
188
+ }
189
+ },
190
+ "foreignKeys": {
191
+ "api_token_site_id_site_id_fk": {
192
+ "name": "api_token_site_id_site_id_fk",
193
+ "tableFrom": "api_token",
194
+ "tableTo": "site",
195
+ "columnsFrom": ["site_id"],
196
+ "columnsTo": ["id"],
197
+ "onDelete": "cascade",
198
+ "onUpdate": "no action"
199
+ }
200
+ },
201
+ "compositePrimaryKeys": {},
202
+ "uniqueConstraints": {},
203
+ "checkConstraints": {}
204
+ },
205
+ "collection_directory_item": {
206
+ "name": "collection_directory_item",
207
+ "columns": {
208
+ "id": {
209
+ "name": "id",
210
+ "type": "text",
211
+ "primaryKey": true,
212
+ "notNull": true,
213
+ "autoincrement": false
214
+ },
215
+ "site_id": {
216
+ "name": "site_id",
217
+ "type": "text",
218
+ "primaryKey": false,
219
+ "notNull": true,
220
+ "autoincrement": false
221
+ },
222
+ "type": {
223
+ "name": "type",
224
+ "type": "text",
225
+ "primaryKey": false,
226
+ "notNull": true,
227
+ "autoincrement": false
228
+ },
229
+ "collection_id": {
230
+ "name": "collection_id",
231
+ "type": "text",
232
+ "primaryKey": false,
233
+ "notNull": false,
234
+ "autoincrement": false
235
+ },
236
+ "label": {
237
+ "name": "label",
238
+ "type": "text",
239
+ "primaryKey": false,
240
+ "notNull": false,
241
+ "autoincrement": false
242
+ },
243
+ "url": {
244
+ "name": "url",
245
+ "type": "text",
246
+ "primaryKey": false,
247
+ "notNull": false,
248
+ "autoincrement": false
249
+ },
250
+ "description": {
251
+ "name": "description",
252
+ "type": "text",
253
+ "primaryKey": false,
254
+ "notNull": false,
255
+ "autoincrement": false
256
+ },
257
+ "position": {
258
+ "name": "position",
259
+ "type": "text",
260
+ "primaryKey": false,
261
+ "notNull": true,
262
+ "autoincrement": false,
263
+ "default": "'a0'"
264
+ },
265
+ "created_at": {
266
+ "name": "created_at",
267
+ "type": "integer",
268
+ "primaryKey": false,
269
+ "notNull": true,
270
+ "autoincrement": false
271
+ },
272
+ "updated_at": {
273
+ "name": "updated_at",
274
+ "type": "integer",
275
+ "primaryKey": false,
276
+ "notNull": true,
277
+ "autoincrement": false
278
+ }
279
+ },
280
+ "indexes": {
281
+ "idx_collection_directory_item_site_collection_id": {
282
+ "name": "idx_collection_directory_item_site_collection_id",
283
+ "columns": ["site_id", "collection_id"],
284
+ "isUnique": false
285
+ },
286
+ "uq_collection_directory_item_site_position": {
287
+ "name": "uq_collection_directory_item_site_position",
288
+ "columns": ["site_id", "position"],
289
+ "isUnique": true
290
+ },
291
+ "uq_collection_directory_item_site_collection_once": {
292
+ "name": "uq_collection_directory_item_site_collection_once",
293
+ "columns": ["site_id", "collection_id"],
294
+ "isUnique": true,
295
+ "where": "\"collection_directory_item\".\"type\" = 'collection' AND \"collection_directory_item\".\"collection_id\" IS NOT NULL"
296
+ }
297
+ },
298
+ "foreignKeys": {
299
+ "collection_directory_item_site_id_site_id_fk": {
300
+ "name": "collection_directory_item_site_id_site_id_fk",
301
+ "tableFrom": "collection_directory_item",
302
+ "tableTo": "site",
303
+ "columnsFrom": ["site_id"],
304
+ "columnsTo": ["id"],
305
+ "onDelete": "cascade",
306
+ "onUpdate": "no action"
307
+ },
308
+ "collection_directory_item_collection_id_collection_id_fk": {
309
+ "name": "collection_directory_item_collection_id_collection_id_fk",
310
+ "tableFrom": "collection_directory_item",
311
+ "tableTo": "collection",
312
+ "columnsFrom": ["collection_id"],
313
+ "columnsTo": ["id"],
314
+ "onDelete": "cascade",
315
+ "onUpdate": "no action"
316
+ }
317
+ },
318
+ "compositePrimaryKeys": {},
319
+ "uniqueConstraints": {},
320
+ "checkConstraints": {
321
+ "chk_collection_directory_item_type": {
322
+ "name": "chk_collection_directory_item_type",
323
+ "value": "\"collection_directory_item\".\"type\" IN ('collection', 'divider', 'link')"
324
+ },
325
+ "chk_collection_directory_item_shape": {
326
+ "name": "chk_collection_directory_item_shape",
327
+ "value": "(\n \"collection_directory_item\".\"type\" = 'collection'\n AND \"collection_directory_item\".\"collection_id\" IS NOT NULL\n AND \"collection_directory_item\".\"label\" IS NULL\n AND \"collection_directory_item\".\"url\" IS NULL\n ) OR (\n \"collection_directory_item\".\"type\" = 'divider'\n AND \"collection_directory_item\".\"collection_id\" IS NULL\n AND \"collection_directory_item\".\"url\" IS NULL\n ) OR (\n \"collection_directory_item\".\"type\" = 'link'\n AND \"collection_directory_item\".\"collection_id\" IS NULL\n AND \"collection_directory_item\".\"label\" IS NOT NULL\n AND \"collection_directory_item\".\"url\" IS NOT NULL\n )"
328
+ },
329
+ "chk_collection_directory_item_label": {
330
+ "name": "chk_collection_directory_item_label",
331
+ "value": "\"collection_directory_item\".\"type\" <> 'collection' OR \"collection_directory_item\".\"label\" IS NULL"
332
+ },
333
+ "chk_collection_directory_item_description": {
334
+ "name": "chk_collection_directory_item_description",
335
+ "value": "\"collection_directory_item\".\"type\" = 'link' OR \"collection_directory_item\".\"description\" IS NULL"
336
+ }
337
+ }
338
+ },
339
+ "collection": {
340
+ "name": "collection",
341
+ "columns": {
342
+ "id": {
343
+ "name": "id",
344
+ "type": "text",
345
+ "primaryKey": true,
346
+ "notNull": true,
347
+ "autoincrement": false
348
+ },
349
+ "site_id": {
350
+ "name": "site_id",
351
+ "type": "text",
352
+ "primaryKey": false,
353
+ "notNull": true,
354
+ "autoincrement": false
355
+ },
356
+ "title": {
357
+ "name": "title",
358
+ "type": "text",
359
+ "primaryKey": false,
360
+ "notNull": true,
361
+ "autoincrement": false
362
+ },
363
+ "description": {
364
+ "name": "description",
365
+ "type": "text",
366
+ "primaryKey": false,
367
+ "notNull": false,
368
+ "autoincrement": false
369
+ },
370
+ "sort_order": {
371
+ "name": "sort_order",
372
+ "type": "text",
373
+ "primaryKey": false,
374
+ "notNull": true,
375
+ "autoincrement": false,
376
+ "default": "'newest'"
377
+ },
378
+ "created_at": {
379
+ "name": "created_at",
380
+ "type": "integer",
381
+ "primaryKey": false,
382
+ "notNull": true,
383
+ "autoincrement": false
384
+ },
385
+ "updated_at": {
386
+ "name": "updated_at",
387
+ "type": "integer",
388
+ "primaryKey": false,
389
+ "notNull": true,
390
+ "autoincrement": false
391
+ }
392
+ },
393
+ "indexes": {
394
+ "idx_collection_site_created_at": {
395
+ "name": "idx_collection_site_created_at",
396
+ "columns": ["site_id", "created_at"],
397
+ "isUnique": false
398
+ }
399
+ },
400
+ "foreignKeys": {
401
+ "collection_site_id_site_id_fk": {
402
+ "name": "collection_site_id_site_id_fk",
403
+ "tableFrom": "collection",
404
+ "tableTo": "site",
405
+ "columnsFrom": ["site_id"],
406
+ "columnsTo": ["id"],
407
+ "onDelete": "cascade",
408
+ "onUpdate": "no action"
409
+ }
410
+ },
411
+ "compositePrimaryKeys": {},
412
+ "uniqueConstraints": {},
413
+ "checkConstraints": {
414
+ "chk_collection_sort_order": {
415
+ "name": "chk_collection_sort_order",
416
+ "value": "\"collection\".\"sort_order\" IN ('newest', 'oldest', 'rating_desc')"
417
+ }
418
+ }
419
+ },
420
+ "github_app_installation": {
421
+ "name": "github_app_installation",
422
+ "columns": {
423
+ "installation_id": {
424
+ "name": "installation_id",
425
+ "type": "text",
426
+ "primaryKey": false,
427
+ "notNull": true,
428
+ "autoincrement": false
429
+ },
430
+ "site_id": {
431
+ "name": "site_id",
432
+ "type": "text",
433
+ "primaryKey": false,
434
+ "notNull": true,
435
+ "autoincrement": false
436
+ },
437
+ "account_login": {
438
+ "name": "account_login",
439
+ "type": "text",
440
+ "primaryKey": false,
441
+ "notNull": true,
442
+ "autoincrement": false
443
+ },
444
+ "account_type": {
445
+ "name": "account_type",
446
+ "type": "text",
447
+ "primaryKey": false,
448
+ "notNull": true,
449
+ "autoincrement": false
450
+ },
451
+ "account_avatar_url": {
452
+ "name": "account_avatar_url",
453
+ "type": "text",
454
+ "primaryKey": false,
455
+ "notNull": true,
456
+ "autoincrement": false,
457
+ "default": "''"
458
+ },
459
+ "added_at": {
460
+ "name": "added_at",
461
+ "type": "integer",
462
+ "primaryKey": false,
463
+ "notNull": true,
464
+ "autoincrement": false
465
+ }
466
+ },
467
+ "indexes": {
468
+ "github_app_installation_by_installation": {
469
+ "name": "github_app_installation_by_installation",
470
+ "columns": ["installation_id"],
471
+ "isUnique": false
472
+ },
473
+ "github_app_installation_by_site": {
474
+ "name": "github_app_installation_by_site",
475
+ "columns": ["site_id"],
476
+ "isUnique": false
477
+ }
478
+ },
479
+ "foreignKeys": {
480
+ "github_app_installation_site_id_site_id_fk": {
481
+ "name": "github_app_installation_site_id_site_id_fk",
482
+ "tableFrom": "github_app_installation",
483
+ "tableTo": "site",
484
+ "columnsFrom": ["site_id"],
485
+ "columnsTo": ["id"],
486
+ "onDelete": "cascade",
487
+ "onUpdate": "no action"
488
+ }
489
+ },
490
+ "compositePrimaryKeys": {
491
+ "github_app_installation_installation_id_site_id_pk": {
492
+ "columns": ["installation_id", "site_id"],
493
+ "name": "github_app_installation_installation_id_site_id_pk"
494
+ }
495
+ },
496
+ "uniqueConstraints": {},
497
+ "checkConstraints": {
498
+ "chk_github_app_installation_account_type": {
499
+ "name": "chk_github_app_installation_account_type",
500
+ "value": "\"github_app_installation\".\"account_type\" IN ('User', 'Organization')"
501
+ }
502
+ }
503
+ },
504
+ "media": {
505
+ "name": "media",
506
+ "columns": {
507
+ "id": {
508
+ "name": "id",
509
+ "type": "text",
510
+ "primaryKey": true,
511
+ "notNull": true,
512
+ "autoincrement": false
513
+ },
514
+ "site_id": {
515
+ "name": "site_id",
516
+ "type": "text",
517
+ "primaryKey": false,
518
+ "notNull": true,
519
+ "autoincrement": false
520
+ },
521
+ "post_id": {
522
+ "name": "post_id",
523
+ "type": "text",
524
+ "primaryKey": false,
525
+ "notNull": false,
526
+ "autoincrement": false
527
+ },
528
+ "filename": {
529
+ "name": "filename",
530
+ "type": "text",
531
+ "primaryKey": false,
532
+ "notNull": true,
533
+ "autoincrement": false
534
+ },
535
+ "original_name": {
536
+ "name": "original_name",
537
+ "type": "text",
538
+ "primaryKey": false,
539
+ "notNull": true,
540
+ "autoincrement": false
541
+ },
542
+ "mime_type": {
543
+ "name": "mime_type",
544
+ "type": "text",
545
+ "primaryKey": false,
546
+ "notNull": true,
547
+ "autoincrement": false
548
+ },
549
+ "size": {
550
+ "name": "size",
551
+ "type": "integer",
552
+ "primaryKey": false,
553
+ "notNull": true,
554
+ "autoincrement": false
555
+ },
556
+ "storage_key": {
557
+ "name": "storage_key",
558
+ "type": "text",
559
+ "primaryKey": false,
560
+ "notNull": true,
561
+ "autoincrement": false
562
+ },
563
+ "provider": {
564
+ "name": "provider",
565
+ "type": "text",
566
+ "primaryKey": false,
567
+ "notNull": true,
568
+ "autoincrement": false,
569
+ "default": "'r2'"
570
+ },
571
+ "width": {
572
+ "name": "width",
573
+ "type": "integer",
574
+ "primaryKey": false,
575
+ "notNull": false,
576
+ "autoincrement": false
577
+ },
578
+ "height": {
579
+ "name": "height",
580
+ "type": "integer",
581
+ "primaryKey": false,
582
+ "notNull": false,
583
+ "autoincrement": false
584
+ },
585
+ "duration_seconds": {
586
+ "name": "duration_seconds",
587
+ "type": "integer",
588
+ "primaryKey": false,
589
+ "notNull": false,
590
+ "autoincrement": false
591
+ },
592
+ "alt": {
593
+ "name": "alt",
594
+ "type": "text",
595
+ "primaryKey": false,
596
+ "notNull": false,
597
+ "autoincrement": false
598
+ },
599
+ "position": {
600
+ "name": "position",
601
+ "type": "text",
602
+ "primaryKey": false,
603
+ "notNull": true,
604
+ "autoincrement": false,
605
+ "default": "'a0'"
606
+ },
607
+ "blurhash": {
608
+ "name": "blurhash",
609
+ "type": "text",
610
+ "primaryKey": false,
611
+ "notNull": false,
612
+ "autoincrement": false
613
+ },
614
+ "waveform": {
615
+ "name": "waveform",
616
+ "type": "text",
617
+ "primaryKey": false,
618
+ "notNull": false,
619
+ "autoincrement": false
620
+ },
621
+ "poster_key": {
622
+ "name": "poster_key",
623
+ "type": "text",
624
+ "primaryKey": false,
625
+ "notNull": false,
626
+ "autoincrement": false
627
+ },
628
+ "summary": {
629
+ "name": "summary",
630
+ "type": "text",
631
+ "primaryKey": false,
632
+ "notNull": false,
633
+ "autoincrement": false
634
+ },
635
+ "chars": {
636
+ "name": "chars",
637
+ "type": "integer",
638
+ "primaryKey": false,
639
+ "notNull": false,
640
+ "autoincrement": false
641
+ },
642
+ "media_kind": {
643
+ "name": "media_kind",
644
+ "type": "text",
645
+ "primaryKey": false,
646
+ "notNull": true,
647
+ "autoincrement": false,
648
+ "default": "'document'"
649
+ },
650
+ "created_at": {
651
+ "name": "created_at",
652
+ "type": "integer",
653
+ "primaryKey": false,
654
+ "notNull": true,
655
+ "autoincrement": false
656
+ },
657
+ "updated_at": {
658
+ "name": "updated_at",
659
+ "type": "integer",
660
+ "primaryKey": false,
661
+ "notNull": true,
662
+ "autoincrement": false
663
+ }
664
+ },
665
+ "indexes": {
666
+ "idx_media_site_post_id_position": {
667
+ "name": "idx_media_site_post_id_position",
668
+ "columns": ["site_id", "post_id", "position"],
669
+ "isUnique": false
670
+ },
671
+ "uq_media_site_post_position": {
672
+ "name": "uq_media_site_post_position",
673
+ "columns": ["site_id", "post_id", "position"],
674
+ "isUnique": true,
675
+ "where": "\"media\".\"post_id\" IS NOT NULL"
676
+ },
677
+ "uq_media_provider_storage_key": {
678
+ "name": "uq_media_provider_storage_key",
679
+ "columns": ["provider", "storage_key"],
680
+ "isUnique": true
681
+ },
682
+ "idx_media_site_media_kind_post_id": {
683
+ "name": "idx_media_site_media_kind_post_id",
684
+ "columns": ["site_id", "media_kind", "post_id"],
685
+ "isUnique": false
686
+ }
687
+ },
688
+ "foreignKeys": {
689
+ "media_site_id_site_id_fk": {
690
+ "name": "media_site_id_site_id_fk",
691
+ "tableFrom": "media",
692
+ "tableTo": "site",
693
+ "columnsFrom": ["site_id"],
694
+ "columnsTo": ["id"],
695
+ "onDelete": "cascade",
696
+ "onUpdate": "no action"
697
+ },
698
+ "media_post_id_post_id_fk": {
699
+ "name": "media_post_id_post_id_fk",
700
+ "tableFrom": "media",
701
+ "tableTo": "post",
702
+ "columnsFrom": ["post_id"],
703
+ "columnsTo": ["id"],
704
+ "onDelete": "set null",
705
+ "onUpdate": "no action"
706
+ }
707
+ },
708
+ "compositePrimaryKeys": {},
709
+ "uniqueConstraints": {},
710
+ "checkConstraints": {
711
+ "chk_media_size_positive": {
712
+ "name": "chk_media_size_positive",
713
+ "value": "\"media\".\"size\" > 0"
714
+ },
715
+ "chk_media_position_not_blank": {
716
+ "name": "chk_media_position_not_blank",
717
+ "value": "trim(\"media\".\"position\") <> ''"
718
+ },
719
+ "chk_media_dimensions_positive": {
720
+ "name": "chk_media_dimensions_positive",
721
+ "value": "(\n \"media\".\"width\" IS NULL OR \"media\".\"width\" > 0\n ) AND (\n \"media\".\"height\" IS NULL OR \"media\".\"height\" > 0\n )"
722
+ },
723
+ "chk_media_chars_nonnegative": {
724
+ "name": "chk_media_chars_nonnegative",
725
+ "value": "\"media\".\"chars\" IS NULL OR \"media\".\"chars\" >= 0"
726
+ }
727
+ }
728
+ },
729
+ "nav_item": {
730
+ "name": "nav_item",
731
+ "columns": {
732
+ "id": {
733
+ "name": "id",
734
+ "type": "text",
735
+ "primaryKey": true,
736
+ "notNull": true,
737
+ "autoincrement": false
738
+ },
739
+ "site_id": {
740
+ "name": "site_id",
741
+ "type": "text",
742
+ "primaryKey": false,
743
+ "notNull": true,
744
+ "autoincrement": false
745
+ },
746
+ "type": {
747
+ "name": "type",
748
+ "type": "text",
749
+ "primaryKey": false,
750
+ "notNull": true,
751
+ "autoincrement": false,
752
+ "default": "'link'"
753
+ },
754
+ "system_key": {
755
+ "name": "system_key",
756
+ "type": "text",
757
+ "primaryKey": false,
758
+ "notNull": false,
759
+ "autoincrement": false
760
+ },
761
+ "collection_id": {
762
+ "name": "collection_id",
763
+ "type": "text",
764
+ "primaryKey": false,
765
+ "notNull": false,
766
+ "autoincrement": false
767
+ },
768
+ "label": {
769
+ "name": "label",
770
+ "type": "text",
771
+ "primaryKey": false,
772
+ "notNull": true,
773
+ "autoincrement": false
774
+ },
775
+ "url": {
776
+ "name": "url",
777
+ "type": "text",
778
+ "primaryKey": false,
779
+ "notNull": true,
780
+ "autoincrement": false
781
+ },
782
+ "placement": {
783
+ "name": "placement",
784
+ "type": "text",
785
+ "primaryKey": false,
786
+ "notNull": true,
787
+ "autoincrement": false,
788
+ "default": "'header'"
789
+ },
790
+ "position": {
791
+ "name": "position",
792
+ "type": "text",
793
+ "primaryKey": false,
794
+ "notNull": true,
795
+ "autoincrement": false,
796
+ "default": "'a0'"
797
+ },
798
+ "created_at": {
799
+ "name": "created_at",
800
+ "type": "integer",
801
+ "primaryKey": false,
802
+ "notNull": true,
803
+ "autoincrement": false
804
+ },
805
+ "updated_at": {
806
+ "name": "updated_at",
807
+ "type": "integer",
808
+ "primaryKey": false,
809
+ "notNull": true,
810
+ "autoincrement": false
811
+ }
812
+ },
813
+ "indexes": {
814
+ "uq_nav_item_site_position": {
815
+ "name": "uq_nav_item_site_position",
816
+ "columns": ["site_id", "position"],
817
+ "isUnique": true
818
+ },
819
+ "uq_nav_item_site_system_key": {
820
+ "name": "uq_nav_item_site_system_key",
821
+ "columns": ["site_id", "system_key"],
822
+ "isUnique": true,
823
+ "where": "\"nav_item\".\"system_key\" IS NOT NULL"
824
+ },
825
+ "uq_nav_item_site_collection_id": {
826
+ "name": "uq_nav_item_site_collection_id",
827
+ "columns": ["site_id", "collection_id"],
828
+ "isUnique": true,
829
+ "where": "\"nav_item\".\"collection_id\" IS NOT NULL"
830
+ }
831
+ },
832
+ "foreignKeys": {
833
+ "nav_item_site_id_site_id_fk": {
834
+ "name": "nav_item_site_id_site_id_fk",
835
+ "tableFrom": "nav_item",
836
+ "tableTo": "site",
837
+ "columnsFrom": ["site_id"],
838
+ "columnsTo": ["id"],
839
+ "onDelete": "cascade",
840
+ "onUpdate": "no action"
841
+ },
842
+ "nav_item_collection_id_collection_id_fk": {
843
+ "name": "nav_item_collection_id_collection_id_fk",
844
+ "tableFrom": "nav_item",
845
+ "tableTo": "collection",
846
+ "columnsFrom": ["collection_id"],
847
+ "columnsTo": ["id"],
848
+ "onDelete": "cascade",
849
+ "onUpdate": "no action"
850
+ }
851
+ },
852
+ "compositePrimaryKeys": {},
853
+ "uniqueConstraints": {},
854
+ "checkConstraints": {
855
+ "chk_nav_item_type": {
856
+ "name": "chk_nav_item_type",
857
+ "value": "\"nav_item\".\"type\" IN ('link', 'system', 'collection')"
858
+ },
859
+ "chk_nav_item_placement": {
860
+ "name": "chk_nav_item_placement",
861
+ "value": "\"nav_item\".\"placement\" IN ('header', 'more')"
862
+ },
863
+ "chk_nav_item_shape": {
864
+ "name": "chk_nav_item_shape",
865
+ "value": "(\n \"nav_item\".\"type\" = 'link'\n AND \"nav_item\".\"system_key\" IS NULL\n AND \"nav_item\".\"collection_id\" IS NULL\n ) OR (\n \"nav_item\".\"type\" = 'system'\n AND \"nav_item\".\"system_key\" IS NOT NULL\n AND \"nav_item\".\"collection_id\" IS NULL\n ) OR (\n \"nav_item\".\"type\" = 'collection'\n AND \"nav_item\".\"system_key\" IS NULL\n AND \"nav_item\".\"collection_id\" IS NOT NULL\n )"
866
+ }
867
+ }
868
+ },
869
+ "path_registry": {
870
+ "name": "path_registry",
871
+ "columns": {
872
+ "id": {
873
+ "name": "id",
874
+ "type": "text",
875
+ "primaryKey": true,
876
+ "notNull": true,
877
+ "autoincrement": false
878
+ },
879
+ "site_id": {
880
+ "name": "site_id",
881
+ "type": "text",
882
+ "primaryKey": false,
883
+ "notNull": true,
884
+ "autoincrement": false
885
+ },
886
+ "path": {
887
+ "name": "path",
888
+ "type": "text",
889
+ "primaryKey": false,
890
+ "notNull": true,
891
+ "autoincrement": false
892
+ },
893
+ "kind": {
894
+ "name": "kind",
895
+ "type": "text",
896
+ "primaryKey": false,
897
+ "notNull": true,
898
+ "autoincrement": false
899
+ },
900
+ "post_id": {
901
+ "name": "post_id",
902
+ "type": "text",
903
+ "primaryKey": false,
904
+ "notNull": false,
905
+ "autoincrement": false
906
+ },
907
+ "collection_id": {
908
+ "name": "collection_id",
909
+ "type": "text",
910
+ "primaryKey": false,
911
+ "notNull": false,
912
+ "autoincrement": false
913
+ },
914
+ "redirect_to_path": {
915
+ "name": "redirect_to_path",
916
+ "type": "text",
917
+ "primaryKey": false,
918
+ "notNull": false,
919
+ "autoincrement": false
920
+ },
921
+ "redirect_type": {
922
+ "name": "redirect_type",
923
+ "type": "integer",
924
+ "primaryKey": false,
925
+ "notNull": false,
926
+ "autoincrement": false
927
+ },
928
+ "archive_query": {
929
+ "name": "archive_query",
930
+ "type": "text",
931
+ "primaryKey": false,
932
+ "notNull": false,
933
+ "autoincrement": false
934
+ },
935
+ "created_at": {
936
+ "name": "created_at",
937
+ "type": "integer",
938
+ "primaryKey": false,
939
+ "notNull": true,
940
+ "autoincrement": false
941
+ },
942
+ "updated_at": {
943
+ "name": "updated_at",
944
+ "type": "integer",
945
+ "primaryKey": false,
946
+ "notNull": true,
947
+ "autoincrement": false
948
+ }
949
+ },
950
+ "indexes": {
951
+ "uq_path_registry_site_path": {
952
+ "name": "uq_path_registry_site_path",
953
+ "columns": ["site_id", "path"],
954
+ "isUnique": true
955
+ },
956
+ "uq_path_registry_site_post_slug": {
957
+ "name": "uq_path_registry_site_post_slug",
958
+ "columns": ["site_id", "post_id"],
959
+ "isUnique": true,
960
+ "where": "\"path_registry\".\"kind\" = 'slug' AND \"path_registry\".\"post_id\" IS NOT NULL"
961
+ },
962
+ "uq_path_registry_site_collection_slug": {
963
+ "name": "uq_path_registry_site_collection_slug",
964
+ "columns": ["site_id", "collection_id"],
965
+ "isUnique": true,
966
+ "where": "\"path_registry\".\"kind\" = 'slug' AND \"path_registry\".\"collection_id\" IS NOT NULL"
967
+ },
968
+ "idx_path_registry_site_post_id": {
969
+ "name": "idx_path_registry_site_post_id",
970
+ "columns": ["site_id", "post_id"],
971
+ "isUnique": false
972
+ },
973
+ "idx_path_registry_site_collection_id": {
974
+ "name": "idx_path_registry_site_collection_id",
975
+ "columns": ["site_id", "collection_id"],
976
+ "isUnique": false
977
+ }
978
+ },
979
+ "foreignKeys": {
980
+ "path_registry_site_id_site_id_fk": {
981
+ "name": "path_registry_site_id_site_id_fk",
982
+ "tableFrom": "path_registry",
983
+ "tableTo": "site",
984
+ "columnsFrom": ["site_id"],
985
+ "columnsTo": ["id"],
986
+ "onDelete": "cascade",
987
+ "onUpdate": "no action"
988
+ },
989
+ "path_registry_post_id_post_id_fk": {
990
+ "name": "path_registry_post_id_post_id_fk",
991
+ "tableFrom": "path_registry",
992
+ "tableTo": "post",
993
+ "columnsFrom": ["post_id"],
994
+ "columnsTo": ["id"],
995
+ "onDelete": "cascade",
996
+ "onUpdate": "no action"
997
+ },
998
+ "path_registry_collection_id_collection_id_fk": {
999
+ "name": "path_registry_collection_id_collection_id_fk",
1000
+ "tableFrom": "path_registry",
1001
+ "tableTo": "collection",
1002
+ "columnsFrom": ["collection_id"],
1003
+ "columnsTo": ["id"],
1004
+ "onDelete": "cascade",
1005
+ "onUpdate": "no action"
1006
+ }
1007
+ },
1008
+ "compositePrimaryKeys": {},
1009
+ "uniqueConstraints": {},
1010
+ "checkConstraints": {
1011
+ "chk_path_registry_kind": {
1012
+ "name": "chk_path_registry_kind",
1013
+ "value": "\"path_registry\".\"kind\" IN ('slug', 'alias', 'redirect', 'archive')"
1014
+ },
1015
+ "chk_path_registry_shape": {
1016
+ "name": "chk_path_registry_shape",
1017
+ "value": "(\n \"path_registry\".\"kind\" IN ('slug', 'alias')\n AND (\n (\"path_registry\".\"post_id\" IS NOT NULL AND \"path_registry\".\"collection_id\" IS NULL)\n OR (\"path_registry\".\"post_id\" IS NULL AND \"path_registry\".\"collection_id\" IS NOT NULL)\n )\n AND \"path_registry\".\"redirect_to_path\" IS NULL\n AND \"path_registry\".\"redirect_type\" IS NULL\n AND \"path_registry\".\"archive_query\" IS NULL\n ) OR (\n \"path_registry\".\"kind\" = 'redirect'\n AND \"path_registry\".\"post_id\" IS NULL\n AND \"path_registry\".\"collection_id\" IS NULL\n AND \"path_registry\".\"redirect_to_path\" IS NOT NULL\n AND \"path_registry\".\"redirect_type\" IN (301, 302)\n AND \"path_registry\".\"archive_query\" IS NULL\n ) OR (\n \"path_registry\".\"kind\" = 'archive'\n AND \"path_registry\".\"post_id\" IS NULL\n AND \"path_registry\".\"collection_id\" IS NULL\n AND \"path_registry\".\"redirect_to_path\" IS NULL\n AND \"path_registry\".\"redirect_type\" IS NULL\n AND \"path_registry\".\"archive_query\" IS NOT NULL\n )"
1018
+ }
1019
+ }
1020
+ },
1021
+ "post_collection": {
1022
+ "name": "post_collection",
1023
+ "columns": {
1024
+ "site_id": {
1025
+ "name": "site_id",
1026
+ "type": "text",
1027
+ "primaryKey": false,
1028
+ "notNull": true,
1029
+ "autoincrement": false
1030
+ },
1031
+ "post_id": {
1032
+ "name": "post_id",
1033
+ "type": "text",
1034
+ "primaryKey": false,
1035
+ "notNull": true,
1036
+ "autoincrement": false
1037
+ },
1038
+ "collection_id": {
1039
+ "name": "collection_id",
1040
+ "type": "text",
1041
+ "primaryKey": false,
1042
+ "notNull": true,
1043
+ "autoincrement": false
1044
+ },
1045
+ "created_at": {
1046
+ "name": "created_at",
1047
+ "type": "integer",
1048
+ "primaryKey": false,
1049
+ "notNull": true,
1050
+ "autoincrement": false
1051
+ },
1052
+ "position": {
1053
+ "name": "position",
1054
+ "type": "integer",
1055
+ "primaryKey": false,
1056
+ "notNull": true,
1057
+ "autoincrement": false,
1058
+ "default": 0
1059
+ },
1060
+ "pinned_at": {
1061
+ "name": "pinned_at",
1062
+ "type": "integer",
1063
+ "primaryKey": false,
1064
+ "notNull": false,
1065
+ "autoincrement": false
1066
+ }
1067
+ },
1068
+ "indexes": {
1069
+ "idx_post_collection_site_collection_id": {
1070
+ "name": "idx_post_collection_site_collection_id",
1071
+ "columns": ["site_id", "collection_id"],
1072
+ "isUnique": false
1073
+ },
1074
+ "idx_post_collection_site_collection_created_post": {
1075
+ "name": "idx_post_collection_site_collection_created_post",
1076
+ "columns": ["site_id", "collection_id", "created_at", "post_id"],
1077
+ "isUnique": false
1078
+ }
1079
+ },
1080
+ "foreignKeys": {
1081
+ "post_collection_site_id_site_id_fk": {
1082
+ "name": "post_collection_site_id_site_id_fk",
1083
+ "tableFrom": "post_collection",
1084
+ "tableTo": "site",
1085
+ "columnsFrom": ["site_id"],
1086
+ "columnsTo": ["id"],
1087
+ "onDelete": "cascade",
1088
+ "onUpdate": "no action"
1089
+ },
1090
+ "post_collection_post_id_post_id_fk": {
1091
+ "name": "post_collection_post_id_post_id_fk",
1092
+ "tableFrom": "post_collection",
1093
+ "tableTo": "post",
1094
+ "columnsFrom": ["post_id"],
1095
+ "columnsTo": ["id"],
1096
+ "onDelete": "cascade",
1097
+ "onUpdate": "no action"
1098
+ },
1099
+ "post_collection_collection_id_collection_id_fk": {
1100
+ "name": "post_collection_collection_id_collection_id_fk",
1101
+ "tableFrom": "post_collection",
1102
+ "tableTo": "collection",
1103
+ "columnsFrom": ["collection_id"],
1104
+ "columnsTo": ["id"],
1105
+ "onDelete": "cascade",
1106
+ "onUpdate": "no action"
1107
+ }
1108
+ },
1109
+ "compositePrimaryKeys": {
1110
+ "post_collection_site_id_post_id_collection_id_pk": {
1111
+ "columns": ["site_id", "post_id", "collection_id"],
1112
+ "name": "post_collection_site_id_post_id_collection_id_pk"
1113
+ }
1114
+ },
1115
+ "uniqueConstraints": {},
1116
+ "checkConstraints": {}
1117
+ },
1118
+ "post": {
1119
+ "name": "post",
1120
+ "columns": {
1121
+ "id": {
1122
+ "name": "id",
1123
+ "type": "text",
1124
+ "primaryKey": true,
1125
+ "notNull": true,
1126
+ "autoincrement": false
1127
+ },
1128
+ "site_id": {
1129
+ "name": "site_id",
1130
+ "type": "text",
1131
+ "primaryKey": false,
1132
+ "notNull": true,
1133
+ "autoincrement": false
1134
+ },
1135
+ "format": {
1136
+ "name": "format",
1137
+ "type": "text",
1138
+ "primaryKey": false,
1139
+ "notNull": true,
1140
+ "autoincrement": false
1141
+ },
1142
+ "status": {
1143
+ "name": "status",
1144
+ "type": "text",
1145
+ "primaryKey": false,
1146
+ "notNull": true,
1147
+ "autoincrement": false,
1148
+ "default": "'published'"
1149
+ },
1150
+ "visibility": {
1151
+ "name": "visibility",
1152
+ "type": "text",
1153
+ "primaryKey": false,
1154
+ "notNull": false,
1155
+ "autoincrement": false,
1156
+ "default": "'public'"
1157
+ },
1158
+ "pinned_at": {
1159
+ "name": "pinned_at",
1160
+ "type": "integer",
1161
+ "primaryKey": false,
1162
+ "notNull": false,
1163
+ "autoincrement": false
1164
+ },
1165
+ "featured_at": {
1166
+ "name": "featured_at",
1167
+ "type": "integer",
1168
+ "primaryKey": false,
1169
+ "notNull": false,
1170
+ "autoincrement": false
1171
+ },
1172
+ "title": {
1173
+ "name": "title",
1174
+ "type": "text",
1175
+ "primaryKey": false,
1176
+ "notNull": false,
1177
+ "autoincrement": false
1178
+ },
1179
+ "url": {
1180
+ "name": "url",
1181
+ "type": "text",
1182
+ "primaryKey": false,
1183
+ "notNull": false,
1184
+ "autoincrement": false
1185
+ },
1186
+ "body": {
1187
+ "name": "body",
1188
+ "type": "text",
1189
+ "primaryKey": false,
1190
+ "notNull": false,
1191
+ "autoincrement": false
1192
+ },
1193
+ "body_html": {
1194
+ "name": "body_html",
1195
+ "type": "text",
1196
+ "primaryKey": false,
1197
+ "notNull": false,
1198
+ "autoincrement": false
1199
+ },
1200
+ "body_text": {
1201
+ "name": "body_text",
1202
+ "type": "text",
1203
+ "primaryKey": false,
1204
+ "notNull": false,
1205
+ "autoincrement": false
1206
+ },
1207
+ "quote_text": {
1208
+ "name": "quote_text",
1209
+ "type": "text",
1210
+ "primaryKey": false,
1211
+ "notNull": false,
1212
+ "autoincrement": false
1213
+ },
1214
+ "summary": {
1215
+ "name": "summary",
1216
+ "type": "text",
1217
+ "primaryKey": false,
1218
+ "notNull": false,
1219
+ "autoincrement": false
1220
+ },
1221
+ "rating": {
1222
+ "name": "rating",
1223
+ "type": "integer",
1224
+ "primaryKey": false,
1225
+ "notNull": false,
1226
+ "autoincrement": false
1227
+ },
1228
+ "preview_image_key": {
1229
+ "name": "preview_image_key",
1230
+ "type": "text",
1231
+ "primaryKey": false,
1232
+ "notNull": false,
1233
+ "autoincrement": false
1234
+ },
1235
+ "preview_kind": {
1236
+ "name": "preview_kind",
1237
+ "type": "text",
1238
+ "primaryKey": false,
1239
+ "notNull": false,
1240
+ "autoincrement": false
1241
+ },
1242
+ "preview_provider": {
1243
+ "name": "preview_provider",
1244
+ "type": "text",
1245
+ "primaryKey": false,
1246
+ "notNull": false,
1247
+ "autoincrement": false
1248
+ },
1249
+ "reply_to_id": {
1250
+ "name": "reply_to_id",
1251
+ "type": "text",
1252
+ "primaryKey": false,
1253
+ "notNull": false,
1254
+ "autoincrement": false
1255
+ },
1256
+ "thread_id": {
1257
+ "name": "thread_id",
1258
+ "type": "text",
1259
+ "primaryKey": false,
1260
+ "notNull": true,
1261
+ "autoincrement": false
1262
+ },
1263
+ "deleted_at": {
1264
+ "name": "deleted_at",
1265
+ "type": "integer",
1266
+ "primaryKey": false,
1267
+ "notNull": false,
1268
+ "autoincrement": false
1269
+ },
1270
+ "published_at": {
1271
+ "name": "published_at",
1272
+ "type": "integer",
1273
+ "primaryKey": false,
1274
+ "notNull": false,
1275
+ "autoincrement": false
1276
+ },
1277
+ "last_activity_at": {
1278
+ "name": "last_activity_at",
1279
+ "type": "integer",
1280
+ "primaryKey": false,
1281
+ "notNull": false,
1282
+ "autoincrement": false
1283
+ },
1284
+ "created_at": {
1285
+ "name": "created_at",
1286
+ "type": "integer",
1287
+ "primaryKey": false,
1288
+ "notNull": true,
1289
+ "autoincrement": false
1290
+ },
1291
+ "updated_at": {
1292
+ "name": "updated_at",
1293
+ "type": "integer",
1294
+ "primaryKey": false,
1295
+ "notNull": true,
1296
+ "autoincrement": false
1297
+ }
1298
+ },
1299
+ "indexes": {
1300
+ "uq_post_site_id_id": {
1301
+ "name": "uq_post_site_id_id",
1302
+ "columns": ["site_id", "id"],
1303
+ "isUnique": true
1304
+ },
1305
+ "idx_post_site_thread_id": {
1306
+ "name": "idx_post_site_thread_id",
1307
+ "columns": ["site_id", "thread_id"],
1308
+ "isUnique": false
1309
+ },
1310
+ "idx_post_site_thread_live_created": {
1311
+ "name": "idx_post_site_thread_live_created",
1312
+ "columns": ["site_id", "thread_id", "created_at", "id"],
1313
+ "isUnique": false,
1314
+ "where": "\"post\".\"deleted_at\" IS NULL"
1315
+ },
1316
+ "idx_post_site_status_deleted_published": {
1317
+ "name": "idx_post_site_status_deleted_published",
1318
+ "columns": ["site_id", "status", "deleted_at", "published_at"],
1319
+ "isUnique": false
1320
+ },
1321
+ "idx_post_site_status_deleted_activity": {
1322
+ "name": "idx_post_site_status_deleted_activity",
1323
+ "columns": ["site_id", "status", "deleted_at", "last_activity_at"],
1324
+ "isUnique": false
1325
+ },
1326
+ "idx_post_site_root_live_published_activity": {
1327
+ "name": "idx_post_site_root_live_published_activity",
1328
+ "columns": ["site_id", "last_activity_at", "id"],
1329
+ "isUnique": false,
1330
+ "where": "\"post\".\"deleted_at\" IS NULL AND \"post\".\"reply_to_id\" IS NULL AND \"post\".\"status\" = 'published'"
1331
+ },
1332
+ "idx_post_site_root_live_draft_updated": {
1333
+ "name": "idx_post_site_root_live_draft_updated",
1334
+ "columns": ["site_id", "updated_at", "id"],
1335
+ "isUnique": false,
1336
+ "where": "\"post\".\"deleted_at\" IS NULL AND \"post\".\"reply_to_id\" IS NULL AND \"post\".\"status\" = 'draft'"
1337
+ },
1338
+ "idx_post_site_reply_live_thread_created": {
1339
+ "name": "idx_post_site_reply_live_thread_created",
1340
+ "columns": ["site_id", "thread_id", "created_at", "id"],
1341
+ "isUnique": false,
1342
+ "where": "\"post\".\"deleted_at\" IS NULL AND \"post\".\"reply_to_id\" IS NOT NULL AND \"post\".\"status\" = 'published'"
1343
+ },
1344
+ "idx_post_site_featured_live_featured_at": {
1345
+ "name": "idx_post_site_featured_live_featured_at",
1346
+ "columns": ["site_id", "featured_at", "thread_id", "id"],
1347
+ "isUnique": false,
1348
+ "where": "\"post\".\"deleted_at\" IS NULL AND \"post\".\"status\" = 'published' AND \"post\".\"featured_at\" IS NOT NULL"
1349
+ }
1350
+ },
1351
+ "foreignKeys": {
1352
+ "post_site_id_site_id_fk": {
1353
+ "name": "post_site_id_site_id_fk",
1354
+ "tableFrom": "post",
1355
+ "tableTo": "site",
1356
+ "columnsFrom": ["site_id"],
1357
+ "columnsTo": ["id"],
1358
+ "onDelete": "cascade",
1359
+ "onUpdate": "no action"
1360
+ },
1361
+ "post_site_id_reply_to_id_post_site_id_id_fk": {
1362
+ "name": "post_site_id_reply_to_id_post_site_id_id_fk",
1363
+ "tableFrom": "post",
1364
+ "tableTo": "post",
1365
+ "columnsFrom": ["site_id", "reply_to_id"],
1366
+ "columnsTo": ["site_id", "id"],
1367
+ "onDelete": "no action",
1368
+ "onUpdate": "no action"
1369
+ },
1370
+ "post_site_id_thread_id_post_site_id_id_fk": {
1371
+ "name": "post_site_id_thread_id_post_site_id_id_fk",
1372
+ "tableFrom": "post",
1373
+ "tableTo": "post",
1374
+ "columnsFrom": ["site_id", "thread_id"],
1375
+ "columnsTo": ["site_id", "id"],
1376
+ "onDelete": "no action",
1377
+ "onUpdate": "no action"
1378
+ }
1379
+ },
1380
+ "compositePrimaryKeys": {},
1381
+ "uniqueConstraints": {},
1382
+ "checkConstraints": {
1383
+ "chk_post_reply_to_not_self": {
1384
+ "name": "chk_post_reply_to_not_self",
1385
+ "value": "\"post\".\"reply_to_id\" IS NULL OR \"post\".\"reply_to_id\" <> \"post\".\"id\""
1386
+ },
1387
+ "chk_post_thread_shape": {
1388
+ "name": "chk_post_thread_shape",
1389
+ "value": "(\n \"post\".\"reply_to_id\" IS NULL\n AND \"post\".\"thread_id\" = \"post\".\"id\"\n ) OR (\n \"post\".\"reply_to_id\" IS NOT NULL\n AND \"post\".\"thread_id\" <> \"post\".\"id\"\n )"
1390
+ }
1391
+ }
1392
+ },
1393
+ "rate_limit": {
1394
+ "name": "rate_limit",
1395
+ "columns": {
1396
+ "key": {
1397
+ "name": "key",
1398
+ "type": "text",
1399
+ "primaryKey": false,
1400
+ "notNull": true,
1401
+ "autoincrement": false
1402
+ },
1403
+ "window_start": {
1404
+ "name": "window_start",
1405
+ "type": "integer",
1406
+ "primaryKey": false,
1407
+ "notNull": true,
1408
+ "autoincrement": false
1409
+ },
1410
+ "count": {
1411
+ "name": "count",
1412
+ "type": "integer",
1413
+ "primaryKey": false,
1414
+ "notNull": true,
1415
+ "autoincrement": false,
1416
+ "default": 0
1417
+ }
1418
+ },
1419
+ "indexes": {},
1420
+ "foreignKeys": {},
1421
+ "compositePrimaryKeys": {
1422
+ "rate_limit_key_window_start_pk": {
1423
+ "columns": ["key", "window_start"],
1424
+ "name": "rate_limit_key_window_start_pk"
1425
+ }
1426
+ },
1427
+ "uniqueConstraints": {},
1428
+ "checkConstraints": {}
1429
+ },
1430
+ "session": {
1431
+ "name": "session",
1432
+ "columns": {
1433
+ "id": {
1434
+ "name": "id",
1435
+ "type": "text",
1436
+ "primaryKey": true,
1437
+ "notNull": true,
1438
+ "autoincrement": false
1439
+ },
1440
+ "expires_at": {
1441
+ "name": "expires_at",
1442
+ "type": "integer",
1443
+ "primaryKey": false,
1444
+ "notNull": true,
1445
+ "autoincrement": false
1446
+ },
1447
+ "token": {
1448
+ "name": "token",
1449
+ "type": "text",
1450
+ "primaryKey": false,
1451
+ "notNull": true,
1452
+ "autoincrement": false
1453
+ },
1454
+ "created_at": {
1455
+ "name": "created_at",
1456
+ "type": "integer",
1457
+ "primaryKey": false,
1458
+ "notNull": true,
1459
+ "autoincrement": false
1460
+ },
1461
+ "updated_at": {
1462
+ "name": "updated_at",
1463
+ "type": "integer",
1464
+ "primaryKey": false,
1465
+ "notNull": true,
1466
+ "autoincrement": false
1467
+ },
1468
+ "ip_address": {
1469
+ "name": "ip_address",
1470
+ "type": "text",
1471
+ "primaryKey": false,
1472
+ "notNull": false,
1473
+ "autoincrement": false
1474
+ },
1475
+ "user_agent": {
1476
+ "name": "user_agent",
1477
+ "type": "text",
1478
+ "primaryKey": false,
1479
+ "notNull": false,
1480
+ "autoincrement": false
1481
+ },
1482
+ "user_id": {
1483
+ "name": "user_id",
1484
+ "type": "text",
1485
+ "primaryKey": false,
1486
+ "notNull": true,
1487
+ "autoincrement": false
1488
+ }
1489
+ },
1490
+ "indexes": {
1491
+ "session_token_unique": {
1492
+ "name": "session_token_unique",
1493
+ "columns": ["token"],
1494
+ "isUnique": true
1495
+ },
1496
+ "idx_session_user_id": {
1497
+ "name": "idx_session_user_id",
1498
+ "columns": ["user_id"],
1499
+ "isUnique": false
1500
+ }
1501
+ },
1502
+ "foreignKeys": {
1503
+ "session_user_id_user_id_fk": {
1504
+ "name": "session_user_id_user_id_fk",
1505
+ "tableFrom": "session",
1506
+ "tableTo": "user",
1507
+ "columnsFrom": ["user_id"],
1508
+ "columnsTo": ["id"],
1509
+ "onDelete": "no action",
1510
+ "onUpdate": "no action"
1511
+ }
1512
+ },
1513
+ "compositePrimaryKeys": {},
1514
+ "uniqueConstraints": {},
1515
+ "checkConstraints": {}
1516
+ },
1517
+ "site_setting": {
1518
+ "name": "site_setting",
1519
+ "columns": {
1520
+ "site_id": {
1521
+ "name": "site_id",
1522
+ "type": "text",
1523
+ "primaryKey": false,
1524
+ "notNull": true,
1525
+ "autoincrement": false
1526
+ },
1527
+ "key": {
1528
+ "name": "key",
1529
+ "type": "text",
1530
+ "primaryKey": false,
1531
+ "notNull": true,
1532
+ "autoincrement": false
1533
+ },
1534
+ "value": {
1535
+ "name": "value",
1536
+ "type": "text",
1537
+ "primaryKey": false,
1538
+ "notNull": true,
1539
+ "autoincrement": false
1540
+ },
1541
+ "updated_at": {
1542
+ "name": "updated_at",
1543
+ "type": "integer",
1544
+ "primaryKey": false,
1545
+ "notNull": true,
1546
+ "autoincrement": false
1547
+ }
1548
+ },
1549
+ "indexes": {
1550
+ "idx_site_setting_site_id": {
1551
+ "name": "idx_site_setting_site_id",
1552
+ "columns": ["site_id"],
1553
+ "isUnique": false
1554
+ }
1555
+ },
1556
+ "foreignKeys": {
1557
+ "site_setting_site_id_site_id_fk": {
1558
+ "name": "site_setting_site_id_site_id_fk",
1559
+ "tableFrom": "site_setting",
1560
+ "tableTo": "site",
1561
+ "columnsFrom": ["site_id"],
1562
+ "columnsTo": ["id"],
1563
+ "onDelete": "cascade",
1564
+ "onUpdate": "no action"
1565
+ }
1566
+ },
1567
+ "compositePrimaryKeys": {
1568
+ "site_setting_site_id_key_pk": {
1569
+ "columns": ["site_id", "key"],
1570
+ "name": "site_setting_site_id_key_pk"
1571
+ }
1572
+ },
1573
+ "uniqueConstraints": {},
1574
+ "checkConstraints": {}
1575
+ },
1576
+ "site_domain": {
1577
+ "name": "site_domain",
1578
+ "columns": {
1579
+ "id": {
1580
+ "name": "id",
1581
+ "type": "text",
1582
+ "primaryKey": true,
1583
+ "notNull": true,
1584
+ "autoincrement": false
1585
+ },
1586
+ "site_id": {
1587
+ "name": "site_id",
1588
+ "type": "text",
1589
+ "primaryKey": false,
1590
+ "notNull": true,
1591
+ "autoincrement": false
1592
+ },
1593
+ "host": {
1594
+ "name": "host",
1595
+ "type": "text",
1596
+ "primaryKey": false,
1597
+ "notNull": true,
1598
+ "autoincrement": false
1599
+ },
1600
+ "path_prefix": {
1601
+ "name": "path_prefix",
1602
+ "type": "text",
1603
+ "primaryKey": false,
1604
+ "notNull": false,
1605
+ "autoincrement": false
1606
+ },
1607
+ "kind": {
1608
+ "name": "kind",
1609
+ "type": "text",
1610
+ "primaryKey": false,
1611
+ "notNull": true,
1612
+ "autoincrement": false,
1613
+ "default": "'primary'"
1614
+ },
1615
+ "redirect_to_primary": {
1616
+ "name": "redirect_to_primary",
1617
+ "type": "integer",
1618
+ "primaryKey": false,
1619
+ "notNull": true,
1620
+ "autoincrement": false,
1621
+ "default": true
1622
+ },
1623
+ "created_at": {
1624
+ "name": "created_at",
1625
+ "type": "integer",
1626
+ "primaryKey": false,
1627
+ "notNull": true,
1628
+ "autoincrement": false
1629
+ },
1630
+ "updated_at": {
1631
+ "name": "updated_at",
1632
+ "type": "integer",
1633
+ "primaryKey": false,
1634
+ "notNull": true,
1635
+ "autoincrement": false
1636
+ }
1637
+ },
1638
+ "indexes": {
1639
+ "uq_site_domain_host": {
1640
+ "name": "uq_site_domain_host",
1641
+ "columns": ["host"],
1642
+ "isUnique": true
1643
+ },
1644
+ "idx_site_domain_site_id": {
1645
+ "name": "idx_site_domain_site_id",
1646
+ "columns": ["site_id"],
1647
+ "isUnique": false
1648
+ }
1649
+ },
1650
+ "foreignKeys": {
1651
+ "site_domain_site_id_site_id_fk": {
1652
+ "name": "site_domain_site_id_site_id_fk",
1653
+ "tableFrom": "site_domain",
1654
+ "tableTo": "site",
1655
+ "columnsFrom": ["site_id"],
1656
+ "columnsTo": ["id"],
1657
+ "onDelete": "cascade",
1658
+ "onUpdate": "no action"
1659
+ }
1660
+ },
1661
+ "compositePrimaryKeys": {},
1662
+ "uniqueConstraints": {},
1663
+ "checkConstraints": {
1664
+ "chk_site_domain_kind": {
1665
+ "name": "chk_site_domain_kind",
1666
+ "value": "\"site_domain\".\"kind\" IN ('primary', 'alias')"
1667
+ }
1668
+ }
1669
+ },
1670
+ "site_member": {
1671
+ "name": "site_member",
1672
+ "columns": {
1673
+ "site_id": {
1674
+ "name": "site_id",
1675
+ "type": "text",
1676
+ "primaryKey": false,
1677
+ "notNull": true,
1678
+ "autoincrement": false
1679
+ },
1680
+ "user_id": {
1681
+ "name": "user_id",
1682
+ "type": "text",
1683
+ "primaryKey": false,
1684
+ "notNull": true,
1685
+ "autoincrement": false
1686
+ },
1687
+ "role": {
1688
+ "name": "role",
1689
+ "type": "text",
1690
+ "primaryKey": false,
1691
+ "notNull": true,
1692
+ "autoincrement": false,
1693
+ "default": "'editor'"
1694
+ },
1695
+ "created_at": {
1696
+ "name": "created_at",
1697
+ "type": "integer",
1698
+ "primaryKey": false,
1699
+ "notNull": true,
1700
+ "autoincrement": false
1701
+ },
1702
+ "updated_at": {
1703
+ "name": "updated_at",
1704
+ "type": "integer",
1705
+ "primaryKey": false,
1706
+ "notNull": true,
1707
+ "autoincrement": false
1708
+ }
1709
+ },
1710
+ "indexes": {
1711
+ "idx_site_member_user_id": {
1712
+ "name": "idx_site_member_user_id",
1713
+ "columns": ["user_id"],
1714
+ "isUnique": false
1715
+ }
1716
+ },
1717
+ "foreignKeys": {
1718
+ "site_member_site_id_site_id_fk": {
1719
+ "name": "site_member_site_id_site_id_fk",
1720
+ "tableFrom": "site_member",
1721
+ "tableTo": "site",
1722
+ "columnsFrom": ["site_id"],
1723
+ "columnsTo": ["id"],
1724
+ "onDelete": "cascade",
1725
+ "onUpdate": "no action"
1726
+ }
1727
+ },
1728
+ "compositePrimaryKeys": {
1729
+ "site_member_site_id_user_id_pk": {
1730
+ "columns": ["site_id", "user_id"],
1731
+ "name": "site_member_site_id_user_id_pk"
1732
+ }
1733
+ },
1734
+ "uniqueConstraints": {},
1735
+ "checkConstraints": {
1736
+ "chk_site_member_role": {
1737
+ "name": "chk_site_member_role",
1738
+ "value": "\"site_member\".\"role\" IN ('owner', 'admin', 'editor')"
1739
+ }
1740
+ }
1741
+ },
1742
+ "site": {
1743
+ "name": "site",
1744
+ "columns": {
1745
+ "id": {
1746
+ "name": "id",
1747
+ "type": "text",
1748
+ "primaryKey": true,
1749
+ "notNull": true,
1750
+ "autoincrement": false
1751
+ },
1752
+ "key": {
1753
+ "name": "key",
1754
+ "type": "text",
1755
+ "primaryKey": false,
1756
+ "notNull": true,
1757
+ "autoincrement": false
1758
+ },
1759
+ "status": {
1760
+ "name": "status",
1761
+ "type": "text",
1762
+ "primaryKey": false,
1763
+ "notNull": true,
1764
+ "autoincrement": false,
1765
+ "default": "'active'"
1766
+ },
1767
+ "provisioning_idempotency_key": {
1768
+ "name": "provisioning_idempotency_key",
1769
+ "type": "text",
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
+ "updated_at": {
1782
+ "name": "updated_at",
1783
+ "type": "integer",
1784
+ "primaryKey": false,
1785
+ "notNull": true,
1786
+ "autoincrement": false
1787
+ }
1788
+ },
1789
+ "indexes": {
1790
+ "uq_site_key": {
1791
+ "name": "uq_site_key",
1792
+ "columns": ["key"],
1793
+ "isUnique": true
1794
+ },
1795
+ "uq_site_provisioning_idempotency_key": {
1796
+ "name": "uq_site_provisioning_idempotency_key",
1797
+ "columns": ["provisioning_idempotency_key"],
1798
+ "isUnique": true,
1799
+ "where": "\"site\".\"provisioning_idempotency_key\" IS NOT NULL"
1800
+ }
1801
+ },
1802
+ "foreignKeys": {},
1803
+ "compositePrimaryKeys": {},
1804
+ "uniqueConstraints": {},
1805
+ "checkConstraints": {
1806
+ "chk_site_status": {
1807
+ "name": "chk_site_status",
1808
+ "value": "\"site\".\"status\" IN ('active', 'suspended')"
1809
+ }
1810
+ }
1811
+ },
1812
+ "upload_session": {
1813
+ "name": "upload_session",
1814
+ "columns": {
1815
+ "id": {
1816
+ "name": "id",
1817
+ "type": "text",
1818
+ "primaryKey": true,
1819
+ "notNull": true,
1820
+ "autoincrement": false
1821
+ },
1822
+ "site_id": {
1823
+ "name": "site_id",
1824
+ "type": "text",
1825
+ "primaryKey": false,
1826
+ "notNull": true,
1827
+ "autoincrement": false
1828
+ },
1829
+ "media_id": {
1830
+ "name": "media_id",
1831
+ "type": "text",
1832
+ "primaryKey": false,
1833
+ "notNull": true,
1834
+ "autoincrement": false
1835
+ },
1836
+ "original_name": {
1837
+ "name": "original_name",
1838
+ "type": "text",
1839
+ "primaryKey": false,
1840
+ "notNull": true,
1841
+ "autoincrement": false
1842
+ },
1843
+ "filename": {
1844
+ "name": "filename",
1845
+ "type": "text",
1846
+ "primaryKey": false,
1847
+ "notNull": true,
1848
+ "autoincrement": false
1849
+ },
1850
+ "provider": {
1851
+ "name": "provider",
1852
+ "type": "text",
1853
+ "primaryKey": false,
1854
+ "notNull": true,
1855
+ "autoincrement": false
1856
+ },
1857
+ "expected_content_type": {
1858
+ "name": "expected_content_type",
1859
+ "type": "text",
1860
+ "primaryKey": false,
1861
+ "notNull": true,
1862
+ "autoincrement": false
1863
+ },
1864
+ "expected_size": {
1865
+ "name": "expected_size",
1866
+ "type": "integer",
1867
+ "primaryKey": false,
1868
+ "notNull": true,
1869
+ "autoincrement": false
1870
+ },
1871
+ "expected_checksum_sha256": {
1872
+ "name": "expected_checksum_sha256",
1873
+ "type": "text",
1874
+ "primaryKey": false,
1875
+ "notNull": false,
1876
+ "autoincrement": false
1877
+ },
1878
+ "content_disposition": {
1879
+ "name": "content_disposition",
1880
+ "type": "text",
1881
+ "primaryKey": false,
1882
+ "notNull": true,
1883
+ "autoincrement": false,
1884
+ "default": "'inline'"
1885
+ },
1886
+ "temp_storage_key": {
1887
+ "name": "temp_storage_key",
1888
+ "type": "text",
1889
+ "primaryKey": false,
1890
+ "notNull": true,
1891
+ "autoincrement": false
1892
+ },
1893
+ "final_storage_key": {
1894
+ "name": "final_storage_key",
1895
+ "type": "text",
1896
+ "primaryKey": false,
1897
+ "notNull": true,
1898
+ "autoincrement": false
1899
+ },
1900
+ "multipart_upload_id": {
1901
+ "name": "multipart_upload_id",
1902
+ "type": "text",
1903
+ "primaryKey": false,
1904
+ "notNull": false,
1905
+ "autoincrement": false
1906
+ },
1907
+ "state": {
1908
+ "name": "state",
1909
+ "type": "text",
1910
+ "primaryKey": false,
1911
+ "notNull": true,
1912
+ "autoincrement": false,
1913
+ "default": "'pending'"
1914
+ },
1915
+ "expires_at": {
1916
+ "name": "expires_at",
1917
+ "type": "integer",
1918
+ "primaryKey": false,
1919
+ "notNull": true,
1920
+ "autoincrement": false
1921
+ },
1922
+ "created_at": {
1923
+ "name": "created_at",
1924
+ "type": "integer",
1925
+ "primaryKey": false,
1926
+ "notNull": true,
1927
+ "autoincrement": false
1928
+ },
1929
+ "updated_at": {
1930
+ "name": "updated_at",
1931
+ "type": "integer",
1932
+ "primaryKey": false,
1933
+ "notNull": true,
1934
+ "autoincrement": false
1935
+ }
1936
+ },
1937
+ "indexes": {
1938
+ "uq_upload_session_media_id": {
1939
+ "name": "uq_upload_session_media_id",
1940
+ "columns": ["media_id"],
1941
+ "isUnique": true
1942
+ },
1943
+ "uq_upload_session_temp_storage_key": {
1944
+ "name": "uq_upload_session_temp_storage_key",
1945
+ "columns": ["temp_storage_key"],
1946
+ "isUnique": true
1947
+ },
1948
+ "uq_upload_session_final_storage_key": {
1949
+ "name": "uq_upload_session_final_storage_key",
1950
+ "columns": ["final_storage_key"],
1951
+ "isUnique": true
1952
+ },
1953
+ "idx_upload_session_site_state": {
1954
+ "name": "idx_upload_session_site_state",
1955
+ "columns": ["site_id", "state"],
1956
+ "isUnique": false
1957
+ },
1958
+ "idx_upload_session_site_expires_at": {
1959
+ "name": "idx_upload_session_site_expires_at",
1960
+ "columns": ["site_id", "expires_at"],
1961
+ "isUnique": false
1962
+ }
1963
+ },
1964
+ "foreignKeys": {
1965
+ "upload_session_site_id_site_id_fk": {
1966
+ "name": "upload_session_site_id_site_id_fk",
1967
+ "tableFrom": "upload_session",
1968
+ "tableTo": "site",
1969
+ "columnsFrom": ["site_id"],
1970
+ "columnsTo": ["id"],
1971
+ "onDelete": "cascade",
1972
+ "onUpdate": "no action"
1973
+ }
1974
+ },
1975
+ "compositePrimaryKeys": {},
1976
+ "uniqueConstraints": {},
1977
+ "checkConstraints": {
1978
+ "chk_upload_session_expected_size_positive": {
1979
+ "name": "chk_upload_session_expected_size_positive",
1980
+ "value": "\"upload_session\".\"expected_size\" > 0"
1981
+ },
1982
+ "chk_upload_session_state": {
1983
+ "name": "chk_upload_session_state",
1984
+ "value": "\"upload_session\".\"state\" IN ('pending', 'uploaded', 'completed', 'aborted', 'failed')"
1985
+ },
1986
+ "chk_upload_session_content_disposition": {
1987
+ "name": "chk_upload_session_content_disposition",
1988
+ "value": "\"upload_session\".\"content_disposition\" IN ('inline', 'attachment')"
1989
+ }
1990
+ }
1991
+ },
1992
+ "user": {
1993
+ "name": "user",
1994
+ "columns": {
1995
+ "id": {
1996
+ "name": "id",
1997
+ "type": "text",
1998
+ "primaryKey": true,
1999
+ "notNull": true,
2000
+ "autoincrement": false
2001
+ },
2002
+ "name": {
2003
+ "name": "name",
2004
+ "type": "text",
2005
+ "primaryKey": false,
2006
+ "notNull": true,
2007
+ "autoincrement": false
2008
+ },
2009
+ "email": {
2010
+ "name": "email",
2011
+ "type": "text",
2012
+ "primaryKey": false,
2013
+ "notNull": true,
2014
+ "autoincrement": false
2015
+ },
2016
+ "email_verified": {
2017
+ "name": "email_verified",
2018
+ "type": "integer",
2019
+ "primaryKey": false,
2020
+ "notNull": true,
2021
+ "autoincrement": false,
2022
+ "default": false
2023
+ },
2024
+ "image": {
2025
+ "name": "image",
2026
+ "type": "text",
2027
+ "primaryKey": false,
2028
+ "notNull": false,
2029
+ "autoincrement": false
2030
+ },
2031
+ "role": {
2032
+ "name": "role",
2033
+ "type": "text",
2034
+ "primaryKey": false,
2035
+ "notNull": false,
2036
+ "autoincrement": false,
2037
+ "default": "'member'"
2038
+ },
2039
+ "created_at": {
2040
+ "name": "created_at",
2041
+ "type": "integer",
2042
+ "primaryKey": false,
2043
+ "notNull": true,
2044
+ "autoincrement": false
2045
+ },
2046
+ "updated_at": {
2047
+ "name": "updated_at",
2048
+ "type": "integer",
2049
+ "primaryKey": false,
2050
+ "notNull": true,
2051
+ "autoincrement": false
2052
+ }
2053
+ },
2054
+ "indexes": {
2055
+ "user_email_unique": {
2056
+ "name": "user_email_unique",
2057
+ "columns": ["email"],
2058
+ "isUnique": true
2059
+ }
2060
+ },
2061
+ "foreignKeys": {},
2062
+ "compositePrimaryKeys": {},
2063
+ "uniqueConstraints": {},
2064
+ "checkConstraints": {}
2065
+ },
2066
+ "verification": {
2067
+ "name": "verification",
2068
+ "columns": {
2069
+ "id": {
2070
+ "name": "id",
2071
+ "type": "text",
2072
+ "primaryKey": true,
2073
+ "notNull": true,
2074
+ "autoincrement": false
2075
+ },
2076
+ "identifier": {
2077
+ "name": "identifier",
2078
+ "type": "text",
2079
+ "primaryKey": false,
2080
+ "notNull": true,
2081
+ "autoincrement": false
2082
+ },
2083
+ "value": {
2084
+ "name": "value",
2085
+ "type": "text",
2086
+ "primaryKey": false,
2087
+ "notNull": true,
2088
+ "autoincrement": false
2089
+ },
2090
+ "expires_at": {
2091
+ "name": "expires_at",
2092
+ "type": "integer",
2093
+ "primaryKey": false,
2094
+ "notNull": true,
2095
+ "autoincrement": false
2096
+ },
2097
+ "created_at": {
2098
+ "name": "created_at",
2099
+ "type": "integer",
2100
+ "primaryKey": false,
2101
+ "notNull": false,
2102
+ "autoincrement": false
2103
+ },
2104
+ "updated_at": {
2105
+ "name": "updated_at",
2106
+ "type": "integer",
2107
+ "primaryKey": false,
2108
+ "notNull": false,
2109
+ "autoincrement": false
2110
+ }
2111
+ },
2112
+ "indexes": {},
2113
+ "foreignKeys": {},
2114
+ "compositePrimaryKeys": {},
2115
+ "uniqueConstraints": {},
2116
+ "checkConstraints": {}
2117
+ }
2118
+ },
2119
+ "views": {},
2120
+ "enums": {},
2121
+ "_meta": {
2122
+ "schemas": {},
2123
+ "tables": {},
2124
+ "columns": {}
2125
+ },
2126
+ "internal": {
2127
+ "indexes": {}
2128
+ }
2129
+ }