@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,2110 @@
1
+ {
2
+ "id": "69def611-7735-4276-a715-0fc44d818ed1",
3
+ "prevId": "ad74d970-7ae2-45ea-854b-eae2469e3af8",
4
+ "version": "6",
5
+ "dialect": "sqlite",
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
+ "columnsFrom": [
168
+ "site_id"
169
+ ],
170
+ "tableTo": "sites",
171
+ "columnsTo": [
172
+ "id"
173
+ ],
174
+ "onUpdate": "no action",
175
+ "onDelete": "no action"
176
+ },
177
+ "deliveries_event": {
178
+ "name": "deliveries_event",
179
+ "tableFrom": "deliveries",
180
+ "columnsFrom": [
181
+ "event_id",
182
+ "site_id"
183
+ ],
184
+ "tableTo": "outbox",
185
+ "columnsTo": [
186
+ "id",
187
+ "site_id"
188
+ ],
189
+ "onUpdate": "no action",
190
+ "onDelete": "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
+ "where": "\"entries\".\"status\" = 'published'",
343
+ "isUnique": false
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
+ "columnsFrom": [
379
+ "site_id"
380
+ ],
381
+ "tableTo": "sites",
382
+ "columnsTo": [
383
+ "id"
384
+ ],
385
+ "onUpdate": "no action",
386
+ "onDelete": "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
+ "_hollware_meta": {
415
+ "name": "_hollware_meta",
416
+ "columns": {
417
+ "key": {
418
+ "name": "key",
419
+ "type": "text",
420
+ "primaryKey": true,
421
+ "notNull": true,
422
+ "autoincrement": false
423
+ },
424
+ "value": {
425
+ "name": "value",
426
+ "type": "text",
427
+ "primaryKey": false,
428
+ "notNull": true,
429
+ "autoincrement": false
430
+ }
431
+ },
432
+ "indexes": {},
433
+ "foreignKeys": {},
434
+ "compositePrimaryKeys": {},
435
+ "uniqueConstraints": {},
436
+ "checkConstraints": {}
437
+ },
438
+ "invitations": {
439
+ "name": "invitations",
440
+ "columns": {
441
+ "id": {
442
+ "name": "id",
443
+ "type": "text",
444
+ "primaryKey": true,
445
+ "notNull": true,
446
+ "autoincrement": false
447
+ },
448
+ "site_id": {
449
+ "name": "site_id",
450
+ "type": "text",
451
+ "primaryKey": false,
452
+ "notNull": true,
453
+ "autoincrement": false
454
+ },
455
+ "hash": {
456
+ "name": "hash",
457
+ "type": "text",
458
+ "primaryKey": false,
459
+ "notNull": true,
460
+ "autoincrement": false
461
+ },
462
+ "role": {
463
+ "name": "role",
464
+ "type": "text",
465
+ "primaryKey": false,
466
+ "notNull": true,
467
+ "autoincrement": false
468
+ },
469
+ "user_id": {
470
+ "name": "user_id",
471
+ "type": "text",
472
+ "primaryKey": false,
473
+ "notNull": false,
474
+ "autoincrement": false
475
+ },
476
+ "expires_at": {
477
+ "name": "expires_at",
478
+ "type": "text",
479
+ "primaryKey": false,
480
+ "notNull": true,
481
+ "autoincrement": false
482
+ },
483
+ "used_at": {
484
+ "name": "used_at",
485
+ "type": "text",
486
+ "primaryKey": false,
487
+ "notNull": false,
488
+ "autoincrement": false
489
+ },
490
+ "created_at": {
491
+ "name": "created_at",
492
+ "type": "text",
493
+ "primaryKey": false,
494
+ "notNull": true,
495
+ "autoincrement": false
496
+ },
497
+ "updated_at": {
498
+ "name": "updated_at",
499
+ "type": "text",
500
+ "primaryKey": false,
501
+ "notNull": true,
502
+ "autoincrement": false
503
+ }
504
+ },
505
+ "indexes": {
506
+ "invitations_id_site": {
507
+ "name": "invitations_id_site",
508
+ "columns": [
509
+ "id",
510
+ "site_id"
511
+ ],
512
+ "isUnique": true
513
+ },
514
+ "invitations_hash": {
515
+ "name": "invitations_hash",
516
+ "columns": [
517
+ "hash"
518
+ ],
519
+ "isUnique": true
520
+ }
521
+ },
522
+ "foreignKeys": {
523
+ "invitations_site": {
524
+ "name": "invitations_site",
525
+ "tableFrom": "invitations",
526
+ "columnsFrom": [
527
+ "site_id"
528
+ ],
529
+ "tableTo": "sites",
530
+ "columnsTo": [
531
+ "id"
532
+ ],
533
+ "onUpdate": "no action",
534
+ "onDelete": "no action"
535
+ },
536
+ "invitations_user": {
537
+ "name": "invitations_user",
538
+ "tableFrom": "invitations",
539
+ "columnsFrom": [
540
+ "user_id"
541
+ ],
542
+ "tableTo": "users",
543
+ "columnsTo": [
544
+ "id"
545
+ ],
546
+ "onUpdate": "no action",
547
+ "onDelete": "no action"
548
+ }
549
+ },
550
+ "compositePrimaryKeys": {},
551
+ "uniqueConstraints": {},
552
+ "checkConstraints": {
553
+ "invitations_role": {
554
+ "name": "invitations_role",
555
+ "value": "\"invitations\".\"role\" IN ('owner', 'editor', 'author')"
556
+ }
557
+ }
558
+ },
559
+ "members": {
560
+ "name": "members",
561
+ "columns": {
562
+ "id": {
563
+ "name": "id",
564
+ "type": "text",
565
+ "primaryKey": true,
566
+ "notNull": true,
567
+ "autoincrement": false
568
+ },
569
+ "site_id": {
570
+ "name": "site_id",
571
+ "type": "text",
572
+ "primaryKey": false,
573
+ "notNull": true,
574
+ "autoincrement": false
575
+ },
576
+ "user_id": {
577
+ "name": "user_id",
578
+ "type": "text",
579
+ "primaryKey": false,
580
+ "notNull": true,
581
+ "autoincrement": false
582
+ },
583
+ "role": {
584
+ "name": "role",
585
+ "type": "text",
586
+ "primaryKey": false,
587
+ "notNull": true,
588
+ "autoincrement": false
589
+ },
590
+ "created_at": {
591
+ "name": "created_at",
592
+ "type": "text",
593
+ "primaryKey": false,
594
+ "notNull": true,
595
+ "autoincrement": false
596
+ },
597
+ "updated_at": {
598
+ "name": "updated_at",
599
+ "type": "text",
600
+ "primaryKey": false,
601
+ "notNull": true,
602
+ "autoincrement": false
603
+ }
604
+ },
605
+ "indexes": {
606
+ "members_id_site": {
607
+ "name": "members_id_site",
608
+ "columns": [
609
+ "id",
610
+ "site_id"
611
+ ],
612
+ "isUnique": true
613
+ },
614
+ "members_person": {
615
+ "name": "members_person",
616
+ "columns": [
617
+ "site_id",
618
+ "user_id"
619
+ ],
620
+ "isUnique": true
621
+ }
622
+ },
623
+ "foreignKeys": {
624
+ "members_site": {
625
+ "name": "members_site",
626
+ "tableFrom": "members",
627
+ "columnsFrom": [
628
+ "site_id"
629
+ ],
630
+ "tableTo": "sites",
631
+ "columnsTo": [
632
+ "id"
633
+ ],
634
+ "onUpdate": "no action",
635
+ "onDelete": "no action"
636
+ },
637
+ "members_user": {
638
+ "name": "members_user",
639
+ "tableFrom": "members",
640
+ "columnsFrom": [
641
+ "user_id"
642
+ ],
643
+ "tableTo": "users",
644
+ "columnsTo": [
645
+ "id"
646
+ ],
647
+ "onUpdate": "no action",
648
+ "onDelete": "no action"
649
+ }
650
+ },
651
+ "compositePrimaryKeys": {},
652
+ "uniqueConstraints": {},
653
+ "checkConstraints": {
654
+ "members_role": {
655
+ "name": "members_role",
656
+ "value": "\"members\".\"role\" IN ('owner', 'editor', 'author')"
657
+ }
658
+ }
659
+ },
660
+ "outbox": {
661
+ "name": "outbox",
662
+ "columns": {
663
+ "id": {
664
+ "name": "id",
665
+ "type": "text",
666
+ "primaryKey": true,
667
+ "notNull": true,
668
+ "autoincrement": false
669
+ },
670
+ "site_id": {
671
+ "name": "site_id",
672
+ "type": "text",
673
+ "primaryKey": false,
674
+ "notNull": true,
675
+ "autoincrement": false
676
+ },
677
+ "kind": {
678
+ "name": "kind",
679
+ "type": "text",
680
+ "primaryKey": false,
681
+ "notNull": true,
682
+ "autoincrement": false
683
+ },
684
+ "entry_id": {
685
+ "name": "entry_id",
686
+ "type": "text",
687
+ "primaryKey": false,
688
+ "notNull": true,
689
+ "autoincrement": false
690
+ },
691
+ "payload": {
692
+ "name": "payload",
693
+ "type": "text",
694
+ "primaryKey": false,
695
+ "notNull": true,
696
+ "autoincrement": false
697
+ },
698
+ "sent_at": {
699
+ "name": "sent_at",
700
+ "type": "text",
701
+ "primaryKey": false,
702
+ "notNull": false,
703
+ "autoincrement": false
704
+ },
705
+ "created_at": {
706
+ "name": "created_at",
707
+ "type": "text",
708
+ "primaryKey": false,
709
+ "notNull": true,
710
+ "autoincrement": false
711
+ },
712
+ "updated_at": {
713
+ "name": "updated_at",
714
+ "type": "text",
715
+ "primaryKey": false,
716
+ "notNull": true,
717
+ "autoincrement": false
718
+ }
719
+ },
720
+ "indexes": {
721
+ "outbox_unsent": {
722
+ "name": "outbox_unsent",
723
+ "columns": [
724
+ "sent_at",
725
+ "created_at"
726
+ ],
727
+ "isUnique": false
728
+ },
729
+ "outbox_id_site": {
730
+ "name": "outbox_id_site",
731
+ "columns": [
732
+ "id",
733
+ "site_id"
734
+ ],
735
+ "isUnique": true
736
+ }
737
+ },
738
+ "foreignKeys": {
739
+ "outbox_site": {
740
+ "name": "outbox_site",
741
+ "tableFrom": "outbox",
742
+ "columnsFrom": [
743
+ "site_id"
744
+ ],
745
+ "tableTo": "sites",
746
+ "columnsTo": [
747
+ "id"
748
+ ],
749
+ "onUpdate": "no action",
750
+ "onDelete": "no action"
751
+ }
752
+ },
753
+ "compositePrimaryKeys": {},
754
+ "uniqueConstraints": {},
755
+ "checkConstraints": {
756
+ "outbox_kind": {
757
+ "name": "outbox_kind",
758
+ "value": "\"outbox\".\"kind\" IN ('entry.published', 'entry.unpublished')"
759
+ },
760
+ "outbox_json": {
761
+ "name": "outbox_json",
762
+ "value": "json_valid(\"outbox\".\"payload\") AND json_type(\"outbox\".\"payload\") = 'object'"
763
+ }
764
+ }
765
+ },
766
+ "passkeys": {
767
+ "name": "passkeys",
768
+ "columns": {
769
+ "id": {
770
+ "name": "id",
771
+ "type": "text",
772
+ "primaryKey": true,
773
+ "notNull": true,
774
+ "autoincrement": false
775
+ },
776
+ "user_id": {
777
+ "name": "user_id",
778
+ "type": "text",
779
+ "primaryKey": false,
780
+ "notNull": true,
781
+ "autoincrement": false
782
+ },
783
+ "credential_id": {
784
+ "name": "credential_id",
785
+ "type": "text",
786
+ "primaryKey": false,
787
+ "notNull": true,
788
+ "autoincrement": false
789
+ },
790
+ "public_key": {
791
+ "name": "public_key",
792
+ "type": "text",
793
+ "primaryKey": false,
794
+ "notNull": true,
795
+ "autoincrement": false
796
+ },
797
+ "counter": {
798
+ "name": "counter",
799
+ "type": "integer",
800
+ "primaryKey": false,
801
+ "notNull": true,
802
+ "autoincrement": false
803
+ },
804
+ "transports": {
805
+ "name": "transports",
806
+ "type": "text",
807
+ "primaryKey": false,
808
+ "notNull": true,
809
+ "autoincrement": false
810
+ },
811
+ "label": {
812
+ "name": "label",
813
+ "type": "text",
814
+ "primaryKey": false,
815
+ "notNull": true,
816
+ "autoincrement": false
817
+ },
818
+ "last_used_at": {
819
+ "name": "last_used_at",
820
+ "type": "text",
821
+ "primaryKey": false,
822
+ "notNull": false,
823
+ "autoincrement": false
824
+ },
825
+ "created_at": {
826
+ "name": "created_at",
827
+ "type": "text",
828
+ "primaryKey": false,
829
+ "notNull": true,
830
+ "autoincrement": false
831
+ },
832
+ "updated_at": {
833
+ "name": "updated_at",
834
+ "type": "text",
835
+ "primaryKey": false,
836
+ "notNull": true,
837
+ "autoincrement": false
838
+ }
839
+ },
840
+ "indexes": {
841
+ "passkeys_user": {
842
+ "name": "passkeys_user",
843
+ "columns": [
844
+ "user_id"
845
+ ],
846
+ "isUnique": false
847
+ },
848
+ "passkeys_credential": {
849
+ "name": "passkeys_credential",
850
+ "columns": [
851
+ "credential_id"
852
+ ],
853
+ "isUnique": true
854
+ }
855
+ },
856
+ "foreignKeys": {
857
+ "passkeys_user_fk": {
858
+ "name": "passkeys_user_fk",
859
+ "tableFrom": "passkeys",
860
+ "columnsFrom": [
861
+ "user_id"
862
+ ],
863
+ "tableTo": "users",
864
+ "columnsTo": [
865
+ "id"
866
+ ],
867
+ "onUpdate": "no action",
868
+ "onDelete": "no action"
869
+ }
870
+ },
871
+ "compositePrimaryKeys": {},
872
+ "uniqueConstraints": {},
873
+ "checkConstraints": {
874
+ "passkeys_counter": {
875
+ "name": "passkeys_counter",
876
+ "value": "\"passkeys\".\"counter\" >= 0"
877
+ },
878
+ "passkeys_json": {
879
+ "name": "passkeys_json",
880
+ "value": "json_valid(\"passkeys\".\"transports\") AND json_type(\"passkeys\".\"transports\") = 'array'"
881
+ }
882
+ }
883
+ },
884
+ "publications": {
885
+ "name": "publications",
886
+ "columns": {
887
+ "id": {
888
+ "name": "id",
889
+ "type": "text",
890
+ "primaryKey": true,
891
+ "notNull": true,
892
+ "autoincrement": false
893
+ },
894
+ "site_id": {
895
+ "name": "site_id",
896
+ "type": "text",
897
+ "primaryKey": false,
898
+ "notNull": true,
899
+ "autoincrement": false
900
+ },
901
+ "entry_id": {
902
+ "name": "entry_id",
903
+ "type": "text",
904
+ "primaryKey": false,
905
+ "notNull": true,
906
+ "autoincrement": false
907
+ },
908
+ "action": {
909
+ "name": "action",
910
+ "type": "text",
911
+ "primaryKey": false,
912
+ "notNull": true,
913
+ "autoincrement": false
914
+ },
915
+ "revision_id": {
916
+ "name": "revision_id",
917
+ "type": "text",
918
+ "primaryKey": false,
919
+ "notNull": false,
920
+ "autoincrement": false
921
+ },
922
+ "verdict": {
923
+ "name": "verdict",
924
+ "type": "text",
925
+ "primaryKey": false,
926
+ "notNull": false,
927
+ "autoincrement": false
928
+ },
929
+ "acknowledged": {
930
+ "name": "acknowledged",
931
+ "type": "text",
932
+ "primaryKey": false,
933
+ "notNull": true,
934
+ "autoincrement": false
935
+ },
936
+ "actor_kind": {
937
+ "name": "actor_kind",
938
+ "type": "text",
939
+ "primaryKey": false,
940
+ "notNull": true,
941
+ "autoincrement": false
942
+ },
943
+ "actor_user_id": {
944
+ "name": "actor_user_id",
945
+ "type": "text",
946
+ "primaryKey": false,
947
+ "notNull": true,
948
+ "autoincrement": false
949
+ },
950
+ "actor_token_id": {
951
+ "name": "actor_token_id",
952
+ "type": "text",
953
+ "primaryKey": false,
954
+ "notNull": false,
955
+ "autoincrement": false
956
+ },
957
+ "actor_meta": {
958
+ "name": "actor_meta",
959
+ "type": "text",
960
+ "primaryKey": false,
961
+ "notNull": false,
962
+ "autoincrement": false
963
+ },
964
+ "created_at": {
965
+ "name": "created_at",
966
+ "type": "text",
967
+ "primaryKey": false,
968
+ "notNull": true,
969
+ "autoincrement": false
970
+ },
971
+ "updated_at": {
972
+ "name": "updated_at",
973
+ "type": "text",
974
+ "primaryKey": false,
975
+ "notNull": true,
976
+ "autoincrement": false
977
+ }
978
+ },
979
+ "indexes": {
980
+ "publications_entry": {
981
+ "name": "publications_entry",
982
+ "columns": [
983
+ "entry_id",
984
+ "created_at"
985
+ ],
986
+ "isUnique": false
987
+ },
988
+ "publications_id_site": {
989
+ "name": "publications_id_site",
990
+ "columns": [
991
+ "id",
992
+ "site_id"
993
+ ],
994
+ "isUnique": true
995
+ }
996
+ },
997
+ "foreignKeys": {
998
+ "publications_site": {
999
+ "name": "publications_site",
1000
+ "tableFrom": "publications",
1001
+ "columnsFrom": [
1002
+ "site_id"
1003
+ ],
1004
+ "tableTo": "sites",
1005
+ "columnsTo": [
1006
+ "id"
1007
+ ],
1008
+ "onUpdate": "no action",
1009
+ "onDelete": "no action"
1010
+ },
1011
+ "publications_entry": {
1012
+ "name": "publications_entry",
1013
+ "tableFrom": "publications",
1014
+ "columnsFrom": [
1015
+ "entry_id",
1016
+ "site_id"
1017
+ ],
1018
+ "tableTo": "entries",
1019
+ "columnsTo": [
1020
+ "id",
1021
+ "site_id"
1022
+ ],
1023
+ "onUpdate": "no action",
1024
+ "onDelete": "no action"
1025
+ },
1026
+ "publications_revision": {
1027
+ "name": "publications_revision",
1028
+ "tableFrom": "publications",
1029
+ "columnsFrom": [
1030
+ "revision_id",
1031
+ "site_id"
1032
+ ],
1033
+ "tableTo": "revisions",
1034
+ "columnsTo": [
1035
+ "id",
1036
+ "site_id"
1037
+ ],
1038
+ "onUpdate": "no action",
1039
+ "onDelete": "no action"
1040
+ },
1041
+ "publications_user": {
1042
+ "name": "publications_user",
1043
+ "tableFrom": "publications",
1044
+ "columnsFrom": [
1045
+ "actor_user_id"
1046
+ ],
1047
+ "tableTo": "users",
1048
+ "columnsTo": [
1049
+ "id"
1050
+ ],
1051
+ "onUpdate": "no action",
1052
+ "onDelete": "no action"
1053
+ },
1054
+ "publications_token": {
1055
+ "name": "publications_token",
1056
+ "tableFrom": "publications",
1057
+ "columnsFrom": [
1058
+ "actor_token_id",
1059
+ "site_id"
1060
+ ],
1061
+ "tableTo": "tokens",
1062
+ "columnsTo": [
1063
+ "id",
1064
+ "site_id"
1065
+ ],
1066
+ "onUpdate": "no action",
1067
+ "onDelete": "no action"
1068
+ }
1069
+ },
1070
+ "compositePrimaryKeys": {},
1071
+ "uniqueConstraints": {},
1072
+ "checkConstraints": {
1073
+ "publications_action": {
1074
+ "name": "publications_action",
1075
+ "value": "\"publications\".\"action\" IN ('publish', 'unpublish')"
1076
+ },
1077
+ "publications_shape": {
1078
+ "name": "publications_shape",
1079
+ "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)"
1080
+ },
1081
+ "publications_actor_kind": {
1082
+ "name": "publications_actor_kind",
1083
+ "value": "\"publications\".\"actor_kind\" IN ('token', 'user', 'oauth_client')"
1084
+ },
1085
+ "publications_json": {
1086
+ "name": "publications_json",
1087
+ "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\"))"
1088
+ }
1089
+ }
1090
+ },
1091
+ "reviews": {
1092
+ "name": "reviews",
1093
+ "columns": {
1094
+ "id": {
1095
+ "name": "id",
1096
+ "type": "text",
1097
+ "primaryKey": true,
1098
+ "notNull": true,
1099
+ "autoincrement": false
1100
+ },
1101
+ "site_id": {
1102
+ "name": "site_id",
1103
+ "type": "text",
1104
+ "primaryKey": false,
1105
+ "notNull": true,
1106
+ "autoincrement": false
1107
+ },
1108
+ "entry_id": {
1109
+ "name": "entry_id",
1110
+ "type": "text",
1111
+ "primaryKey": false,
1112
+ "notNull": true,
1113
+ "autoincrement": false
1114
+ },
1115
+ "revision_id": {
1116
+ "name": "revision_id",
1117
+ "type": "text",
1118
+ "primaryKey": false,
1119
+ "notNull": true,
1120
+ "autoincrement": false
1121
+ },
1122
+ "status": {
1123
+ "name": "status",
1124
+ "type": "text",
1125
+ "primaryKey": false,
1126
+ "notNull": true,
1127
+ "autoincrement": false
1128
+ },
1129
+ "acknowledged": {
1130
+ "name": "acknowledged",
1131
+ "type": "text",
1132
+ "primaryKey": false,
1133
+ "notNull": true,
1134
+ "autoincrement": false
1135
+ },
1136
+ "requested_by": {
1137
+ "name": "requested_by",
1138
+ "type": "text",
1139
+ "primaryKey": false,
1140
+ "notNull": true,
1141
+ "autoincrement": false
1142
+ },
1143
+ "requested_meta": {
1144
+ "name": "requested_meta",
1145
+ "type": "text",
1146
+ "primaryKey": false,
1147
+ "notNull": false,
1148
+ "autoincrement": false
1149
+ },
1150
+ "decided_by": {
1151
+ "name": "decided_by",
1152
+ "type": "text",
1153
+ "primaryKey": false,
1154
+ "notNull": false,
1155
+ "autoincrement": false
1156
+ },
1157
+ "decided_at": {
1158
+ "name": "decided_at",
1159
+ "type": "text",
1160
+ "primaryKey": false,
1161
+ "notNull": false,
1162
+ "autoincrement": false
1163
+ },
1164
+ "note": {
1165
+ "name": "note",
1166
+ "type": "text",
1167
+ "primaryKey": false,
1168
+ "notNull": false,
1169
+ "autoincrement": false
1170
+ },
1171
+ "created_at": {
1172
+ "name": "created_at",
1173
+ "type": "text",
1174
+ "primaryKey": false,
1175
+ "notNull": true,
1176
+ "autoincrement": false
1177
+ },
1178
+ "updated_at": {
1179
+ "name": "updated_at",
1180
+ "type": "text",
1181
+ "primaryKey": false,
1182
+ "notNull": true,
1183
+ "autoincrement": false
1184
+ }
1185
+ },
1186
+ "indexes": {
1187
+ "reviews_pending": {
1188
+ "name": "reviews_pending",
1189
+ "columns": [
1190
+ "site_id",
1191
+ "entry_id"
1192
+ ],
1193
+ "where": "\"reviews\".\"status\" = 'pending'",
1194
+ "isUnique": true
1195
+ },
1196
+ "reviews_queue": {
1197
+ "name": "reviews_queue",
1198
+ "columns": [
1199
+ "site_id",
1200
+ "status",
1201
+ "created_at"
1202
+ ],
1203
+ "isUnique": false
1204
+ },
1205
+ "reviews_id_site": {
1206
+ "name": "reviews_id_site",
1207
+ "columns": [
1208
+ "id",
1209
+ "site_id"
1210
+ ],
1211
+ "isUnique": true
1212
+ }
1213
+ },
1214
+ "foreignKeys": {
1215
+ "reviews_site": {
1216
+ "name": "reviews_site",
1217
+ "tableFrom": "reviews",
1218
+ "columnsFrom": [
1219
+ "site_id"
1220
+ ],
1221
+ "tableTo": "sites",
1222
+ "columnsTo": [
1223
+ "id"
1224
+ ],
1225
+ "onUpdate": "no action",
1226
+ "onDelete": "no action"
1227
+ },
1228
+ "reviews_entry": {
1229
+ "name": "reviews_entry",
1230
+ "tableFrom": "reviews",
1231
+ "columnsFrom": [
1232
+ "entry_id",
1233
+ "site_id"
1234
+ ],
1235
+ "tableTo": "entries",
1236
+ "columnsTo": [
1237
+ "id",
1238
+ "site_id"
1239
+ ],
1240
+ "onUpdate": "no action",
1241
+ "onDelete": "no action"
1242
+ },
1243
+ "reviews_revision": {
1244
+ "name": "reviews_revision",
1245
+ "tableFrom": "reviews",
1246
+ "columnsFrom": [
1247
+ "revision_id",
1248
+ "site_id"
1249
+ ],
1250
+ "tableTo": "revisions",
1251
+ "columnsTo": [
1252
+ "id",
1253
+ "site_id"
1254
+ ],
1255
+ "onUpdate": "no action",
1256
+ "onDelete": "no action"
1257
+ },
1258
+ "reviews_requester": {
1259
+ "name": "reviews_requester",
1260
+ "tableFrom": "reviews",
1261
+ "columnsFrom": [
1262
+ "requested_by"
1263
+ ],
1264
+ "tableTo": "users",
1265
+ "columnsTo": [
1266
+ "id"
1267
+ ],
1268
+ "onUpdate": "no action",
1269
+ "onDelete": "no action"
1270
+ },
1271
+ "reviews_decider": {
1272
+ "name": "reviews_decider",
1273
+ "tableFrom": "reviews",
1274
+ "columnsFrom": [
1275
+ "decided_by"
1276
+ ],
1277
+ "tableTo": "users",
1278
+ "columnsTo": [
1279
+ "id"
1280
+ ],
1281
+ "onUpdate": "no action",
1282
+ "onDelete": "no action"
1283
+ }
1284
+ },
1285
+ "compositePrimaryKeys": {},
1286
+ "uniqueConstraints": {},
1287
+ "checkConstraints": {
1288
+ "reviews_status": {
1289
+ "name": "reviews_status",
1290
+ "value": "\"reviews\".\"status\" IN ('pending', 'approved', 'changes_requested', 'cancelled')"
1291
+ },
1292
+ "reviews_decided": {
1293
+ "name": "reviews_decided",
1294
+ "value": "(\"reviews\".\"status\" IN ('pending', 'cancelled')) OR (\"reviews\".\"decided_by\" IS NOT NULL AND \"reviews\".\"decided_at\" IS NOT NULL)"
1295
+ },
1296
+ "reviews_json": {
1297
+ "name": "reviews_json",
1298
+ "value": "json_valid(\"reviews\".\"acknowledged\") AND json_type(\"reviews\".\"acknowledged\") = 'array' AND (\"reviews\".\"requested_meta\" IS NULL OR json_valid(\"reviews\".\"requested_meta\"))"
1299
+ }
1300
+ }
1301
+ },
1302
+ "revision_tags": {
1303
+ "name": "revision_tags",
1304
+ "columns": {
1305
+ "id": {
1306
+ "name": "id",
1307
+ "type": "text",
1308
+ "primaryKey": true,
1309
+ "notNull": true,
1310
+ "autoincrement": false
1311
+ },
1312
+ "site_id": {
1313
+ "name": "site_id",
1314
+ "type": "text",
1315
+ "primaryKey": false,
1316
+ "notNull": true,
1317
+ "autoincrement": false
1318
+ },
1319
+ "revision_id": {
1320
+ "name": "revision_id",
1321
+ "type": "text",
1322
+ "primaryKey": false,
1323
+ "notNull": true,
1324
+ "autoincrement": false
1325
+ },
1326
+ "tag": {
1327
+ "name": "tag",
1328
+ "type": "text",
1329
+ "primaryKey": false,
1330
+ "notNull": true,
1331
+ "autoincrement": false
1332
+ },
1333
+ "created_at": {
1334
+ "name": "created_at",
1335
+ "type": "text",
1336
+ "primaryKey": false,
1337
+ "notNull": true,
1338
+ "autoincrement": false
1339
+ },
1340
+ "updated_at": {
1341
+ "name": "updated_at",
1342
+ "type": "text",
1343
+ "primaryKey": false,
1344
+ "notNull": true,
1345
+ "autoincrement": false
1346
+ }
1347
+ },
1348
+ "indexes": {
1349
+ "revision_tags_by_tag": {
1350
+ "name": "revision_tags_by_tag",
1351
+ "columns": [
1352
+ "site_id",
1353
+ "tag"
1354
+ ],
1355
+ "isUnique": false
1356
+ },
1357
+ "revision_tags_id_site": {
1358
+ "name": "revision_tags_id_site",
1359
+ "columns": [
1360
+ "id",
1361
+ "site_id"
1362
+ ],
1363
+ "isUnique": true
1364
+ },
1365
+ "revision_tags_tag": {
1366
+ "name": "revision_tags_tag",
1367
+ "columns": [
1368
+ "revision_id",
1369
+ "tag"
1370
+ ],
1371
+ "isUnique": true
1372
+ }
1373
+ },
1374
+ "foreignKeys": {
1375
+ "revision_tags_site": {
1376
+ "name": "revision_tags_site",
1377
+ "tableFrom": "revision_tags",
1378
+ "columnsFrom": [
1379
+ "site_id"
1380
+ ],
1381
+ "tableTo": "sites",
1382
+ "columnsTo": [
1383
+ "id"
1384
+ ],
1385
+ "onUpdate": "no action",
1386
+ "onDelete": "no action"
1387
+ },
1388
+ "revision_tags_revision": {
1389
+ "name": "revision_tags_revision",
1390
+ "tableFrom": "revision_tags",
1391
+ "columnsFrom": [
1392
+ "revision_id",
1393
+ "site_id"
1394
+ ],
1395
+ "tableTo": "revisions",
1396
+ "columnsTo": [
1397
+ "id",
1398
+ "site_id"
1399
+ ],
1400
+ "onUpdate": "no action",
1401
+ "onDelete": "no action"
1402
+ }
1403
+ },
1404
+ "compositePrimaryKeys": {},
1405
+ "uniqueConstraints": {},
1406
+ "checkConstraints": {}
1407
+ },
1408
+ "revisions": {
1409
+ "name": "revisions",
1410
+ "columns": {
1411
+ "id": {
1412
+ "name": "id",
1413
+ "type": "text",
1414
+ "primaryKey": true,
1415
+ "notNull": true,
1416
+ "autoincrement": false
1417
+ },
1418
+ "site_id": {
1419
+ "name": "site_id",
1420
+ "type": "text",
1421
+ "primaryKey": false,
1422
+ "notNull": true,
1423
+ "autoincrement": false
1424
+ },
1425
+ "entry_id": {
1426
+ "name": "entry_id",
1427
+ "type": "text",
1428
+ "primaryKey": false,
1429
+ "notNull": true,
1430
+ "autoincrement": false
1431
+ },
1432
+ "markdown": {
1433
+ "name": "markdown",
1434
+ "type": "text",
1435
+ "primaryKey": false,
1436
+ "notNull": true,
1437
+ "autoincrement": false
1438
+ },
1439
+ "frontmatter": {
1440
+ "name": "frontmatter",
1441
+ "type": "text",
1442
+ "primaryKey": false,
1443
+ "notNull": true,
1444
+ "autoincrement": false
1445
+ },
1446
+ "document": {
1447
+ "name": "document",
1448
+ "type": "text",
1449
+ "primaryKey": false,
1450
+ "notNull": true,
1451
+ "autoincrement": false
1452
+ },
1453
+ "comark_version": {
1454
+ "name": "comark_version",
1455
+ "type": "text",
1456
+ "primaryKey": false,
1457
+ "notNull": true,
1458
+ "autoincrement": false
1459
+ },
1460
+ "pipeline_version": {
1461
+ "name": "pipeline_version",
1462
+ "type": "text",
1463
+ "primaryKey": false,
1464
+ "notNull": true,
1465
+ "autoincrement": false
1466
+ },
1467
+ "word_count": {
1468
+ "name": "word_count",
1469
+ "type": "integer",
1470
+ "primaryKey": false,
1471
+ "notNull": true,
1472
+ "autoincrement": false
1473
+ },
1474
+ "verdict": {
1475
+ "name": "verdict",
1476
+ "type": "text",
1477
+ "primaryKey": false,
1478
+ "notNull": true,
1479
+ "autoincrement": false
1480
+ },
1481
+ "actor_kind": {
1482
+ "name": "actor_kind",
1483
+ "type": "text",
1484
+ "primaryKey": false,
1485
+ "notNull": true,
1486
+ "autoincrement": false
1487
+ },
1488
+ "actor_user_id": {
1489
+ "name": "actor_user_id",
1490
+ "type": "text",
1491
+ "primaryKey": false,
1492
+ "notNull": true,
1493
+ "autoincrement": false
1494
+ },
1495
+ "actor_token_id": {
1496
+ "name": "actor_token_id",
1497
+ "type": "text",
1498
+ "primaryKey": false,
1499
+ "notNull": false,
1500
+ "autoincrement": false
1501
+ },
1502
+ "actor_meta": {
1503
+ "name": "actor_meta",
1504
+ "type": "text",
1505
+ "primaryKey": false,
1506
+ "notNull": false,
1507
+ "autoincrement": false
1508
+ },
1509
+ "created_at": {
1510
+ "name": "created_at",
1511
+ "type": "text",
1512
+ "primaryKey": false,
1513
+ "notNull": true,
1514
+ "autoincrement": false
1515
+ },
1516
+ "updated_at": {
1517
+ "name": "updated_at",
1518
+ "type": "text",
1519
+ "primaryKey": false,
1520
+ "notNull": true,
1521
+ "autoincrement": false
1522
+ }
1523
+ },
1524
+ "indexes": {
1525
+ "revisions_entry": {
1526
+ "name": "revisions_entry",
1527
+ "columns": [
1528
+ "entry_id",
1529
+ "created_at"
1530
+ ],
1531
+ "isUnique": false
1532
+ },
1533
+ "revisions_id_site": {
1534
+ "name": "revisions_id_site",
1535
+ "columns": [
1536
+ "id",
1537
+ "site_id"
1538
+ ],
1539
+ "isUnique": true
1540
+ }
1541
+ },
1542
+ "foreignKeys": {
1543
+ "revisions_site": {
1544
+ "name": "revisions_site",
1545
+ "tableFrom": "revisions",
1546
+ "columnsFrom": [
1547
+ "site_id"
1548
+ ],
1549
+ "tableTo": "sites",
1550
+ "columnsTo": [
1551
+ "id"
1552
+ ],
1553
+ "onUpdate": "no action",
1554
+ "onDelete": "no action"
1555
+ },
1556
+ "revisions_entry": {
1557
+ "name": "revisions_entry",
1558
+ "tableFrom": "revisions",
1559
+ "columnsFrom": [
1560
+ "entry_id",
1561
+ "site_id"
1562
+ ],
1563
+ "tableTo": "entries",
1564
+ "columnsTo": [
1565
+ "id",
1566
+ "site_id"
1567
+ ],
1568
+ "onUpdate": "no action",
1569
+ "onDelete": "no action"
1570
+ },
1571
+ "revisions_user": {
1572
+ "name": "revisions_user",
1573
+ "tableFrom": "revisions",
1574
+ "columnsFrom": [
1575
+ "actor_user_id"
1576
+ ],
1577
+ "tableTo": "users",
1578
+ "columnsTo": [
1579
+ "id"
1580
+ ],
1581
+ "onUpdate": "no action",
1582
+ "onDelete": "no action"
1583
+ },
1584
+ "revisions_token": {
1585
+ "name": "revisions_token",
1586
+ "tableFrom": "revisions",
1587
+ "columnsFrom": [
1588
+ "actor_token_id",
1589
+ "site_id"
1590
+ ],
1591
+ "tableTo": "tokens",
1592
+ "columnsTo": [
1593
+ "id",
1594
+ "site_id"
1595
+ ],
1596
+ "onUpdate": "no action",
1597
+ "onDelete": "no action"
1598
+ }
1599
+ },
1600
+ "compositePrimaryKeys": {},
1601
+ "uniqueConstraints": {},
1602
+ "checkConstraints": {
1603
+ "revisions_actor_kind": {
1604
+ "name": "revisions_actor_kind",
1605
+ "value": "\"revisions\".\"actor_kind\" IN ('token', 'user', 'oauth_client')"
1606
+ },
1607
+ "revisions_json": {
1608
+ "name": "revisions_json",
1609
+ "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\"))"
1610
+ },
1611
+ "revisions_word_count": {
1612
+ "name": "revisions_word_count",
1613
+ "value": "\"revisions\".\"word_count\" >= 0"
1614
+ }
1615
+ }
1616
+ },
1617
+ "schedules": {
1618
+ "name": "schedules",
1619
+ "columns": {
1620
+ "id": {
1621
+ "name": "id",
1622
+ "type": "text",
1623
+ "primaryKey": true,
1624
+ "notNull": true,
1625
+ "autoincrement": false
1626
+ },
1627
+ "site_id": {
1628
+ "name": "site_id",
1629
+ "type": "text",
1630
+ "primaryKey": false,
1631
+ "notNull": true,
1632
+ "autoincrement": false
1633
+ },
1634
+ "entry_id": {
1635
+ "name": "entry_id",
1636
+ "type": "text",
1637
+ "primaryKey": false,
1638
+ "notNull": true,
1639
+ "autoincrement": false
1640
+ },
1641
+ "scheduled_at": {
1642
+ "name": "scheduled_at",
1643
+ "type": "text",
1644
+ "primaryKey": false,
1645
+ "notNull": true,
1646
+ "autoincrement": false
1647
+ },
1648
+ "version": {
1649
+ "name": "version",
1650
+ "type": "integer",
1651
+ "primaryKey": false,
1652
+ "notNull": true,
1653
+ "autoincrement": false
1654
+ },
1655
+ "acknowledged": {
1656
+ "name": "acknowledged",
1657
+ "type": "text",
1658
+ "primaryKey": false,
1659
+ "notNull": true,
1660
+ "autoincrement": false
1661
+ },
1662
+ "actor_kind": {
1663
+ "name": "actor_kind",
1664
+ "type": "text",
1665
+ "primaryKey": false,
1666
+ "notNull": true,
1667
+ "autoincrement": false
1668
+ },
1669
+ "actor_user_id": {
1670
+ "name": "actor_user_id",
1671
+ "type": "text",
1672
+ "primaryKey": false,
1673
+ "notNull": true,
1674
+ "autoincrement": false
1675
+ },
1676
+ "actor_token_id": {
1677
+ "name": "actor_token_id",
1678
+ "type": "text",
1679
+ "primaryKey": false,
1680
+ "notNull": false,
1681
+ "autoincrement": false
1682
+ },
1683
+ "actor_meta": {
1684
+ "name": "actor_meta",
1685
+ "type": "text",
1686
+ "primaryKey": false,
1687
+ "notNull": false,
1688
+ "autoincrement": false
1689
+ },
1690
+ "created_at": {
1691
+ "name": "created_at",
1692
+ "type": "text",
1693
+ "primaryKey": false,
1694
+ "notNull": true,
1695
+ "autoincrement": false
1696
+ },
1697
+ "updated_at": {
1698
+ "name": "updated_at",
1699
+ "type": "text",
1700
+ "primaryKey": false,
1701
+ "notNull": true,
1702
+ "autoincrement": false
1703
+ }
1704
+ },
1705
+ "indexes": {
1706
+ "schedules_due": {
1707
+ "name": "schedules_due",
1708
+ "columns": [
1709
+ "scheduled_at"
1710
+ ],
1711
+ "isUnique": false
1712
+ },
1713
+ "schedules_id_site": {
1714
+ "name": "schedules_id_site",
1715
+ "columns": [
1716
+ "id",
1717
+ "site_id"
1718
+ ],
1719
+ "isUnique": true
1720
+ },
1721
+ "schedules_entry": {
1722
+ "name": "schedules_entry",
1723
+ "columns": [
1724
+ "site_id",
1725
+ "entry_id"
1726
+ ],
1727
+ "isUnique": true
1728
+ }
1729
+ },
1730
+ "foreignKeys": {
1731
+ "schedules_site": {
1732
+ "name": "schedules_site",
1733
+ "tableFrom": "schedules",
1734
+ "columnsFrom": [
1735
+ "site_id"
1736
+ ],
1737
+ "tableTo": "sites",
1738
+ "columnsTo": [
1739
+ "id"
1740
+ ],
1741
+ "onUpdate": "no action",
1742
+ "onDelete": "no action"
1743
+ },
1744
+ "schedules_entry_fk": {
1745
+ "name": "schedules_entry_fk",
1746
+ "tableFrom": "schedules",
1747
+ "columnsFrom": [
1748
+ "entry_id",
1749
+ "site_id"
1750
+ ],
1751
+ "tableTo": "entries",
1752
+ "columnsTo": [
1753
+ "id",
1754
+ "site_id"
1755
+ ],
1756
+ "onUpdate": "no action",
1757
+ "onDelete": "no action"
1758
+ },
1759
+ "schedules_user": {
1760
+ "name": "schedules_user",
1761
+ "tableFrom": "schedules",
1762
+ "columnsFrom": [
1763
+ "actor_user_id"
1764
+ ],
1765
+ "tableTo": "users",
1766
+ "columnsTo": [
1767
+ "id"
1768
+ ],
1769
+ "onUpdate": "no action",
1770
+ "onDelete": "no action"
1771
+ },
1772
+ "schedules_token": {
1773
+ "name": "schedules_token",
1774
+ "tableFrom": "schedules",
1775
+ "columnsFrom": [
1776
+ "actor_token_id",
1777
+ "site_id"
1778
+ ],
1779
+ "tableTo": "tokens",
1780
+ "columnsTo": [
1781
+ "id",
1782
+ "site_id"
1783
+ ],
1784
+ "onUpdate": "no action",
1785
+ "onDelete": "no action"
1786
+ }
1787
+ },
1788
+ "compositePrimaryKeys": {},
1789
+ "uniqueConstraints": {},
1790
+ "checkConstraints": {
1791
+ "schedules_actor_kind": {
1792
+ "name": "schedules_actor_kind",
1793
+ "value": "\"schedules\".\"actor_kind\" IN ('token', 'user', 'oauth_client')"
1794
+ },
1795
+ "schedules_json": {
1796
+ "name": "schedules_json",
1797
+ "value": "json_valid(\"schedules\".\"acknowledged\") AND json_type(\"schedules\".\"acknowledged\") = 'array' AND (\"schedules\".\"actor_meta\" IS NULL OR json_valid(\"schedules\".\"actor_meta\"))"
1798
+ }
1799
+ }
1800
+ },
1801
+ "sessions": {
1802
+ "name": "sessions",
1803
+ "columns": {
1804
+ "id": {
1805
+ "name": "id",
1806
+ "type": "text",
1807
+ "primaryKey": true,
1808
+ "notNull": true,
1809
+ "autoincrement": false
1810
+ },
1811
+ "user_id": {
1812
+ "name": "user_id",
1813
+ "type": "text",
1814
+ "primaryKey": false,
1815
+ "notNull": true,
1816
+ "autoincrement": false
1817
+ },
1818
+ "hash": {
1819
+ "name": "hash",
1820
+ "type": "text",
1821
+ "primaryKey": false,
1822
+ "notNull": true,
1823
+ "autoincrement": false
1824
+ },
1825
+ "expires_at": {
1826
+ "name": "expires_at",
1827
+ "type": "text",
1828
+ "primaryKey": false,
1829
+ "notNull": true,
1830
+ "autoincrement": false
1831
+ },
1832
+ "created_at": {
1833
+ "name": "created_at",
1834
+ "type": "text",
1835
+ "primaryKey": false,
1836
+ "notNull": true,
1837
+ "autoincrement": false
1838
+ },
1839
+ "updated_at": {
1840
+ "name": "updated_at",
1841
+ "type": "text",
1842
+ "primaryKey": false,
1843
+ "notNull": true,
1844
+ "autoincrement": false
1845
+ }
1846
+ },
1847
+ "indexes": {
1848
+ "sessions_hash": {
1849
+ "name": "sessions_hash",
1850
+ "columns": [
1851
+ "hash"
1852
+ ],
1853
+ "isUnique": true
1854
+ }
1855
+ },
1856
+ "foreignKeys": {
1857
+ "sessions_user": {
1858
+ "name": "sessions_user",
1859
+ "tableFrom": "sessions",
1860
+ "columnsFrom": [
1861
+ "user_id"
1862
+ ],
1863
+ "tableTo": "users",
1864
+ "columnsTo": [
1865
+ "id"
1866
+ ],
1867
+ "onUpdate": "no action",
1868
+ "onDelete": "no action"
1869
+ }
1870
+ },
1871
+ "compositePrimaryKeys": {},
1872
+ "uniqueConstraints": {},
1873
+ "checkConstraints": {}
1874
+ },
1875
+ "sites": {
1876
+ "name": "sites",
1877
+ "columns": {
1878
+ "id": {
1879
+ "name": "id",
1880
+ "type": "text",
1881
+ "primaryKey": true,
1882
+ "notNull": true,
1883
+ "autoincrement": false
1884
+ },
1885
+ "created_at": {
1886
+ "name": "created_at",
1887
+ "type": "text",
1888
+ "primaryKey": false,
1889
+ "notNull": true,
1890
+ "autoincrement": false
1891
+ },
1892
+ "updated_at": {
1893
+ "name": "updated_at",
1894
+ "type": "text",
1895
+ "primaryKey": false,
1896
+ "notNull": true,
1897
+ "autoincrement": false
1898
+ }
1899
+ },
1900
+ "indexes": {},
1901
+ "foreignKeys": {},
1902
+ "compositePrimaryKeys": {},
1903
+ "uniqueConstraints": {},
1904
+ "checkConstraints": {}
1905
+ },
1906
+ "tokens": {
1907
+ "name": "tokens",
1908
+ "columns": {
1909
+ "id": {
1910
+ "name": "id",
1911
+ "type": "text",
1912
+ "primaryKey": true,
1913
+ "notNull": true,
1914
+ "autoincrement": false
1915
+ },
1916
+ "site_id": {
1917
+ "name": "site_id",
1918
+ "type": "text",
1919
+ "primaryKey": false,
1920
+ "notNull": true,
1921
+ "autoincrement": false
1922
+ },
1923
+ "user_id": {
1924
+ "name": "user_id",
1925
+ "type": "text",
1926
+ "primaryKey": false,
1927
+ "notNull": true,
1928
+ "autoincrement": false
1929
+ },
1930
+ "label": {
1931
+ "name": "label",
1932
+ "type": "text",
1933
+ "primaryKey": false,
1934
+ "notNull": true,
1935
+ "autoincrement": false
1936
+ },
1937
+ "hash": {
1938
+ "name": "hash",
1939
+ "type": "text",
1940
+ "primaryKey": false,
1941
+ "notNull": true,
1942
+ "autoincrement": false
1943
+ },
1944
+ "kind": {
1945
+ "name": "kind",
1946
+ "type": "text",
1947
+ "primaryKey": false,
1948
+ "notNull": true,
1949
+ "autoincrement": false,
1950
+ "default": "'personal'"
1951
+ },
1952
+ "scopes": {
1953
+ "name": "scopes",
1954
+ "type": "text",
1955
+ "primaryKey": false,
1956
+ "notNull": true,
1957
+ "autoincrement": false
1958
+ },
1959
+ "expires_at": {
1960
+ "name": "expires_at",
1961
+ "type": "text",
1962
+ "primaryKey": false,
1963
+ "notNull": false,
1964
+ "autoincrement": false
1965
+ },
1966
+ "revoked_at": {
1967
+ "name": "revoked_at",
1968
+ "type": "text",
1969
+ "primaryKey": false,
1970
+ "notNull": false,
1971
+ "autoincrement": false
1972
+ },
1973
+ "last_used_at": {
1974
+ "name": "last_used_at",
1975
+ "type": "text",
1976
+ "primaryKey": false,
1977
+ "notNull": false,
1978
+ "autoincrement": false
1979
+ },
1980
+ "created_at": {
1981
+ "name": "created_at",
1982
+ "type": "text",
1983
+ "primaryKey": false,
1984
+ "notNull": true,
1985
+ "autoincrement": false
1986
+ },
1987
+ "updated_at": {
1988
+ "name": "updated_at",
1989
+ "type": "text",
1990
+ "primaryKey": false,
1991
+ "notNull": true,
1992
+ "autoincrement": false
1993
+ }
1994
+ },
1995
+ "indexes": {
1996
+ "tokens_id_site": {
1997
+ "name": "tokens_id_site",
1998
+ "columns": [
1999
+ "id",
2000
+ "site_id"
2001
+ ],
2002
+ "isUnique": true
2003
+ },
2004
+ "tokens_hash": {
2005
+ "name": "tokens_hash",
2006
+ "columns": [
2007
+ "hash"
2008
+ ],
2009
+ "isUnique": true
2010
+ }
2011
+ },
2012
+ "foreignKeys": {
2013
+ "tokens_site": {
2014
+ "name": "tokens_site",
2015
+ "tableFrom": "tokens",
2016
+ "columnsFrom": [
2017
+ "site_id"
2018
+ ],
2019
+ "tableTo": "sites",
2020
+ "columnsTo": [
2021
+ "id"
2022
+ ],
2023
+ "onUpdate": "no action",
2024
+ "onDelete": "no action"
2025
+ },
2026
+ "tokens_user": {
2027
+ "name": "tokens_user",
2028
+ "tableFrom": "tokens",
2029
+ "columnsFrom": [
2030
+ "user_id"
2031
+ ],
2032
+ "tableTo": "users",
2033
+ "columnsTo": [
2034
+ "id"
2035
+ ],
2036
+ "onUpdate": "no action",
2037
+ "onDelete": "no action"
2038
+ }
2039
+ },
2040
+ "compositePrimaryKeys": {},
2041
+ "uniqueConstraints": {},
2042
+ "checkConstraints": {
2043
+ "tokens_scopes": {
2044
+ "name": "tokens_scopes",
2045
+ "value": "json_valid(\"tokens\".\"scopes\") AND json_type(\"tokens\".\"scopes\") = 'array'"
2046
+ }
2047
+ }
2048
+ },
2049
+ "users": {
2050
+ "name": "users",
2051
+ "columns": {
2052
+ "id": {
2053
+ "name": "id",
2054
+ "type": "text",
2055
+ "primaryKey": true,
2056
+ "notNull": true,
2057
+ "autoincrement": false
2058
+ },
2059
+ "name": {
2060
+ "name": "name",
2061
+ "type": "text",
2062
+ "primaryKey": false,
2063
+ "notNull": false,
2064
+ "autoincrement": false
2065
+ },
2066
+ "role": {
2067
+ "name": "role",
2068
+ "type": "text",
2069
+ "primaryKey": false,
2070
+ "notNull": true,
2071
+ "autoincrement": false
2072
+ },
2073
+ "created_at": {
2074
+ "name": "created_at",
2075
+ "type": "text",
2076
+ "primaryKey": false,
2077
+ "notNull": true,
2078
+ "autoincrement": false
2079
+ },
2080
+ "updated_at": {
2081
+ "name": "updated_at",
2082
+ "type": "text",
2083
+ "primaryKey": false,
2084
+ "notNull": true,
2085
+ "autoincrement": false
2086
+ }
2087
+ },
2088
+ "indexes": {},
2089
+ "foreignKeys": {},
2090
+ "compositePrimaryKeys": {},
2091
+ "uniqueConstraints": {},
2092
+ "checkConstraints": {
2093
+ "users_role": {
2094
+ "name": "users_role",
2095
+ "value": "\"users\".\"role\" IN ('owner', 'editor', 'reviewer')"
2096
+ }
2097
+ }
2098
+ }
2099
+ },
2100
+ "views": {},
2101
+ "enums": {},
2102
+ "_meta": {
2103
+ "columns": {},
2104
+ "schemas": {},
2105
+ "tables": {}
2106
+ },
2107
+ "internal": {
2108
+ "indexes": {}
2109
+ }
2110
+ }