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