@hollware/server 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2257 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "a3a037dd-213e-49f5-be00-10d8b89e5d96",
5
+ "prevId": "69def611-7735-4276-a715-0fc44d818ed1",
6
+ "tables": {
7
+ "auth_challenges": {
8
+ "name": "auth_challenges",
9
+ "columns": {
10
+ "id": {
11
+ "name": "id",
12
+ "type": "text",
13
+ "primaryKey": true,
14
+ "notNull": true,
15
+ "autoincrement": false
16
+ },
17
+ "challenge": {
18
+ "name": "challenge",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true,
22
+ "autoincrement": false
23
+ },
24
+ "purpose": {
25
+ "name": "purpose",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": true,
29
+ "autoincrement": false
30
+ },
31
+ "invitation_id": {
32
+ "name": "invitation_id",
33
+ "type": "text",
34
+ "primaryKey": false,
35
+ "notNull": false,
36
+ "autoincrement": false
37
+ },
38
+ "user_id": {
39
+ "name": "user_id",
40
+ "type": "text",
41
+ "primaryKey": false,
42
+ "notNull": false,
43
+ "autoincrement": false
44
+ },
45
+ "expires_at": {
46
+ "name": "expires_at",
47
+ "type": "text",
48
+ "primaryKey": false,
49
+ "notNull": true,
50
+ "autoincrement": false
51
+ },
52
+ "created_at": {
53
+ "name": "created_at",
54
+ "type": "text",
55
+ "primaryKey": false,
56
+ "notNull": true,
57
+ "autoincrement": false
58
+ },
59
+ "updated_at": {
60
+ "name": "updated_at",
61
+ "type": "text",
62
+ "primaryKey": false,
63
+ "notNull": true,
64
+ "autoincrement": false
65
+ }
66
+ },
67
+ "indexes": {},
68
+ "foreignKeys": {},
69
+ "compositePrimaryKeys": {},
70
+ "uniqueConstraints": {},
71
+ "checkConstraints": {
72
+ "auth_challenges_purpose": {
73
+ "name": "auth_challenges_purpose",
74
+ "value": "\"auth_challenges\".\"purpose\" IN ('register', 'authenticate')"
75
+ }
76
+ }
77
+ },
78
+ "deliveries": {
79
+ "name": "deliveries",
80
+ "columns": {
81
+ "id": {
82
+ "name": "id",
83
+ "type": "text",
84
+ "primaryKey": true,
85
+ "notNull": true,
86
+ "autoincrement": false
87
+ },
88
+ "site_id": {
89
+ "name": "site_id",
90
+ "type": "text",
91
+ "primaryKey": false,
92
+ "notNull": true,
93
+ "autoincrement": false
94
+ },
95
+ "event_id": {
96
+ "name": "event_id",
97
+ "type": "text",
98
+ "primaryKey": false,
99
+ "notNull": true,
100
+ "autoincrement": false
101
+ },
102
+ "subscriber": {
103
+ "name": "subscriber",
104
+ "type": "text",
105
+ "primaryKey": false,
106
+ "notNull": true,
107
+ "autoincrement": false
108
+ },
109
+ "attempts": {
110
+ "name": "attempts",
111
+ "type": "integer",
112
+ "primaryKey": false,
113
+ "notNull": true,
114
+ "autoincrement": false
115
+ },
116
+ "delivered_at": {
117
+ "name": "delivered_at",
118
+ "type": "text",
119
+ "primaryKey": false,
120
+ "notNull": false,
121
+ "autoincrement": false
122
+ },
123
+ "last_error": {
124
+ "name": "last_error",
125
+ "type": "text",
126
+ "primaryKey": false,
127
+ "notNull": false,
128
+ "autoincrement": false
129
+ },
130
+ "created_at": {
131
+ "name": "created_at",
132
+ "type": "text",
133
+ "primaryKey": false,
134
+ "notNull": true,
135
+ "autoincrement": false
136
+ },
137
+ "updated_at": {
138
+ "name": "updated_at",
139
+ "type": "text",
140
+ "primaryKey": false,
141
+ "notNull": true,
142
+ "autoincrement": false
143
+ }
144
+ },
145
+ "indexes": {
146
+ "deliveries_id_site": {
147
+ "name": "deliveries_id_site",
148
+ "columns": [
149
+ "id",
150
+ "site_id"
151
+ ],
152
+ "isUnique": true
153
+ },
154
+ "deliveries_event_subscriber": {
155
+ "name": "deliveries_event_subscriber",
156
+ "columns": [
157
+ "event_id",
158
+ "subscriber"
159
+ ],
160
+ "isUnique": true
161
+ }
162
+ },
163
+ "foreignKeys": {
164
+ "deliveries_site": {
165
+ "name": "deliveries_site",
166
+ "tableFrom": "deliveries",
167
+ "tableTo": "sites",
168
+ "columnsFrom": [
169
+ "site_id"
170
+ ],
171
+ "columnsTo": [
172
+ "id"
173
+ ],
174
+ "onDelete": "no action",
175
+ "onUpdate": "no action"
176
+ },
177
+ "deliveries_event": {
178
+ "name": "deliveries_event",
179
+ "tableFrom": "deliveries",
180
+ "tableTo": "outbox",
181
+ "columnsFrom": [
182
+ "event_id",
183
+ "site_id"
184
+ ],
185
+ "columnsTo": [
186
+ "id",
187
+ "site_id"
188
+ ],
189
+ "onDelete": "no action",
190
+ "onUpdate": "no action"
191
+ }
192
+ },
193
+ "compositePrimaryKeys": {},
194
+ "uniqueConstraints": {},
195
+ "checkConstraints": {
196
+ "deliveries_attempts": {
197
+ "name": "deliveries_attempts",
198
+ "value": "\"deliveries\".\"attempts\" >= 0"
199
+ }
200
+ }
201
+ },
202
+ "entries": {
203
+ "name": "entries",
204
+ "columns": {
205
+ "id": {
206
+ "name": "id",
207
+ "type": "text",
208
+ "primaryKey": true,
209
+ "notNull": true,
210
+ "autoincrement": false
211
+ },
212
+ "site_id": {
213
+ "name": "site_id",
214
+ "type": "text",
215
+ "primaryKey": false,
216
+ "notNull": true,
217
+ "autoincrement": false
218
+ },
219
+ "collection": {
220
+ "name": "collection",
221
+ "type": "text",
222
+ "primaryKey": false,
223
+ "notNull": true,
224
+ "autoincrement": false
225
+ },
226
+ "locale": {
227
+ "name": "locale",
228
+ "type": "text",
229
+ "primaryKey": false,
230
+ "notNull": true,
231
+ "autoincrement": false
232
+ },
233
+ "slug": {
234
+ "name": "slug",
235
+ "type": "text",
236
+ "primaryKey": false,
237
+ "notNull": true,
238
+ "autoincrement": false
239
+ },
240
+ "translation_group": {
241
+ "name": "translation_group",
242
+ "type": "text",
243
+ "primaryKey": false,
244
+ "notNull": false,
245
+ "autoincrement": false
246
+ },
247
+ "status": {
248
+ "name": "status",
249
+ "type": "text",
250
+ "primaryKey": false,
251
+ "notNull": true,
252
+ "autoincrement": false
253
+ },
254
+ "version": {
255
+ "name": "version",
256
+ "type": "integer",
257
+ "primaryKey": false,
258
+ "notNull": true,
259
+ "autoincrement": false
260
+ },
261
+ "head_rev": {
262
+ "name": "head_rev",
263
+ "type": "text",
264
+ "primaryKey": false,
265
+ "notNull": true,
266
+ "autoincrement": false
267
+ },
268
+ "published_rev": {
269
+ "name": "published_rev",
270
+ "type": "text",
271
+ "primaryKey": false,
272
+ "notNull": false,
273
+ "autoincrement": false
274
+ },
275
+ "published_at": {
276
+ "name": "published_at",
277
+ "type": "text",
278
+ "primaryKey": false,
279
+ "notNull": false,
280
+ "autoincrement": false
281
+ },
282
+ "published_sort_key": {
283
+ "name": "published_sort_key",
284
+ "type": "text",
285
+ "primaryKey": false,
286
+ "notNull": false,
287
+ "autoincrement": false
288
+ },
289
+ "scheduled_at": {
290
+ "name": "scheduled_at",
291
+ "type": "text",
292
+ "primaryKey": false,
293
+ "notNull": false,
294
+ "autoincrement": false
295
+ },
296
+ "created_at": {
297
+ "name": "created_at",
298
+ "type": "text",
299
+ "primaryKey": false,
300
+ "notNull": true,
301
+ "autoincrement": false
302
+ },
303
+ "updated_at": {
304
+ "name": "updated_at",
305
+ "type": "text",
306
+ "primaryKey": false,
307
+ "notNull": true,
308
+ "autoincrement": false
309
+ }
310
+ },
311
+ "indexes": {
312
+ "entries_head": {
313
+ "name": "entries_head",
314
+ "columns": [
315
+ "site_id",
316
+ "collection",
317
+ "updated_at",
318
+ "id"
319
+ ],
320
+ "isUnique": false
321
+ },
322
+ "entries_head_locale": {
323
+ "name": "entries_head_locale",
324
+ "columns": [
325
+ "site_id",
326
+ "collection",
327
+ "locale",
328
+ "updated_at",
329
+ "id"
330
+ ],
331
+ "isUnique": false
332
+ },
333
+ "entries_published": {
334
+ "name": "entries_published",
335
+ "columns": [
336
+ "site_id",
337
+ "collection",
338
+ "locale",
339
+ "published_sort_key",
340
+ "id"
341
+ ],
342
+ "isUnique": false,
343
+ "where": "\"entries\".\"status\" = 'published'"
344
+ },
345
+ "entries_id_site": {
346
+ "name": "entries_id_site",
347
+ "columns": [
348
+ "id",
349
+ "site_id"
350
+ ],
351
+ "isUnique": true
352
+ },
353
+ "entries_slug": {
354
+ "name": "entries_slug",
355
+ "columns": [
356
+ "site_id",
357
+ "collection",
358
+ "locale",
359
+ "slug"
360
+ ],
361
+ "isUnique": true
362
+ },
363
+ "entries_translation": {
364
+ "name": "entries_translation",
365
+ "columns": [
366
+ "site_id",
367
+ "collection",
368
+ "translation_group",
369
+ "locale"
370
+ ],
371
+ "isUnique": true
372
+ }
373
+ },
374
+ "foreignKeys": {
375
+ "entries_site": {
376
+ "name": "entries_site",
377
+ "tableFrom": "entries",
378
+ "tableTo": "sites",
379
+ "columnsFrom": [
380
+ "site_id"
381
+ ],
382
+ "columnsTo": [
383
+ "id"
384
+ ],
385
+ "onDelete": "no action",
386
+ "onUpdate": "no action"
387
+ }
388
+ },
389
+ "compositePrimaryKeys": {},
390
+ "uniqueConstraints": {},
391
+ "checkConstraints": {
392
+ "entries_status": {
393
+ "name": "entries_status",
394
+ "value": "\"entries\".\"status\" IN ('draft', 'scheduled', 'published')"
395
+ },
396
+ "entries_version": {
397
+ "name": "entries_version",
398
+ "value": "\"entries\".\"version\" >= 1"
399
+ },
400
+ "entries_draft": {
401
+ "name": "entries_draft",
402
+ "value": "\"entries\".\"status\" <> 'draft' OR (\"entries\".\"published_rev\" IS NULL AND \"entries\".\"published_sort_key\" IS NULL AND \"entries\".\"scheduled_at\" IS NULL)"
403
+ },
404
+ "entries_published": {
405
+ "name": "entries_published",
406
+ "value": "\"entries\".\"status\" <> 'published' OR (\"entries\".\"published_rev\" IS NOT NULL AND \"entries\".\"published_at\" IS NOT NULL AND \"entries\".\"published_sort_key\" IS NOT NULL)"
407
+ },
408
+ "entries_scheduled": {
409
+ "name": "entries_scheduled",
410
+ "value": "\"entries\".\"status\" <> 'scheduled' OR \"entries\".\"scheduled_at\" IS NOT NULL"
411
+ }
412
+ }
413
+ },
414
+ "entry_embeddings": {
415
+ "name": "entry_embeddings",
416
+ "columns": {
417
+ "id": {
418
+ "name": "id",
419
+ "type": "text",
420
+ "primaryKey": true,
421
+ "notNull": true,
422
+ "autoincrement": false
423
+ },
424
+ "site_id": {
425
+ "name": "site_id",
426
+ "type": "text",
427
+ "primaryKey": false,
428
+ "notNull": true,
429
+ "autoincrement": false
430
+ },
431
+ "entry_id": {
432
+ "name": "entry_id",
433
+ "type": "text",
434
+ "primaryKey": false,
435
+ "notNull": true,
436
+ "autoincrement": false
437
+ },
438
+ "revision_id": {
439
+ "name": "revision_id",
440
+ "type": "text",
441
+ "primaryKey": false,
442
+ "notNull": true,
443
+ "autoincrement": false
444
+ },
445
+ "model": {
446
+ "name": "model",
447
+ "type": "text",
448
+ "primaryKey": false,
449
+ "notNull": true,
450
+ "autoincrement": false
451
+ },
452
+ "chunker_version": {
453
+ "name": "chunker_version",
454
+ "type": "text",
455
+ "primaryKey": false,
456
+ "notNull": true,
457
+ "autoincrement": false
458
+ },
459
+ "pieces": {
460
+ "name": "pieces",
461
+ "type": "integer",
462
+ "primaryKey": false,
463
+ "notNull": true,
464
+ "autoincrement": false
465
+ },
466
+ "related": {
467
+ "name": "related",
468
+ "type": "text",
469
+ "primaryKey": false,
470
+ "notNull": true,
471
+ "autoincrement": false,
472
+ "default": "'[]'"
473
+ },
474
+ "created_at": {
475
+ "name": "created_at",
476
+ "type": "text",
477
+ "primaryKey": false,
478
+ "notNull": true,
479
+ "autoincrement": false
480
+ },
481
+ "updated_at": {
482
+ "name": "updated_at",
483
+ "type": "text",
484
+ "primaryKey": false,
485
+ "notNull": true,
486
+ "autoincrement": false
487
+ }
488
+ },
489
+ "indexes": {
490
+ "entry_embeddings_id_site": {
491
+ "name": "entry_embeddings_id_site",
492
+ "columns": [
493
+ "id",
494
+ "site_id"
495
+ ],
496
+ "isUnique": true
497
+ },
498
+ "entry_embeddings_entry": {
499
+ "name": "entry_embeddings_entry",
500
+ "columns": [
501
+ "site_id",
502
+ "entry_id"
503
+ ],
504
+ "isUnique": true
505
+ }
506
+ },
507
+ "foreignKeys": {
508
+ "entry_embeddings_site": {
509
+ "name": "entry_embeddings_site",
510
+ "tableFrom": "entry_embeddings",
511
+ "tableTo": "sites",
512
+ "columnsFrom": [
513
+ "site_id"
514
+ ],
515
+ "columnsTo": [
516
+ "id"
517
+ ],
518
+ "onDelete": "no action",
519
+ "onUpdate": "no action"
520
+ },
521
+ "entry_embeddings_entry_fk": {
522
+ "name": "entry_embeddings_entry_fk",
523
+ "tableFrom": "entry_embeddings",
524
+ "tableTo": "entries",
525
+ "columnsFrom": [
526
+ "entry_id",
527
+ "site_id"
528
+ ],
529
+ "columnsTo": [
530
+ "id",
531
+ "site_id"
532
+ ],
533
+ "onDelete": "cascade",
534
+ "onUpdate": "no action"
535
+ },
536
+ "entry_embeddings_revision_fk": {
537
+ "name": "entry_embeddings_revision_fk",
538
+ "tableFrom": "entry_embeddings",
539
+ "tableTo": "revisions",
540
+ "columnsFrom": [
541
+ "revision_id",
542
+ "site_id"
543
+ ],
544
+ "columnsTo": [
545
+ "id",
546
+ "site_id"
547
+ ],
548
+ "onDelete": "no action",
549
+ "onUpdate": "no action"
550
+ }
551
+ },
552
+ "compositePrimaryKeys": {},
553
+ "uniqueConstraints": {},
554
+ "checkConstraints": {
555
+ "entry_embeddings_pieces": {
556
+ "name": "entry_embeddings_pieces",
557
+ "value": "\"entry_embeddings\".\"pieces\" >= 1"
558
+ }
559
+ }
560
+ },
561
+ "_hollware_meta": {
562
+ "name": "_hollware_meta",
563
+ "columns": {
564
+ "key": {
565
+ "name": "key",
566
+ "type": "text",
567
+ "primaryKey": true,
568
+ "notNull": true,
569
+ "autoincrement": false
570
+ },
571
+ "value": {
572
+ "name": "value",
573
+ "type": "text",
574
+ "primaryKey": false,
575
+ "notNull": true,
576
+ "autoincrement": false
577
+ }
578
+ },
579
+ "indexes": {},
580
+ "foreignKeys": {},
581
+ "compositePrimaryKeys": {},
582
+ "uniqueConstraints": {},
583
+ "checkConstraints": {}
584
+ },
585
+ "invitations": {
586
+ "name": "invitations",
587
+ "columns": {
588
+ "id": {
589
+ "name": "id",
590
+ "type": "text",
591
+ "primaryKey": true,
592
+ "notNull": true,
593
+ "autoincrement": false
594
+ },
595
+ "site_id": {
596
+ "name": "site_id",
597
+ "type": "text",
598
+ "primaryKey": false,
599
+ "notNull": true,
600
+ "autoincrement": false
601
+ },
602
+ "hash": {
603
+ "name": "hash",
604
+ "type": "text",
605
+ "primaryKey": false,
606
+ "notNull": true,
607
+ "autoincrement": false
608
+ },
609
+ "role": {
610
+ "name": "role",
611
+ "type": "text",
612
+ "primaryKey": false,
613
+ "notNull": true,
614
+ "autoincrement": false
615
+ },
616
+ "user_id": {
617
+ "name": "user_id",
618
+ "type": "text",
619
+ "primaryKey": false,
620
+ "notNull": false,
621
+ "autoincrement": false
622
+ },
623
+ "expires_at": {
624
+ "name": "expires_at",
625
+ "type": "text",
626
+ "primaryKey": false,
627
+ "notNull": true,
628
+ "autoincrement": false
629
+ },
630
+ "used_at": {
631
+ "name": "used_at",
632
+ "type": "text",
633
+ "primaryKey": false,
634
+ "notNull": false,
635
+ "autoincrement": false
636
+ },
637
+ "created_at": {
638
+ "name": "created_at",
639
+ "type": "text",
640
+ "primaryKey": false,
641
+ "notNull": true,
642
+ "autoincrement": false
643
+ },
644
+ "updated_at": {
645
+ "name": "updated_at",
646
+ "type": "text",
647
+ "primaryKey": false,
648
+ "notNull": true,
649
+ "autoincrement": false
650
+ }
651
+ },
652
+ "indexes": {
653
+ "invitations_id_site": {
654
+ "name": "invitations_id_site",
655
+ "columns": [
656
+ "id",
657
+ "site_id"
658
+ ],
659
+ "isUnique": true
660
+ },
661
+ "invitations_hash": {
662
+ "name": "invitations_hash",
663
+ "columns": [
664
+ "hash"
665
+ ],
666
+ "isUnique": true
667
+ }
668
+ },
669
+ "foreignKeys": {
670
+ "invitations_site": {
671
+ "name": "invitations_site",
672
+ "tableFrom": "invitations",
673
+ "tableTo": "sites",
674
+ "columnsFrom": [
675
+ "site_id"
676
+ ],
677
+ "columnsTo": [
678
+ "id"
679
+ ],
680
+ "onDelete": "no action",
681
+ "onUpdate": "no action"
682
+ },
683
+ "invitations_user": {
684
+ "name": "invitations_user",
685
+ "tableFrom": "invitations",
686
+ "tableTo": "users",
687
+ "columnsFrom": [
688
+ "user_id"
689
+ ],
690
+ "columnsTo": [
691
+ "id"
692
+ ],
693
+ "onDelete": "no action",
694
+ "onUpdate": "no action"
695
+ }
696
+ },
697
+ "compositePrimaryKeys": {},
698
+ "uniqueConstraints": {},
699
+ "checkConstraints": {
700
+ "invitations_role": {
701
+ "name": "invitations_role",
702
+ "value": "\"invitations\".\"role\" IN ('owner', 'editor', 'author')"
703
+ }
704
+ }
705
+ },
706
+ "members": {
707
+ "name": "members",
708
+ "columns": {
709
+ "id": {
710
+ "name": "id",
711
+ "type": "text",
712
+ "primaryKey": true,
713
+ "notNull": true,
714
+ "autoincrement": false
715
+ },
716
+ "site_id": {
717
+ "name": "site_id",
718
+ "type": "text",
719
+ "primaryKey": false,
720
+ "notNull": true,
721
+ "autoincrement": false
722
+ },
723
+ "user_id": {
724
+ "name": "user_id",
725
+ "type": "text",
726
+ "primaryKey": false,
727
+ "notNull": true,
728
+ "autoincrement": false
729
+ },
730
+ "role": {
731
+ "name": "role",
732
+ "type": "text",
733
+ "primaryKey": false,
734
+ "notNull": true,
735
+ "autoincrement": false
736
+ },
737
+ "created_at": {
738
+ "name": "created_at",
739
+ "type": "text",
740
+ "primaryKey": false,
741
+ "notNull": true,
742
+ "autoincrement": false
743
+ },
744
+ "updated_at": {
745
+ "name": "updated_at",
746
+ "type": "text",
747
+ "primaryKey": false,
748
+ "notNull": true,
749
+ "autoincrement": false
750
+ }
751
+ },
752
+ "indexes": {
753
+ "members_id_site": {
754
+ "name": "members_id_site",
755
+ "columns": [
756
+ "id",
757
+ "site_id"
758
+ ],
759
+ "isUnique": true
760
+ },
761
+ "members_person": {
762
+ "name": "members_person",
763
+ "columns": [
764
+ "site_id",
765
+ "user_id"
766
+ ],
767
+ "isUnique": true
768
+ }
769
+ },
770
+ "foreignKeys": {
771
+ "members_site": {
772
+ "name": "members_site",
773
+ "tableFrom": "members",
774
+ "tableTo": "sites",
775
+ "columnsFrom": [
776
+ "site_id"
777
+ ],
778
+ "columnsTo": [
779
+ "id"
780
+ ],
781
+ "onDelete": "no action",
782
+ "onUpdate": "no action"
783
+ },
784
+ "members_user": {
785
+ "name": "members_user",
786
+ "tableFrom": "members",
787
+ "tableTo": "users",
788
+ "columnsFrom": [
789
+ "user_id"
790
+ ],
791
+ "columnsTo": [
792
+ "id"
793
+ ],
794
+ "onDelete": "no action",
795
+ "onUpdate": "no action"
796
+ }
797
+ },
798
+ "compositePrimaryKeys": {},
799
+ "uniqueConstraints": {},
800
+ "checkConstraints": {
801
+ "members_role": {
802
+ "name": "members_role",
803
+ "value": "\"members\".\"role\" IN ('owner', 'editor', 'author')"
804
+ }
805
+ }
806
+ },
807
+ "outbox": {
808
+ "name": "outbox",
809
+ "columns": {
810
+ "id": {
811
+ "name": "id",
812
+ "type": "text",
813
+ "primaryKey": true,
814
+ "notNull": true,
815
+ "autoincrement": false
816
+ },
817
+ "site_id": {
818
+ "name": "site_id",
819
+ "type": "text",
820
+ "primaryKey": false,
821
+ "notNull": true,
822
+ "autoincrement": false
823
+ },
824
+ "kind": {
825
+ "name": "kind",
826
+ "type": "text",
827
+ "primaryKey": false,
828
+ "notNull": true,
829
+ "autoincrement": false
830
+ },
831
+ "entry_id": {
832
+ "name": "entry_id",
833
+ "type": "text",
834
+ "primaryKey": false,
835
+ "notNull": true,
836
+ "autoincrement": false
837
+ },
838
+ "payload": {
839
+ "name": "payload",
840
+ "type": "text",
841
+ "primaryKey": false,
842
+ "notNull": true,
843
+ "autoincrement": false
844
+ },
845
+ "sent_at": {
846
+ "name": "sent_at",
847
+ "type": "text",
848
+ "primaryKey": false,
849
+ "notNull": false,
850
+ "autoincrement": false
851
+ },
852
+ "created_at": {
853
+ "name": "created_at",
854
+ "type": "text",
855
+ "primaryKey": false,
856
+ "notNull": true,
857
+ "autoincrement": false
858
+ },
859
+ "updated_at": {
860
+ "name": "updated_at",
861
+ "type": "text",
862
+ "primaryKey": false,
863
+ "notNull": true,
864
+ "autoincrement": false
865
+ }
866
+ },
867
+ "indexes": {
868
+ "outbox_unsent": {
869
+ "name": "outbox_unsent",
870
+ "columns": [
871
+ "sent_at",
872
+ "created_at"
873
+ ],
874
+ "isUnique": false
875
+ },
876
+ "outbox_id_site": {
877
+ "name": "outbox_id_site",
878
+ "columns": [
879
+ "id",
880
+ "site_id"
881
+ ],
882
+ "isUnique": true
883
+ }
884
+ },
885
+ "foreignKeys": {
886
+ "outbox_site": {
887
+ "name": "outbox_site",
888
+ "tableFrom": "outbox",
889
+ "tableTo": "sites",
890
+ "columnsFrom": [
891
+ "site_id"
892
+ ],
893
+ "columnsTo": [
894
+ "id"
895
+ ],
896
+ "onDelete": "no action",
897
+ "onUpdate": "no action"
898
+ }
899
+ },
900
+ "compositePrimaryKeys": {},
901
+ "uniqueConstraints": {},
902
+ "checkConstraints": {
903
+ "outbox_kind": {
904
+ "name": "outbox_kind",
905
+ "value": "\"outbox\".\"kind\" IN ('entry.published', 'entry.unpublished')"
906
+ },
907
+ "outbox_json": {
908
+ "name": "outbox_json",
909
+ "value": "json_valid(\"outbox\".\"payload\") AND json_type(\"outbox\".\"payload\") = 'object'"
910
+ }
911
+ }
912
+ },
913
+ "passkeys": {
914
+ "name": "passkeys",
915
+ "columns": {
916
+ "id": {
917
+ "name": "id",
918
+ "type": "text",
919
+ "primaryKey": true,
920
+ "notNull": true,
921
+ "autoincrement": false
922
+ },
923
+ "user_id": {
924
+ "name": "user_id",
925
+ "type": "text",
926
+ "primaryKey": false,
927
+ "notNull": true,
928
+ "autoincrement": false
929
+ },
930
+ "credential_id": {
931
+ "name": "credential_id",
932
+ "type": "text",
933
+ "primaryKey": false,
934
+ "notNull": true,
935
+ "autoincrement": false
936
+ },
937
+ "public_key": {
938
+ "name": "public_key",
939
+ "type": "text",
940
+ "primaryKey": false,
941
+ "notNull": true,
942
+ "autoincrement": false
943
+ },
944
+ "counter": {
945
+ "name": "counter",
946
+ "type": "integer",
947
+ "primaryKey": false,
948
+ "notNull": true,
949
+ "autoincrement": false
950
+ },
951
+ "transports": {
952
+ "name": "transports",
953
+ "type": "text",
954
+ "primaryKey": false,
955
+ "notNull": true,
956
+ "autoincrement": false
957
+ },
958
+ "label": {
959
+ "name": "label",
960
+ "type": "text",
961
+ "primaryKey": false,
962
+ "notNull": true,
963
+ "autoincrement": false
964
+ },
965
+ "last_used_at": {
966
+ "name": "last_used_at",
967
+ "type": "text",
968
+ "primaryKey": false,
969
+ "notNull": false,
970
+ "autoincrement": false
971
+ },
972
+ "created_at": {
973
+ "name": "created_at",
974
+ "type": "text",
975
+ "primaryKey": false,
976
+ "notNull": true,
977
+ "autoincrement": false
978
+ },
979
+ "updated_at": {
980
+ "name": "updated_at",
981
+ "type": "text",
982
+ "primaryKey": false,
983
+ "notNull": true,
984
+ "autoincrement": false
985
+ }
986
+ },
987
+ "indexes": {
988
+ "passkeys_user": {
989
+ "name": "passkeys_user",
990
+ "columns": [
991
+ "user_id"
992
+ ],
993
+ "isUnique": false
994
+ },
995
+ "passkeys_credential": {
996
+ "name": "passkeys_credential",
997
+ "columns": [
998
+ "credential_id"
999
+ ],
1000
+ "isUnique": true
1001
+ }
1002
+ },
1003
+ "foreignKeys": {
1004
+ "passkeys_user_fk": {
1005
+ "name": "passkeys_user_fk",
1006
+ "tableFrom": "passkeys",
1007
+ "tableTo": "users",
1008
+ "columnsFrom": [
1009
+ "user_id"
1010
+ ],
1011
+ "columnsTo": [
1012
+ "id"
1013
+ ],
1014
+ "onDelete": "no action",
1015
+ "onUpdate": "no action"
1016
+ }
1017
+ },
1018
+ "compositePrimaryKeys": {},
1019
+ "uniqueConstraints": {},
1020
+ "checkConstraints": {
1021
+ "passkeys_counter": {
1022
+ "name": "passkeys_counter",
1023
+ "value": "\"passkeys\".\"counter\" >= 0"
1024
+ },
1025
+ "passkeys_json": {
1026
+ "name": "passkeys_json",
1027
+ "value": "json_valid(\"passkeys\".\"transports\") AND json_type(\"passkeys\".\"transports\") = 'array'"
1028
+ }
1029
+ }
1030
+ },
1031
+ "publications": {
1032
+ "name": "publications",
1033
+ "columns": {
1034
+ "id": {
1035
+ "name": "id",
1036
+ "type": "text",
1037
+ "primaryKey": true,
1038
+ "notNull": true,
1039
+ "autoincrement": false
1040
+ },
1041
+ "site_id": {
1042
+ "name": "site_id",
1043
+ "type": "text",
1044
+ "primaryKey": false,
1045
+ "notNull": true,
1046
+ "autoincrement": false
1047
+ },
1048
+ "entry_id": {
1049
+ "name": "entry_id",
1050
+ "type": "text",
1051
+ "primaryKey": false,
1052
+ "notNull": true,
1053
+ "autoincrement": false
1054
+ },
1055
+ "action": {
1056
+ "name": "action",
1057
+ "type": "text",
1058
+ "primaryKey": false,
1059
+ "notNull": true,
1060
+ "autoincrement": false
1061
+ },
1062
+ "revision_id": {
1063
+ "name": "revision_id",
1064
+ "type": "text",
1065
+ "primaryKey": false,
1066
+ "notNull": false,
1067
+ "autoincrement": false
1068
+ },
1069
+ "verdict": {
1070
+ "name": "verdict",
1071
+ "type": "text",
1072
+ "primaryKey": false,
1073
+ "notNull": false,
1074
+ "autoincrement": false
1075
+ },
1076
+ "acknowledged": {
1077
+ "name": "acknowledged",
1078
+ "type": "text",
1079
+ "primaryKey": false,
1080
+ "notNull": true,
1081
+ "autoincrement": false
1082
+ },
1083
+ "actor_kind": {
1084
+ "name": "actor_kind",
1085
+ "type": "text",
1086
+ "primaryKey": false,
1087
+ "notNull": true,
1088
+ "autoincrement": false
1089
+ },
1090
+ "actor_user_id": {
1091
+ "name": "actor_user_id",
1092
+ "type": "text",
1093
+ "primaryKey": false,
1094
+ "notNull": true,
1095
+ "autoincrement": false
1096
+ },
1097
+ "actor_token_id": {
1098
+ "name": "actor_token_id",
1099
+ "type": "text",
1100
+ "primaryKey": false,
1101
+ "notNull": false,
1102
+ "autoincrement": false
1103
+ },
1104
+ "actor_meta": {
1105
+ "name": "actor_meta",
1106
+ "type": "text",
1107
+ "primaryKey": false,
1108
+ "notNull": false,
1109
+ "autoincrement": false
1110
+ },
1111
+ "created_at": {
1112
+ "name": "created_at",
1113
+ "type": "text",
1114
+ "primaryKey": false,
1115
+ "notNull": true,
1116
+ "autoincrement": false
1117
+ },
1118
+ "updated_at": {
1119
+ "name": "updated_at",
1120
+ "type": "text",
1121
+ "primaryKey": false,
1122
+ "notNull": true,
1123
+ "autoincrement": false
1124
+ }
1125
+ },
1126
+ "indexes": {
1127
+ "publications_entry": {
1128
+ "name": "publications_entry",
1129
+ "columns": [
1130
+ "entry_id",
1131
+ "created_at"
1132
+ ],
1133
+ "isUnique": false
1134
+ },
1135
+ "publications_id_site": {
1136
+ "name": "publications_id_site",
1137
+ "columns": [
1138
+ "id",
1139
+ "site_id"
1140
+ ],
1141
+ "isUnique": true
1142
+ }
1143
+ },
1144
+ "foreignKeys": {
1145
+ "publications_site": {
1146
+ "name": "publications_site",
1147
+ "tableFrom": "publications",
1148
+ "tableTo": "sites",
1149
+ "columnsFrom": [
1150
+ "site_id"
1151
+ ],
1152
+ "columnsTo": [
1153
+ "id"
1154
+ ],
1155
+ "onDelete": "no action",
1156
+ "onUpdate": "no action"
1157
+ },
1158
+ "publications_entry": {
1159
+ "name": "publications_entry",
1160
+ "tableFrom": "publications",
1161
+ "tableTo": "entries",
1162
+ "columnsFrom": [
1163
+ "entry_id",
1164
+ "site_id"
1165
+ ],
1166
+ "columnsTo": [
1167
+ "id",
1168
+ "site_id"
1169
+ ],
1170
+ "onDelete": "no action",
1171
+ "onUpdate": "no action"
1172
+ },
1173
+ "publications_revision": {
1174
+ "name": "publications_revision",
1175
+ "tableFrom": "publications",
1176
+ "tableTo": "revisions",
1177
+ "columnsFrom": [
1178
+ "revision_id",
1179
+ "site_id"
1180
+ ],
1181
+ "columnsTo": [
1182
+ "id",
1183
+ "site_id"
1184
+ ],
1185
+ "onDelete": "no action",
1186
+ "onUpdate": "no action"
1187
+ },
1188
+ "publications_user": {
1189
+ "name": "publications_user",
1190
+ "tableFrom": "publications",
1191
+ "tableTo": "users",
1192
+ "columnsFrom": [
1193
+ "actor_user_id"
1194
+ ],
1195
+ "columnsTo": [
1196
+ "id"
1197
+ ],
1198
+ "onDelete": "no action",
1199
+ "onUpdate": "no action"
1200
+ },
1201
+ "publications_token": {
1202
+ "name": "publications_token",
1203
+ "tableFrom": "publications",
1204
+ "tableTo": "tokens",
1205
+ "columnsFrom": [
1206
+ "actor_token_id",
1207
+ "site_id"
1208
+ ],
1209
+ "columnsTo": [
1210
+ "id",
1211
+ "site_id"
1212
+ ],
1213
+ "onDelete": "no action",
1214
+ "onUpdate": "no action"
1215
+ }
1216
+ },
1217
+ "compositePrimaryKeys": {},
1218
+ "uniqueConstraints": {},
1219
+ "checkConstraints": {
1220
+ "publications_action": {
1221
+ "name": "publications_action",
1222
+ "value": "\"publications\".\"action\" IN ('publish', 'unpublish')"
1223
+ },
1224
+ "publications_shape": {
1225
+ "name": "publications_shape",
1226
+ "value": "(\"publications\".\"action\" = 'publish' AND \"publications\".\"revision_id\" IS NOT NULL AND \"publications\".\"verdict\" IS NOT NULL) OR (\"publications\".\"action\" = 'unpublish' AND \"publications\".\"revision_id\" IS NULL AND \"publications\".\"verdict\" IS NULL)"
1227
+ },
1228
+ "publications_actor_kind": {
1229
+ "name": "publications_actor_kind",
1230
+ "value": "\"publications\".\"actor_kind\" IN ('token', 'user', 'oauth_client')"
1231
+ },
1232
+ "publications_json": {
1233
+ "name": "publications_json",
1234
+ "value": "json_valid(\"publications\".\"acknowledged\") AND json_type(\"publications\".\"acknowledged\") = 'array' AND (\"publications\".\"verdict\" IS NULL OR json_valid(\"publications\".\"verdict\")) AND (\"publications\".\"actor_meta\" IS NULL OR json_valid(\"publications\".\"actor_meta\"))"
1235
+ }
1236
+ }
1237
+ },
1238
+ "reviews": {
1239
+ "name": "reviews",
1240
+ "columns": {
1241
+ "id": {
1242
+ "name": "id",
1243
+ "type": "text",
1244
+ "primaryKey": true,
1245
+ "notNull": true,
1246
+ "autoincrement": false
1247
+ },
1248
+ "site_id": {
1249
+ "name": "site_id",
1250
+ "type": "text",
1251
+ "primaryKey": false,
1252
+ "notNull": true,
1253
+ "autoincrement": false
1254
+ },
1255
+ "entry_id": {
1256
+ "name": "entry_id",
1257
+ "type": "text",
1258
+ "primaryKey": false,
1259
+ "notNull": true,
1260
+ "autoincrement": false
1261
+ },
1262
+ "revision_id": {
1263
+ "name": "revision_id",
1264
+ "type": "text",
1265
+ "primaryKey": false,
1266
+ "notNull": true,
1267
+ "autoincrement": false
1268
+ },
1269
+ "status": {
1270
+ "name": "status",
1271
+ "type": "text",
1272
+ "primaryKey": false,
1273
+ "notNull": true,
1274
+ "autoincrement": false
1275
+ },
1276
+ "acknowledged": {
1277
+ "name": "acknowledged",
1278
+ "type": "text",
1279
+ "primaryKey": false,
1280
+ "notNull": true,
1281
+ "autoincrement": false
1282
+ },
1283
+ "requested_by": {
1284
+ "name": "requested_by",
1285
+ "type": "text",
1286
+ "primaryKey": false,
1287
+ "notNull": true,
1288
+ "autoincrement": false
1289
+ },
1290
+ "requested_meta": {
1291
+ "name": "requested_meta",
1292
+ "type": "text",
1293
+ "primaryKey": false,
1294
+ "notNull": false,
1295
+ "autoincrement": false
1296
+ },
1297
+ "decided_by": {
1298
+ "name": "decided_by",
1299
+ "type": "text",
1300
+ "primaryKey": false,
1301
+ "notNull": false,
1302
+ "autoincrement": false
1303
+ },
1304
+ "decided_at": {
1305
+ "name": "decided_at",
1306
+ "type": "text",
1307
+ "primaryKey": false,
1308
+ "notNull": false,
1309
+ "autoincrement": false
1310
+ },
1311
+ "note": {
1312
+ "name": "note",
1313
+ "type": "text",
1314
+ "primaryKey": false,
1315
+ "notNull": false,
1316
+ "autoincrement": false
1317
+ },
1318
+ "created_at": {
1319
+ "name": "created_at",
1320
+ "type": "text",
1321
+ "primaryKey": false,
1322
+ "notNull": true,
1323
+ "autoincrement": false
1324
+ },
1325
+ "updated_at": {
1326
+ "name": "updated_at",
1327
+ "type": "text",
1328
+ "primaryKey": false,
1329
+ "notNull": true,
1330
+ "autoincrement": false
1331
+ }
1332
+ },
1333
+ "indexes": {
1334
+ "reviews_pending": {
1335
+ "name": "reviews_pending",
1336
+ "columns": [
1337
+ "site_id",
1338
+ "entry_id"
1339
+ ],
1340
+ "isUnique": true,
1341
+ "where": "\"reviews\".\"status\" = 'pending'"
1342
+ },
1343
+ "reviews_queue": {
1344
+ "name": "reviews_queue",
1345
+ "columns": [
1346
+ "site_id",
1347
+ "status",
1348
+ "created_at"
1349
+ ],
1350
+ "isUnique": false
1351
+ },
1352
+ "reviews_id_site": {
1353
+ "name": "reviews_id_site",
1354
+ "columns": [
1355
+ "id",
1356
+ "site_id"
1357
+ ],
1358
+ "isUnique": true
1359
+ }
1360
+ },
1361
+ "foreignKeys": {
1362
+ "reviews_site": {
1363
+ "name": "reviews_site",
1364
+ "tableFrom": "reviews",
1365
+ "tableTo": "sites",
1366
+ "columnsFrom": [
1367
+ "site_id"
1368
+ ],
1369
+ "columnsTo": [
1370
+ "id"
1371
+ ],
1372
+ "onDelete": "no action",
1373
+ "onUpdate": "no action"
1374
+ },
1375
+ "reviews_entry": {
1376
+ "name": "reviews_entry",
1377
+ "tableFrom": "reviews",
1378
+ "tableTo": "entries",
1379
+ "columnsFrom": [
1380
+ "entry_id",
1381
+ "site_id"
1382
+ ],
1383
+ "columnsTo": [
1384
+ "id",
1385
+ "site_id"
1386
+ ],
1387
+ "onDelete": "no action",
1388
+ "onUpdate": "no action"
1389
+ },
1390
+ "reviews_revision": {
1391
+ "name": "reviews_revision",
1392
+ "tableFrom": "reviews",
1393
+ "tableTo": "revisions",
1394
+ "columnsFrom": [
1395
+ "revision_id",
1396
+ "site_id"
1397
+ ],
1398
+ "columnsTo": [
1399
+ "id",
1400
+ "site_id"
1401
+ ],
1402
+ "onDelete": "no action",
1403
+ "onUpdate": "no action"
1404
+ },
1405
+ "reviews_requester": {
1406
+ "name": "reviews_requester",
1407
+ "tableFrom": "reviews",
1408
+ "tableTo": "users",
1409
+ "columnsFrom": [
1410
+ "requested_by"
1411
+ ],
1412
+ "columnsTo": [
1413
+ "id"
1414
+ ],
1415
+ "onDelete": "no action",
1416
+ "onUpdate": "no action"
1417
+ },
1418
+ "reviews_decider": {
1419
+ "name": "reviews_decider",
1420
+ "tableFrom": "reviews",
1421
+ "tableTo": "users",
1422
+ "columnsFrom": [
1423
+ "decided_by"
1424
+ ],
1425
+ "columnsTo": [
1426
+ "id"
1427
+ ],
1428
+ "onDelete": "no action",
1429
+ "onUpdate": "no action"
1430
+ }
1431
+ },
1432
+ "compositePrimaryKeys": {},
1433
+ "uniqueConstraints": {},
1434
+ "checkConstraints": {
1435
+ "reviews_status": {
1436
+ "name": "reviews_status",
1437
+ "value": "\"reviews\".\"status\" IN ('pending', 'approved', 'changes_requested', 'cancelled')"
1438
+ },
1439
+ "reviews_decided": {
1440
+ "name": "reviews_decided",
1441
+ "value": "(\"reviews\".\"status\" IN ('pending', 'cancelled')) OR (\"reviews\".\"decided_by\" IS NOT NULL AND \"reviews\".\"decided_at\" IS NOT NULL)"
1442
+ },
1443
+ "reviews_json": {
1444
+ "name": "reviews_json",
1445
+ "value": "json_valid(\"reviews\".\"acknowledged\") AND json_type(\"reviews\".\"acknowledged\") = 'array' AND (\"reviews\".\"requested_meta\" IS NULL OR json_valid(\"reviews\".\"requested_meta\"))"
1446
+ }
1447
+ }
1448
+ },
1449
+ "revision_tags": {
1450
+ "name": "revision_tags",
1451
+ "columns": {
1452
+ "id": {
1453
+ "name": "id",
1454
+ "type": "text",
1455
+ "primaryKey": true,
1456
+ "notNull": true,
1457
+ "autoincrement": false
1458
+ },
1459
+ "site_id": {
1460
+ "name": "site_id",
1461
+ "type": "text",
1462
+ "primaryKey": false,
1463
+ "notNull": true,
1464
+ "autoincrement": false
1465
+ },
1466
+ "revision_id": {
1467
+ "name": "revision_id",
1468
+ "type": "text",
1469
+ "primaryKey": false,
1470
+ "notNull": true,
1471
+ "autoincrement": false
1472
+ },
1473
+ "tag": {
1474
+ "name": "tag",
1475
+ "type": "text",
1476
+ "primaryKey": false,
1477
+ "notNull": true,
1478
+ "autoincrement": false
1479
+ },
1480
+ "created_at": {
1481
+ "name": "created_at",
1482
+ "type": "text",
1483
+ "primaryKey": false,
1484
+ "notNull": true,
1485
+ "autoincrement": false
1486
+ },
1487
+ "updated_at": {
1488
+ "name": "updated_at",
1489
+ "type": "text",
1490
+ "primaryKey": false,
1491
+ "notNull": true,
1492
+ "autoincrement": false
1493
+ }
1494
+ },
1495
+ "indexes": {
1496
+ "revision_tags_by_tag": {
1497
+ "name": "revision_tags_by_tag",
1498
+ "columns": [
1499
+ "site_id",
1500
+ "tag"
1501
+ ],
1502
+ "isUnique": false
1503
+ },
1504
+ "revision_tags_id_site": {
1505
+ "name": "revision_tags_id_site",
1506
+ "columns": [
1507
+ "id",
1508
+ "site_id"
1509
+ ],
1510
+ "isUnique": true
1511
+ },
1512
+ "revision_tags_tag": {
1513
+ "name": "revision_tags_tag",
1514
+ "columns": [
1515
+ "revision_id",
1516
+ "tag"
1517
+ ],
1518
+ "isUnique": true
1519
+ }
1520
+ },
1521
+ "foreignKeys": {
1522
+ "revision_tags_site": {
1523
+ "name": "revision_tags_site",
1524
+ "tableFrom": "revision_tags",
1525
+ "tableTo": "sites",
1526
+ "columnsFrom": [
1527
+ "site_id"
1528
+ ],
1529
+ "columnsTo": [
1530
+ "id"
1531
+ ],
1532
+ "onDelete": "no action",
1533
+ "onUpdate": "no action"
1534
+ },
1535
+ "revision_tags_revision": {
1536
+ "name": "revision_tags_revision",
1537
+ "tableFrom": "revision_tags",
1538
+ "tableTo": "revisions",
1539
+ "columnsFrom": [
1540
+ "revision_id",
1541
+ "site_id"
1542
+ ],
1543
+ "columnsTo": [
1544
+ "id",
1545
+ "site_id"
1546
+ ],
1547
+ "onDelete": "no action",
1548
+ "onUpdate": "no action"
1549
+ }
1550
+ },
1551
+ "compositePrimaryKeys": {},
1552
+ "uniqueConstraints": {},
1553
+ "checkConstraints": {}
1554
+ },
1555
+ "revisions": {
1556
+ "name": "revisions",
1557
+ "columns": {
1558
+ "id": {
1559
+ "name": "id",
1560
+ "type": "text",
1561
+ "primaryKey": true,
1562
+ "notNull": true,
1563
+ "autoincrement": false
1564
+ },
1565
+ "site_id": {
1566
+ "name": "site_id",
1567
+ "type": "text",
1568
+ "primaryKey": false,
1569
+ "notNull": true,
1570
+ "autoincrement": false
1571
+ },
1572
+ "entry_id": {
1573
+ "name": "entry_id",
1574
+ "type": "text",
1575
+ "primaryKey": false,
1576
+ "notNull": true,
1577
+ "autoincrement": false
1578
+ },
1579
+ "markdown": {
1580
+ "name": "markdown",
1581
+ "type": "text",
1582
+ "primaryKey": false,
1583
+ "notNull": true,
1584
+ "autoincrement": false
1585
+ },
1586
+ "frontmatter": {
1587
+ "name": "frontmatter",
1588
+ "type": "text",
1589
+ "primaryKey": false,
1590
+ "notNull": true,
1591
+ "autoincrement": false
1592
+ },
1593
+ "document": {
1594
+ "name": "document",
1595
+ "type": "text",
1596
+ "primaryKey": false,
1597
+ "notNull": true,
1598
+ "autoincrement": false
1599
+ },
1600
+ "comark_version": {
1601
+ "name": "comark_version",
1602
+ "type": "text",
1603
+ "primaryKey": false,
1604
+ "notNull": true,
1605
+ "autoincrement": false
1606
+ },
1607
+ "pipeline_version": {
1608
+ "name": "pipeline_version",
1609
+ "type": "text",
1610
+ "primaryKey": false,
1611
+ "notNull": true,
1612
+ "autoincrement": false
1613
+ },
1614
+ "word_count": {
1615
+ "name": "word_count",
1616
+ "type": "integer",
1617
+ "primaryKey": false,
1618
+ "notNull": true,
1619
+ "autoincrement": false
1620
+ },
1621
+ "verdict": {
1622
+ "name": "verdict",
1623
+ "type": "text",
1624
+ "primaryKey": false,
1625
+ "notNull": true,
1626
+ "autoincrement": false
1627
+ },
1628
+ "actor_kind": {
1629
+ "name": "actor_kind",
1630
+ "type": "text",
1631
+ "primaryKey": false,
1632
+ "notNull": true,
1633
+ "autoincrement": false
1634
+ },
1635
+ "actor_user_id": {
1636
+ "name": "actor_user_id",
1637
+ "type": "text",
1638
+ "primaryKey": false,
1639
+ "notNull": true,
1640
+ "autoincrement": false
1641
+ },
1642
+ "actor_token_id": {
1643
+ "name": "actor_token_id",
1644
+ "type": "text",
1645
+ "primaryKey": false,
1646
+ "notNull": false,
1647
+ "autoincrement": false
1648
+ },
1649
+ "actor_meta": {
1650
+ "name": "actor_meta",
1651
+ "type": "text",
1652
+ "primaryKey": false,
1653
+ "notNull": false,
1654
+ "autoincrement": false
1655
+ },
1656
+ "created_at": {
1657
+ "name": "created_at",
1658
+ "type": "text",
1659
+ "primaryKey": false,
1660
+ "notNull": true,
1661
+ "autoincrement": false
1662
+ },
1663
+ "updated_at": {
1664
+ "name": "updated_at",
1665
+ "type": "text",
1666
+ "primaryKey": false,
1667
+ "notNull": true,
1668
+ "autoincrement": false
1669
+ }
1670
+ },
1671
+ "indexes": {
1672
+ "revisions_entry": {
1673
+ "name": "revisions_entry",
1674
+ "columns": [
1675
+ "entry_id",
1676
+ "created_at"
1677
+ ],
1678
+ "isUnique": false
1679
+ },
1680
+ "revisions_id_site": {
1681
+ "name": "revisions_id_site",
1682
+ "columns": [
1683
+ "id",
1684
+ "site_id"
1685
+ ],
1686
+ "isUnique": true
1687
+ }
1688
+ },
1689
+ "foreignKeys": {
1690
+ "revisions_site": {
1691
+ "name": "revisions_site",
1692
+ "tableFrom": "revisions",
1693
+ "tableTo": "sites",
1694
+ "columnsFrom": [
1695
+ "site_id"
1696
+ ],
1697
+ "columnsTo": [
1698
+ "id"
1699
+ ],
1700
+ "onDelete": "no action",
1701
+ "onUpdate": "no action"
1702
+ },
1703
+ "revisions_entry": {
1704
+ "name": "revisions_entry",
1705
+ "tableFrom": "revisions",
1706
+ "tableTo": "entries",
1707
+ "columnsFrom": [
1708
+ "entry_id",
1709
+ "site_id"
1710
+ ],
1711
+ "columnsTo": [
1712
+ "id",
1713
+ "site_id"
1714
+ ],
1715
+ "onDelete": "no action",
1716
+ "onUpdate": "no action"
1717
+ },
1718
+ "revisions_user": {
1719
+ "name": "revisions_user",
1720
+ "tableFrom": "revisions",
1721
+ "tableTo": "users",
1722
+ "columnsFrom": [
1723
+ "actor_user_id"
1724
+ ],
1725
+ "columnsTo": [
1726
+ "id"
1727
+ ],
1728
+ "onDelete": "no action",
1729
+ "onUpdate": "no action"
1730
+ },
1731
+ "revisions_token": {
1732
+ "name": "revisions_token",
1733
+ "tableFrom": "revisions",
1734
+ "tableTo": "tokens",
1735
+ "columnsFrom": [
1736
+ "actor_token_id",
1737
+ "site_id"
1738
+ ],
1739
+ "columnsTo": [
1740
+ "id",
1741
+ "site_id"
1742
+ ],
1743
+ "onDelete": "no action",
1744
+ "onUpdate": "no action"
1745
+ }
1746
+ },
1747
+ "compositePrimaryKeys": {},
1748
+ "uniqueConstraints": {},
1749
+ "checkConstraints": {
1750
+ "revisions_actor_kind": {
1751
+ "name": "revisions_actor_kind",
1752
+ "value": "\"revisions\".\"actor_kind\" IN ('token', 'user', 'oauth_client')"
1753
+ },
1754
+ "revisions_json": {
1755
+ "name": "revisions_json",
1756
+ "value": "json_valid(\"revisions\".\"frontmatter\") AND json_valid(\"revisions\".\"document\") AND json_valid(\"revisions\".\"verdict\") AND (\"revisions\".\"actor_meta\" IS NULL OR json_valid(\"revisions\".\"actor_meta\"))"
1757
+ },
1758
+ "revisions_word_count": {
1759
+ "name": "revisions_word_count",
1760
+ "value": "\"revisions\".\"word_count\" >= 0"
1761
+ }
1762
+ }
1763
+ },
1764
+ "schedules": {
1765
+ "name": "schedules",
1766
+ "columns": {
1767
+ "id": {
1768
+ "name": "id",
1769
+ "type": "text",
1770
+ "primaryKey": true,
1771
+ "notNull": true,
1772
+ "autoincrement": false
1773
+ },
1774
+ "site_id": {
1775
+ "name": "site_id",
1776
+ "type": "text",
1777
+ "primaryKey": false,
1778
+ "notNull": true,
1779
+ "autoincrement": false
1780
+ },
1781
+ "entry_id": {
1782
+ "name": "entry_id",
1783
+ "type": "text",
1784
+ "primaryKey": false,
1785
+ "notNull": true,
1786
+ "autoincrement": false
1787
+ },
1788
+ "scheduled_at": {
1789
+ "name": "scheduled_at",
1790
+ "type": "text",
1791
+ "primaryKey": false,
1792
+ "notNull": true,
1793
+ "autoincrement": false
1794
+ },
1795
+ "version": {
1796
+ "name": "version",
1797
+ "type": "integer",
1798
+ "primaryKey": false,
1799
+ "notNull": true,
1800
+ "autoincrement": false
1801
+ },
1802
+ "acknowledged": {
1803
+ "name": "acknowledged",
1804
+ "type": "text",
1805
+ "primaryKey": false,
1806
+ "notNull": true,
1807
+ "autoincrement": false
1808
+ },
1809
+ "actor_kind": {
1810
+ "name": "actor_kind",
1811
+ "type": "text",
1812
+ "primaryKey": false,
1813
+ "notNull": true,
1814
+ "autoincrement": false
1815
+ },
1816
+ "actor_user_id": {
1817
+ "name": "actor_user_id",
1818
+ "type": "text",
1819
+ "primaryKey": false,
1820
+ "notNull": true,
1821
+ "autoincrement": false
1822
+ },
1823
+ "actor_token_id": {
1824
+ "name": "actor_token_id",
1825
+ "type": "text",
1826
+ "primaryKey": false,
1827
+ "notNull": false,
1828
+ "autoincrement": false
1829
+ },
1830
+ "actor_meta": {
1831
+ "name": "actor_meta",
1832
+ "type": "text",
1833
+ "primaryKey": false,
1834
+ "notNull": false,
1835
+ "autoincrement": false
1836
+ },
1837
+ "created_at": {
1838
+ "name": "created_at",
1839
+ "type": "text",
1840
+ "primaryKey": false,
1841
+ "notNull": true,
1842
+ "autoincrement": false
1843
+ },
1844
+ "updated_at": {
1845
+ "name": "updated_at",
1846
+ "type": "text",
1847
+ "primaryKey": false,
1848
+ "notNull": true,
1849
+ "autoincrement": false
1850
+ }
1851
+ },
1852
+ "indexes": {
1853
+ "schedules_due": {
1854
+ "name": "schedules_due",
1855
+ "columns": [
1856
+ "scheduled_at"
1857
+ ],
1858
+ "isUnique": false
1859
+ },
1860
+ "schedules_id_site": {
1861
+ "name": "schedules_id_site",
1862
+ "columns": [
1863
+ "id",
1864
+ "site_id"
1865
+ ],
1866
+ "isUnique": true
1867
+ },
1868
+ "schedules_entry": {
1869
+ "name": "schedules_entry",
1870
+ "columns": [
1871
+ "site_id",
1872
+ "entry_id"
1873
+ ],
1874
+ "isUnique": true
1875
+ }
1876
+ },
1877
+ "foreignKeys": {
1878
+ "schedules_site": {
1879
+ "name": "schedules_site",
1880
+ "tableFrom": "schedules",
1881
+ "tableTo": "sites",
1882
+ "columnsFrom": [
1883
+ "site_id"
1884
+ ],
1885
+ "columnsTo": [
1886
+ "id"
1887
+ ],
1888
+ "onDelete": "no action",
1889
+ "onUpdate": "no action"
1890
+ },
1891
+ "schedules_entry_fk": {
1892
+ "name": "schedules_entry_fk",
1893
+ "tableFrom": "schedules",
1894
+ "tableTo": "entries",
1895
+ "columnsFrom": [
1896
+ "entry_id",
1897
+ "site_id"
1898
+ ],
1899
+ "columnsTo": [
1900
+ "id",
1901
+ "site_id"
1902
+ ],
1903
+ "onDelete": "no action",
1904
+ "onUpdate": "no action"
1905
+ },
1906
+ "schedules_user": {
1907
+ "name": "schedules_user",
1908
+ "tableFrom": "schedules",
1909
+ "tableTo": "users",
1910
+ "columnsFrom": [
1911
+ "actor_user_id"
1912
+ ],
1913
+ "columnsTo": [
1914
+ "id"
1915
+ ],
1916
+ "onDelete": "no action",
1917
+ "onUpdate": "no action"
1918
+ },
1919
+ "schedules_token": {
1920
+ "name": "schedules_token",
1921
+ "tableFrom": "schedules",
1922
+ "tableTo": "tokens",
1923
+ "columnsFrom": [
1924
+ "actor_token_id",
1925
+ "site_id"
1926
+ ],
1927
+ "columnsTo": [
1928
+ "id",
1929
+ "site_id"
1930
+ ],
1931
+ "onDelete": "no action",
1932
+ "onUpdate": "no action"
1933
+ }
1934
+ },
1935
+ "compositePrimaryKeys": {},
1936
+ "uniqueConstraints": {},
1937
+ "checkConstraints": {
1938
+ "schedules_actor_kind": {
1939
+ "name": "schedules_actor_kind",
1940
+ "value": "\"schedules\".\"actor_kind\" IN ('token', 'user', 'oauth_client')"
1941
+ },
1942
+ "schedules_json": {
1943
+ "name": "schedules_json",
1944
+ "value": "json_valid(\"schedules\".\"acknowledged\") AND json_type(\"schedules\".\"acknowledged\") = 'array' AND (\"schedules\".\"actor_meta\" IS NULL OR json_valid(\"schedules\".\"actor_meta\"))"
1945
+ }
1946
+ }
1947
+ },
1948
+ "sessions": {
1949
+ "name": "sessions",
1950
+ "columns": {
1951
+ "id": {
1952
+ "name": "id",
1953
+ "type": "text",
1954
+ "primaryKey": true,
1955
+ "notNull": true,
1956
+ "autoincrement": false
1957
+ },
1958
+ "user_id": {
1959
+ "name": "user_id",
1960
+ "type": "text",
1961
+ "primaryKey": false,
1962
+ "notNull": true,
1963
+ "autoincrement": false
1964
+ },
1965
+ "hash": {
1966
+ "name": "hash",
1967
+ "type": "text",
1968
+ "primaryKey": false,
1969
+ "notNull": true,
1970
+ "autoincrement": false
1971
+ },
1972
+ "expires_at": {
1973
+ "name": "expires_at",
1974
+ "type": "text",
1975
+ "primaryKey": false,
1976
+ "notNull": true,
1977
+ "autoincrement": false
1978
+ },
1979
+ "created_at": {
1980
+ "name": "created_at",
1981
+ "type": "text",
1982
+ "primaryKey": false,
1983
+ "notNull": true,
1984
+ "autoincrement": false
1985
+ },
1986
+ "updated_at": {
1987
+ "name": "updated_at",
1988
+ "type": "text",
1989
+ "primaryKey": false,
1990
+ "notNull": true,
1991
+ "autoincrement": false
1992
+ }
1993
+ },
1994
+ "indexes": {
1995
+ "sessions_hash": {
1996
+ "name": "sessions_hash",
1997
+ "columns": [
1998
+ "hash"
1999
+ ],
2000
+ "isUnique": true
2001
+ }
2002
+ },
2003
+ "foreignKeys": {
2004
+ "sessions_user": {
2005
+ "name": "sessions_user",
2006
+ "tableFrom": "sessions",
2007
+ "tableTo": "users",
2008
+ "columnsFrom": [
2009
+ "user_id"
2010
+ ],
2011
+ "columnsTo": [
2012
+ "id"
2013
+ ],
2014
+ "onDelete": "no action",
2015
+ "onUpdate": "no action"
2016
+ }
2017
+ },
2018
+ "compositePrimaryKeys": {},
2019
+ "uniqueConstraints": {},
2020
+ "checkConstraints": {}
2021
+ },
2022
+ "sites": {
2023
+ "name": "sites",
2024
+ "columns": {
2025
+ "id": {
2026
+ "name": "id",
2027
+ "type": "text",
2028
+ "primaryKey": true,
2029
+ "notNull": true,
2030
+ "autoincrement": false
2031
+ },
2032
+ "created_at": {
2033
+ "name": "created_at",
2034
+ "type": "text",
2035
+ "primaryKey": false,
2036
+ "notNull": true,
2037
+ "autoincrement": false
2038
+ },
2039
+ "updated_at": {
2040
+ "name": "updated_at",
2041
+ "type": "text",
2042
+ "primaryKey": false,
2043
+ "notNull": true,
2044
+ "autoincrement": false
2045
+ }
2046
+ },
2047
+ "indexes": {},
2048
+ "foreignKeys": {},
2049
+ "compositePrimaryKeys": {},
2050
+ "uniqueConstraints": {},
2051
+ "checkConstraints": {}
2052
+ },
2053
+ "tokens": {
2054
+ "name": "tokens",
2055
+ "columns": {
2056
+ "id": {
2057
+ "name": "id",
2058
+ "type": "text",
2059
+ "primaryKey": true,
2060
+ "notNull": true,
2061
+ "autoincrement": false
2062
+ },
2063
+ "site_id": {
2064
+ "name": "site_id",
2065
+ "type": "text",
2066
+ "primaryKey": false,
2067
+ "notNull": true,
2068
+ "autoincrement": false
2069
+ },
2070
+ "user_id": {
2071
+ "name": "user_id",
2072
+ "type": "text",
2073
+ "primaryKey": false,
2074
+ "notNull": true,
2075
+ "autoincrement": false
2076
+ },
2077
+ "label": {
2078
+ "name": "label",
2079
+ "type": "text",
2080
+ "primaryKey": false,
2081
+ "notNull": true,
2082
+ "autoincrement": false
2083
+ },
2084
+ "hash": {
2085
+ "name": "hash",
2086
+ "type": "text",
2087
+ "primaryKey": false,
2088
+ "notNull": true,
2089
+ "autoincrement": false
2090
+ },
2091
+ "kind": {
2092
+ "name": "kind",
2093
+ "type": "text",
2094
+ "primaryKey": false,
2095
+ "notNull": true,
2096
+ "autoincrement": false,
2097
+ "default": "'personal'"
2098
+ },
2099
+ "scopes": {
2100
+ "name": "scopes",
2101
+ "type": "text",
2102
+ "primaryKey": false,
2103
+ "notNull": true,
2104
+ "autoincrement": false
2105
+ },
2106
+ "expires_at": {
2107
+ "name": "expires_at",
2108
+ "type": "text",
2109
+ "primaryKey": false,
2110
+ "notNull": false,
2111
+ "autoincrement": false
2112
+ },
2113
+ "revoked_at": {
2114
+ "name": "revoked_at",
2115
+ "type": "text",
2116
+ "primaryKey": false,
2117
+ "notNull": false,
2118
+ "autoincrement": false
2119
+ },
2120
+ "last_used_at": {
2121
+ "name": "last_used_at",
2122
+ "type": "text",
2123
+ "primaryKey": false,
2124
+ "notNull": false,
2125
+ "autoincrement": false
2126
+ },
2127
+ "created_at": {
2128
+ "name": "created_at",
2129
+ "type": "text",
2130
+ "primaryKey": false,
2131
+ "notNull": true,
2132
+ "autoincrement": false
2133
+ },
2134
+ "updated_at": {
2135
+ "name": "updated_at",
2136
+ "type": "text",
2137
+ "primaryKey": false,
2138
+ "notNull": true,
2139
+ "autoincrement": false
2140
+ }
2141
+ },
2142
+ "indexes": {
2143
+ "tokens_id_site": {
2144
+ "name": "tokens_id_site",
2145
+ "columns": [
2146
+ "id",
2147
+ "site_id"
2148
+ ],
2149
+ "isUnique": true
2150
+ },
2151
+ "tokens_hash": {
2152
+ "name": "tokens_hash",
2153
+ "columns": [
2154
+ "hash"
2155
+ ],
2156
+ "isUnique": true
2157
+ }
2158
+ },
2159
+ "foreignKeys": {
2160
+ "tokens_site": {
2161
+ "name": "tokens_site",
2162
+ "tableFrom": "tokens",
2163
+ "tableTo": "sites",
2164
+ "columnsFrom": [
2165
+ "site_id"
2166
+ ],
2167
+ "columnsTo": [
2168
+ "id"
2169
+ ],
2170
+ "onDelete": "no action",
2171
+ "onUpdate": "no action"
2172
+ },
2173
+ "tokens_user": {
2174
+ "name": "tokens_user",
2175
+ "tableFrom": "tokens",
2176
+ "tableTo": "users",
2177
+ "columnsFrom": [
2178
+ "user_id"
2179
+ ],
2180
+ "columnsTo": [
2181
+ "id"
2182
+ ],
2183
+ "onDelete": "no action",
2184
+ "onUpdate": "no action"
2185
+ }
2186
+ },
2187
+ "compositePrimaryKeys": {},
2188
+ "uniqueConstraints": {},
2189
+ "checkConstraints": {
2190
+ "tokens_scopes": {
2191
+ "name": "tokens_scopes",
2192
+ "value": "json_valid(\"tokens\".\"scopes\") AND json_type(\"tokens\".\"scopes\") = 'array'"
2193
+ }
2194
+ }
2195
+ },
2196
+ "users": {
2197
+ "name": "users",
2198
+ "columns": {
2199
+ "id": {
2200
+ "name": "id",
2201
+ "type": "text",
2202
+ "primaryKey": true,
2203
+ "notNull": true,
2204
+ "autoincrement": false
2205
+ },
2206
+ "name": {
2207
+ "name": "name",
2208
+ "type": "text",
2209
+ "primaryKey": false,
2210
+ "notNull": false,
2211
+ "autoincrement": false
2212
+ },
2213
+ "role": {
2214
+ "name": "role",
2215
+ "type": "text",
2216
+ "primaryKey": false,
2217
+ "notNull": true,
2218
+ "autoincrement": false
2219
+ },
2220
+ "created_at": {
2221
+ "name": "created_at",
2222
+ "type": "text",
2223
+ "primaryKey": false,
2224
+ "notNull": true,
2225
+ "autoincrement": false
2226
+ },
2227
+ "updated_at": {
2228
+ "name": "updated_at",
2229
+ "type": "text",
2230
+ "primaryKey": false,
2231
+ "notNull": true,
2232
+ "autoincrement": false
2233
+ }
2234
+ },
2235
+ "indexes": {},
2236
+ "foreignKeys": {},
2237
+ "compositePrimaryKeys": {},
2238
+ "uniqueConstraints": {},
2239
+ "checkConstraints": {
2240
+ "users_role": {
2241
+ "name": "users_role",
2242
+ "value": "\"users\".\"role\" IN ('owner', 'editor', 'reviewer')"
2243
+ }
2244
+ }
2245
+ }
2246
+ },
2247
+ "views": {},
2248
+ "enums": {},
2249
+ "_meta": {
2250
+ "schemas": {},
2251
+ "tables": {},
2252
+ "columns": {}
2253
+ },
2254
+ "internal": {
2255
+ "indexes": {}
2256
+ }
2257
+ }