@hollware/server 0.0.2 → 0.2.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,1406 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "4565280c-ae8c-40c6-97bf-6955260fcacf",
5
+ "prevId": "c750134b-3d18-4d2d-93a7-18fdaf34b800",
6
+ "tables": {
7
+ "deliveries": {
8
+ "name": "deliveries",
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
+ "event_id": {
25
+ "name": "event_id",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": true,
29
+ "autoincrement": false
30
+ },
31
+ "subscriber": {
32
+ "name": "subscriber",
33
+ "type": "text",
34
+ "primaryKey": false,
35
+ "notNull": true,
36
+ "autoincrement": false
37
+ },
38
+ "attempts": {
39
+ "name": "attempts",
40
+ "type": "integer",
41
+ "primaryKey": false,
42
+ "notNull": true,
43
+ "autoincrement": false
44
+ },
45
+ "delivered_at": {
46
+ "name": "delivered_at",
47
+ "type": "text",
48
+ "primaryKey": false,
49
+ "notNull": false,
50
+ "autoincrement": false
51
+ },
52
+ "last_error": {
53
+ "name": "last_error",
54
+ "type": "text",
55
+ "primaryKey": false,
56
+ "notNull": false,
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
+ "deliveries_id_site": {
76
+ "name": "deliveries_id_site",
77
+ "columns": [
78
+ "id",
79
+ "site_id"
80
+ ],
81
+ "isUnique": true
82
+ },
83
+ "deliveries_event_subscriber": {
84
+ "name": "deliveries_event_subscriber",
85
+ "columns": [
86
+ "event_id",
87
+ "subscriber"
88
+ ],
89
+ "isUnique": true
90
+ }
91
+ },
92
+ "foreignKeys": {
93
+ "deliveries_site": {
94
+ "name": "deliveries_site",
95
+ "tableFrom": "deliveries",
96
+ "tableTo": "sites",
97
+ "columnsFrom": [
98
+ "site_id"
99
+ ],
100
+ "columnsTo": [
101
+ "id"
102
+ ],
103
+ "onDelete": "no action",
104
+ "onUpdate": "no action"
105
+ },
106
+ "deliveries_event": {
107
+ "name": "deliveries_event",
108
+ "tableFrom": "deliveries",
109
+ "tableTo": "outbox",
110
+ "columnsFrom": [
111
+ "event_id",
112
+ "site_id"
113
+ ],
114
+ "columnsTo": [
115
+ "id",
116
+ "site_id"
117
+ ],
118
+ "onDelete": "no action",
119
+ "onUpdate": "no action"
120
+ }
121
+ },
122
+ "compositePrimaryKeys": {},
123
+ "uniqueConstraints": {},
124
+ "checkConstraints": {
125
+ "deliveries_attempts": {
126
+ "name": "deliveries_attempts",
127
+ "value": "\"deliveries\".\"attempts\" >= 0"
128
+ }
129
+ }
130
+ },
131
+ "entries": {
132
+ "name": "entries",
133
+ "columns": {
134
+ "id": {
135
+ "name": "id",
136
+ "type": "text",
137
+ "primaryKey": true,
138
+ "notNull": true,
139
+ "autoincrement": false
140
+ },
141
+ "site_id": {
142
+ "name": "site_id",
143
+ "type": "text",
144
+ "primaryKey": false,
145
+ "notNull": true,
146
+ "autoincrement": false
147
+ },
148
+ "collection": {
149
+ "name": "collection",
150
+ "type": "text",
151
+ "primaryKey": false,
152
+ "notNull": true,
153
+ "autoincrement": false
154
+ },
155
+ "locale": {
156
+ "name": "locale",
157
+ "type": "text",
158
+ "primaryKey": false,
159
+ "notNull": true,
160
+ "autoincrement": false
161
+ },
162
+ "slug": {
163
+ "name": "slug",
164
+ "type": "text",
165
+ "primaryKey": false,
166
+ "notNull": true,
167
+ "autoincrement": false
168
+ },
169
+ "translation_group": {
170
+ "name": "translation_group",
171
+ "type": "text",
172
+ "primaryKey": false,
173
+ "notNull": false,
174
+ "autoincrement": false
175
+ },
176
+ "status": {
177
+ "name": "status",
178
+ "type": "text",
179
+ "primaryKey": false,
180
+ "notNull": true,
181
+ "autoincrement": false
182
+ },
183
+ "version": {
184
+ "name": "version",
185
+ "type": "integer",
186
+ "primaryKey": false,
187
+ "notNull": true,
188
+ "autoincrement": false
189
+ },
190
+ "head_rev": {
191
+ "name": "head_rev",
192
+ "type": "text",
193
+ "primaryKey": false,
194
+ "notNull": true,
195
+ "autoincrement": false
196
+ },
197
+ "published_rev": {
198
+ "name": "published_rev",
199
+ "type": "text",
200
+ "primaryKey": false,
201
+ "notNull": false,
202
+ "autoincrement": false
203
+ },
204
+ "published_at": {
205
+ "name": "published_at",
206
+ "type": "text",
207
+ "primaryKey": false,
208
+ "notNull": false,
209
+ "autoincrement": false
210
+ },
211
+ "published_sort_key": {
212
+ "name": "published_sort_key",
213
+ "type": "text",
214
+ "primaryKey": false,
215
+ "notNull": false,
216
+ "autoincrement": false
217
+ },
218
+ "scheduled_at": {
219
+ "name": "scheduled_at",
220
+ "type": "text",
221
+ "primaryKey": false,
222
+ "notNull": false,
223
+ "autoincrement": false
224
+ },
225
+ "created_at": {
226
+ "name": "created_at",
227
+ "type": "text",
228
+ "primaryKey": false,
229
+ "notNull": true,
230
+ "autoincrement": false
231
+ },
232
+ "updated_at": {
233
+ "name": "updated_at",
234
+ "type": "text",
235
+ "primaryKey": false,
236
+ "notNull": true,
237
+ "autoincrement": false
238
+ }
239
+ },
240
+ "indexes": {
241
+ "entries_head": {
242
+ "name": "entries_head",
243
+ "columns": [
244
+ "site_id",
245
+ "collection",
246
+ "updated_at",
247
+ "id"
248
+ ],
249
+ "isUnique": false
250
+ },
251
+ "entries_head_locale": {
252
+ "name": "entries_head_locale",
253
+ "columns": [
254
+ "site_id",
255
+ "collection",
256
+ "locale",
257
+ "updated_at",
258
+ "id"
259
+ ],
260
+ "isUnique": false
261
+ },
262
+ "entries_published": {
263
+ "name": "entries_published",
264
+ "columns": [
265
+ "site_id",
266
+ "collection",
267
+ "locale",
268
+ "published_sort_key",
269
+ "id"
270
+ ],
271
+ "isUnique": false,
272
+ "where": "\"entries\".\"status\" = 'published'"
273
+ },
274
+ "entries_id_site": {
275
+ "name": "entries_id_site",
276
+ "columns": [
277
+ "id",
278
+ "site_id"
279
+ ],
280
+ "isUnique": true
281
+ },
282
+ "entries_slug": {
283
+ "name": "entries_slug",
284
+ "columns": [
285
+ "site_id",
286
+ "collection",
287
+ "locale",
288
+ "slug"
289
+ ],
290
+ "isUnique": true
291
+ },
292
+ "entries_translation": {
293
+ "name": "entries_translation",
294
+ "columns": [
295
+ "site_id",
296
+ "collection",
297
+ "translation_group",
298
+ "locale"
299
+ ],
300
+ "isUnique": true
301
+ }
302
+ },
303
+ "foreignKeys": {
304
+ "entries_site": {
305
+ "name": "entries_site",
306
+ "tableFrom": "entries",
307
+ "tableTo": "sites",
308
+ "columnsFrom": [
309
+ "site_id"
310
+ ],
311
+ "columnsTo": [
312
+ "id"
313
+ ],
314
+ "onDelete": "no action",
315
+ "onUpdate": "no action"
316
+ }
317
+ },
318
+ "compositePrimaryKeys": {},
319
+ "uniqueConstraints": {},
320
+ "checkConstraints": {
321
+ "entries_status": {
322
+ "name": "entries_status",
323
+ "value": "\"entries\".\"status\" IN ('draft', 'scheduled', 'published')"
324
+ },
325
+ "entries_version": {
326
+ "name": "entries_version",
327
+ "value": "\"entries\".\"version\" >= 1"
328
+ },
329
+ "entries_draft": {
330
+ "name": "entries_draft",
331
+ "value": "\"entries\".\"status\" <> 'draft' OR (\"entries\".\"published_rev\" IS NULL AND \"entries\".\"published_sort_key\" IS NULL AND \"entries\".\"scheduled_at\" IS NULL)"
332
+ },
333
+ "entries_published": {
334
+ "name": "entries_published",
335
+ "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)"
336
+ },
337
+ "entries_scheduled": {
338
+ "name": "entries_scheduled",
339
+ "value": "\"entries\".\"status\" <> 'scheduled' OR \"entries\".\"scheduled_at\" IS NOT NULL"
340
+ }
341
+ }
342
+ },
343
+ "_hollware_meta": {
344
+ "name": "_hollware_meta",
345
+ "columns": {
346
+ "key": {
347
+ "name": "key",
348
+ "type": "text",
349
+ "primaryKey": true,
350
+ "notNull": true,
351
+ "autoincrement": false
352
+ },
353
+ "value": {
354
+ "name": "value",
355
+ "type": "text",
356
+ "primaryKey": false,
357
+ "notNull": true,
358
+ "autoincrement": false
359
+ }
360
+ },
361
+ "indexes": {},
362
+ "foreignKeys": {},
363
+ "compositePrimaryKeys": {},
364
+ "uniqueConstraints": {},
365
+ "checkConstraints": {}
366
+ },
367
+ "outbox": {
368
+ "name": "outbox",
369
+ "columns": {
370
+ "id": {
371
+ "name": "id",
372
+ "type": "text",
373
+ "primaryKey": true,
374
+ "notNull": true,
375
+ "autoincrement": false
376
+ },
377
+ "site_id": {
378
+ "name": "site_id",
379
+ "type": "text",
380
+ "primaryKey": false,
381
+ "notNull": true,
382
+ "autoincrement": false
383
+ },
384
+ "kind": {
385
+ "name": "kind",
386
+ "type": "text",
387
+ "primaryKey": false,
388
+ "notNull": true,
389
+ "autoincrement": false
390
+ },
391
+ "entry_id": {
392
+ "name": "entry_id",
393
+ "type": "text",
394
+ "primaryKey": false,
395
+ "notNull": true,
396
+ "autoincrement": false
397
+ },
398
+ "payload": {
399
+ "name": "payload",
400
+ "type": "text",
401
+ "primaryKey": false,
402
+ "notNull": true,
403
+ "autoincrement": false
404
+ },
405
+ "sent_at": {
406
+ "name": "sent_at",
407
+ "type": "text",
408
+ "primaryKey": false,
409
+ "notNull": false,
410
+ "autoincrement": false
411
+ },
412
+ "created_at": {
413
+ "name": "created_at",
414
+ "type": "text",
415
+ "primaryKey": false,
416
+ "notNull": true,
417
+ "autoincrement": false
418
+ },
419
+ "updated_at": {
420
+ "name": "updated_at",
421
+ "type": "text",
422
+ "primaryKey": false,
423
+ "notNull": true,
424
+ "autoincrement": false
425
+ }
426
+ },
427
+ "indexes": {
428
+ "outbox_unsent": {
429
+ "name": "outbox_unsent",
430
+ "columns": [
431
+ "sent_at",
432
+ "created_at"
433
+ ],
434
+ "isUnique": false
435
+ },
436
+ "outbox_id_site": {
437
+ "name": "outbox_id_site",
438
+ "columns": [
439
+ "id",
440
+ "site_id"
441
+ ],
442
+ "isUnique": true
443
+ }
444
+ },
445
+ "foreignKeys": {
446
+ "outbox_site": {
447
+ "name": "outbox_site",
448
+ "tableFrom": "outbox",
449
+ "tableTo": "sites",
450
+ "columnsFrom": [
451
+ "site_id"
452
+ ],
453
+ "columnsTo": [
454
+ "id"
455
+ ],
456
+ "onDelete": "no action",
457
+ "onUpdate": "no action"
458
+ }
459
+ },
460
+ "compositePrimaryKeys": {},
461
+ "uniqueConstraints": {},
462
+ "checkConstraints": {
463
+ "outbox_kind": {
464
+ "name": "outbox_kind",
465
+ "value": "\"outbox\".\"kind\" IN ('entry.published', 'entry.unpublished')"
466
+ },
467
+ "outbox_json": {
468
+ "name": "outbox_json",
469
+ "value": "json_valid(\"outbox\".\"payload\") AND json_type(\"outbox\".\"payload\") = 'object'"
470
+ }
471
+ }
472
+ },
473
+ "publications": {
474
+ "name": "publications",
475
+ "columns": {
476
+ "id": {
477
+ "name": "id",
478
+ "type": "text",
479
+ "primaryKey": true,
480
+ "notNull": true,
481
+ "autoincrement": false
482
+ },
483
+ "site_id": {
484
+ "name": "site_id",
485
+ "type": "text",
486
+ "primaryKey": false,
487
+ "notNull": true,
488
+ "autoincrement": false
489
+ },
490
+ "entry_id": {
491
+ "name": "entry_id",
492
+ "type": "text",
493
+ "primaryKey": false,
494
+ "notNull": true,
495
+ "autoincrement": false
496
+ },
497
+ "action": {
498
+ "name": "action",
499
+ "type": "text",
500
+ "primaryKey": false,
501
+ "notNull": true,
502
+ "autoincrement": false
503
+ },
504
+ "revision_id": {
505
+ "name": "revision_id",
506
+ "type": "text",
507
+ "primaryKey": false,
508
+ "notNull": false,
509
+ "autoincrement": false
510
+ },
511
+ "verdict": {
512
+ "name": "verdict",
513
+ "type": "text",
514
+ "primaryKey": false,
515
+ "notNull": false,
516
+ "autoincrement": false
517
+ },
518
+ "acknowledged": {
519
+ "name": "acknowledged",
520
+ "type": "text",
521
+ "primaryKey": false,
522
+ "notNull": true,
523
+ "autoincrement": false
524
+ },
525
+ "actor_kind": {
526
+ "name": "actor_kind",
527
+ "type": "text",
528
+ "primaryKey": false,
529
+ "notNull": true,
530
+ "autoincrement": false
531
+ },
532
+ "actor_user_id": {
533
+ "name": "actor_user_id",
534
+ "type": "text",
535
+ "primaryKey": false,
536
+ "notNull": true,
537
+ "autoincrement": false
538
+ },
539
+ "actor_token_id": {
540
+ "name": "actor_token_id",
541
+ "type": "text",
542
+ "primaryKey": false,
543
+ "notNull": false,
544
+ "autoincrement": false
545
+ },
546
+ "actor_meta": {
547
+ "name": "actor_meta",
548
+ "type": "text",
549
+ "primaryKey": false,
550
+ "notNull": false,
551
+ "autoincrement": false
552
+ },
553
+ "created_at": {
554
+ "name": "created_at",
555
+ "type": "text",
556
+ "primaryKey": false,
557
+ "notNull": true,
558
+ "autoincrement": false
559
+ },
560
+ "updated_at": {
561
+ "name": "updated_at",
562
+ "type": "text",
563
+ "primaryKey": false,
564
+ "notNull": true,
565
+ "autoincrement": false
566
+ }
567
+ },
568
+ "indexes": {
569
+ "publications_entry": {
570
+ "name": "publications_entry",
571
+ "columns": [
572
+ "entry_id",
573
+ "created_at"
574
+ ],
575
+ "isUnique": false
576
+ },
577
+ "publications_id_site": {
578
+ "name": "publications_id_site",
579
+ "columns": [
580
+ "id",
581
+ "site_id"
582
+ ],
583
+ "isUnique": true
584
+ }
585
+ },
586
+ "foreignKeys": {
587
+ "publications_site": {
588
+ "name": "publications_site",
589
+ "tableFrom": "publications",
590
+ "tableTo": "sites",
591
+ "columnsFrom": [
592
+ "site_id"
593
+ ],
594
+ "columnsTo": [
595
+ "id"
596
+ ],
597
+ "onDelete": "no action",
598
+ "onUpdate": "no action"
599
+ },
600
+ "publications_entry": {
601
+ "name": "publications_entry",
602
+ "tableFrom": "publications",
603
+ "tableTo": "entries",
604
+ "columnsFrom": [
605
+ "entry_id",
606
+ "site_id"
607
+ ],
608
+ "columnsTo": [
609
+ "id",
610
+ "site_id"
611
+ ],
612
+ "onDelete": "no action",
613
+ "onUpdate": "no action"
614
+ },
615
+ "publications_revision": {
616
+ "name": "publications_revision",
617
+ "tableFrom": "publications",
618
+ "tableTo": "revisions",
619
+ "columnsFrom": [
620
+ "revision_id",
621
+ "site_id"
622
+ ],
623
+ "columnsTo": [
624
+ "id",
625
+ "site_id"
626
+ ],
627
+ "onDelete": "no action",
628
+ "onUpdate": "no action"
629
+ },
630
+ "publications_user": {
631
+ "name": "publications_user",
632
+ "tableFrom": "publications",
633
+ "tableTo": "users",
634
+ "columnsFrom": [
635
+ "actor_user_id"
636
+ ],
637
+ "columnsTo": [
638
+ "id"
639
+ ],
640
+ "onDelete": "no action",
641
+ "onUpdate": "no action"
642
+ },
643
+ "publications_token": {
644
+ "name": "publications_token",
645
+ "tableFrom": "publications",
646
+ "tableTo": "tokens",
647
+ "columnsFrom": [
648
+ "actor_token_id",
649
+ "site_id"
650
+ ],
651
+ "columnsTo": [
652
+ "id",
653
+ "site_id"
654
+ ],
655
+ "onDelete": "no action",
656
+ "onUpdate": "no action"
657
+ }
658
+ },
659
+ "compositePrimaryKeys": {},
660
+ "uniqueConstraints": {},
661
+ "checkConstraints": {
662
+ "publications_action": {
663
+ "name": "publications_action",
664
+ "value": "\"publications\".\"action\" IN ('publish', 'unpublish')"
665
+ },
666
+ "publications_shape": {
667
+ "name": "publications_shape",
668
+ "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)"
669
+ },
670
+ "publications_actor_kind": {
671
+ "name": "publications_actor_kind",
672
+ "value": "\"publications\".\"actor_kind\" IN ('token', 'user', 'oauth_client')"
673
+ },
674
+ "publications_json": {
675
+ "name": "publications_json",
676
+ "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\"))"
677
+ }
678
+ }
679
+ },
680
+ "revision_tags": {
681
+ "name": "revision_tags",
682
+ "columns": {
683
+ "id": {
684
+ "name": "id",
685
+ "type": "text",
686
+ "primaryKey": true,
687
+ "notNull": true,
688
+ "autoincrement": false
689
+ },
690
+ "site_id": {
691
+ "name": "site_id",
692
+ "type": "text",
693
+ "primaryKey": false,
694
+ "notNull": true,
695
+ "autoincrement": false
696
+ },
697
+ "revision_id": {
698
+ "name": "revision_id",
699
+ "type": "text",
700
+ "primaryKey": false,
701
+ "notNull": true,
702
+ "autoincrement": false
703
+ },
704
+ "tag": {
705
+ "name": "tag",
706
+ "type": "text",
707
+ "primaryKey": false,
708
+ "notNull": true,
709
+ "autoincrement": false
710
+ },
711
+ "created_at": {
712
+ "name": "created_at",
713
+ "type": "text",
714
+ "primaryKey": false,
715
+ "notNull": true,
716
+ "autoincrement": false
717
+ },
718
+ "updated_at": {
719
+ "name": "updated_at",
720
+ "type": "text",
721
+ "primaryKey": false,
722
+ "notNull": true,
723
+ "autoincrement": false
724
+ }
725
+ },
726
+ "indexes": {
727
+ "revision_tags_by_tag": {
728
+ "name": "revision_tags_by_tag",
729
+ "columns": [
730
+ "site_id",
731
+ "tag"
732
+ ],
733
+ "isUnique": false
734
+ },
735
+ "revision_tags_id_site": {
736
+ "name": "revision_tags_id_site",
737
+ "columns": [
738
+ "id",
739
+ "site_id"
740
+ ],
741
+ "isUnique": true
742
+ },
743
+ "revision_tags_tag": {
744
+ "name": "revision_tags_tag",
745
+ "columns": [
746
+ "revision_id",
747
+ "tag"
748
+ ],
749
+ "isUnique": true
750
+ }
751
+ },
752
+ "foreignKeys": {
753
+ "revision_tags_site": {
754
+ "name": "revision_tags_site",
755
+ "tableFrom": "revision_tags",
756
+ "tableTo": "sites",
757
+ "columnsFrom": [
758
+ "site_id"
759
+ ],
760
+ "columnsTo": [
761
+ "id"
762
+ ],
763
+ "onDelete": "no action",
764
+ "onUpdate": "no action"
765
+ },
766
+ "revision_tags_revision": {
767
+ "name": "revision_tags_revision",
768
+ "tableFrom": "revision_tags",
769
+ "tableTo": "revisions",
770
+ "columnsFrom": [
771
+ "revision_id",
772
+ "site_id"
773
+ ],
774
+ "columnsTo": [
775
+ "id",
776
+ "site_id"
777
+ ],
778
+ "onDelete": "no action",
779
+ "onUpdate": "no action"
780
+ }
781
+ },
782
+ "compositePrimaryKeys": {},
783
+ "uniqueConstraints": {},
784
+ "checkConstraints": {}
785
+ },
786
+ "revisions": {
787
+ "name": "revisions",
788
+ "columns": {
789
+ "id": {
790
+ "name": "id",
791
+ "type": "text",
792
+ "primaryKey": true,
793
+ "notNull": true,
794
+ "autoincrement": false
795
+ },
796
+ "site_id": {
797
+ "name": "site_id",
798
+ "type": "text",
799
+ "primaryKey": false,
800
+ "notNull": true,
801
+ "autoincrement": false
802
+ },
803
+ "entry_id": {
804
+ "name": "entry_id",
805
+ "type": "text",
806
+ "primaryKey": false,
807
+ "notNull": true,
808
+ "autoincrement": false
809
+ },
810
+ "markdown": {
811
+ "name": "markdown",
812
+ "type": "text",
813
+ "primaryKey": false,
814
+ "notNull": true,
815
+ "autoincrement": false
816
+ },
817
+ "frontmatter": {
818
+ "name": "frontmatter",
819
+ "type": "text",
820
+ "primaryKey": false,
821
+ "notNull": true,
822
+ "autoincrement": false
823
+ },
824
+ "document": {
825
+ "name": "document",
826
+ "type": "text",
827
+ "primaryKey": false,
828
+ "notNull": true,
829
+ "autoincrement": false
830
+ },
831
+ "comark_version": {
832
+ "name": "comark_version",
833
+ "type": "text",
834
+ "primaryKey": false,
835
+ "notNull": true,
836
+ "autoincrement": false
837
+ },
838
+ "pipeline_version": {
839
+ "name": "pipeline_version",
840
+ "type": "text",
841
+ "primaryKey": false,
842
+ "notNull": true,
843
+ "autoincrement": false
844
+ },
845
+ "word_count": {
846
+ "name": "word_count",
847
+ "type": "integer",
848
+ "primaryKey": false,
849
+ "notNull": true,
850
+ "autoincrement": false
851
+ },
852
+ "verdict": {
853
+ "name": "verdict",
854
+ "type": "text",
855
+ "primaryKey": false,
856
+ "notNull": true,
857
+ "autoincrement": false
858
+ },
859
+ "actor_kind": {
860
+ "name": "actor_kind",
861
+ "type": "text",
862
+ "primaryKey": false,
863
+ "notNull": true,
864
+ "autoincrement": false
865
+ },
866
+ "actor_user_id": {
867
+ "name": "actor_user_id",
868
+ "type": "text",
869
+ "primaryKey": false,
870
+ "notNull": true,
871
+ "autoincrement": false
872
+ },
873
+ "actor_token_id": {
874
+ "name": "actor_token_id",
875
+ "type": "text",
876
+ "primaryKey": false,
877
+ "notNull": false,
878
+ "autoincrement": false
879
+ },
880
+ "actor_meta": {
881
+ "name": "actor_meta",
882
+ "type": "text",
883
+ "primaryKey": false,
884
+ "notNull": false,
885
+ "autoincrement": false
886
+ },
887
+ "created_at": {
888
+ "name": "created_at",
889
+ "type": "text",
890
+ "primaryKey": false,
891
+ "notNull": true,
892
+ "autoincrement": false
893
+ },
894
+ "updated_at": {
895
+ "name": "updated_at",
896
+ "type": "text",
897
+ "primaryKey": false,
898
+ "notNull": true,
899
+ "autoincrement": false
900
+ }
901
+ },
902
+ "indexes": {
903
+ "revisions_entry": {
904
+ "name": "revisions_entry",
905
+ "columns": [
906
+ "entry_id",
907
+ "created_at"
908
+ ],
909
+ "isUnique": false
910
+ },
911
+ "revisions_id_site": {
912
+ "name": "revisions_id_site",
913
+ "columns": [
914
+ "id",
915
+ "site_id"
916
+ ],
917
+ "isUnique": true
918
+ }
919
+ },
920
+ "foreignKeys": {
921
+ "revisions_site": {
922
+ "name": "revisions_site",
923
+ "tableFrom": "revisions",
924
+ "tableTo": "sites",
925
+ "columnsFrom": [
926
+ "site_id"
927
+ ],
928
+ "columnsTo": [
929
+ "id"
930
+ ],
931
+ "onDelete": "no action",
932
+ "onUpdate": "no action"
933
+ },
934
+ "revisions_entry": {
935
+ "name": "revisions_entry",
936
+ "tableFrom": "revisions",
937
+ "tableTo": "entries",
938
+ "columnsFrom": [
939
+ "entry_id",
940
+ "site_id"
941
+ ],
942
+ "columnsTo": [
943
+ "id",
944
+ "site_id"
945
+ ],
946
+ "onDelete": "no action",
947
+ "onUpdate": "no action"
948
+ },
949
+ "revisions_user": {
950
+ "name": "revisions_user",
951
+ "tableFrom": "revisions",
952
+ "tableTo": "users",
953
+ "columnsFrom": [
954
+ "actor_user_id"
955
+ ],
956
+ "columnsTo": [
957
+ "id"
958
+ ],
959
+ "onDelete": "no action",
960
+ "onUpdate": "no action"
961
+ },
962
+ "revisions_token": {
963
+ "name": "revisions_token",
964
+ "tableFrom": "revisions",
965
+ "tableTo": "tokens",
966
+ "columnsFrom": [
967
+ "actor_token_id",
968
+ "site_id"
969
+ ],
970
+ "columnsTo": [
971
+ "id",
972
+ "site_id"
973
+ ],
974
+ "onDelete": "no action",
975
+ "onUpdate": "no action"
976
+ }
977
+ },
978
+ "compositePrimaryKeys": {},
979
+ "uniqueConstraints": {},
980
+ "checkConstraints": {
981
+ "revisions_actor_kind": {
982
+ "name": "revisions_actor_kind",
983
+ "value": "\"revisions\".\"actor_kind\" IN ('token', 'user', 'oauth_client')"
984
+ },
985
+ "revisions_json": {
986
+ "name": "revisions_json",
987
+ "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\"))"
988
+ },
989
+ "revisions_word_count": {
990
+ "name": "revisions_word_count",
991
+ "value": "\"revisions\".\"word_count\" >= 0"
992
+ }
993
+ }
994
+ },
995
+ "schedules": {
996
+ "name": "schedules",
997
+ "columns": {
998
+ "id": {
999
+ "name": "id",
1000
+ "type": "text",
1001
+ "primaryKey": true,
1002
+ "notNull": true,
1003
+ "autoincrement": false
1004
+ },
1005
+ "site_id": {
1006
+ "name": "site_id",
1007
+ "type": "text",
1008
+ "primaryKey": false,
1009
+ "notNull": true,
1010
+ "autoincrement": false
1011
+ },
1012
+ "entry_id": {
1013
+ "name": "entry_id",
1014
+ "type": "text",
1015
+ "primaryKey": false,
1016
+ "notNull": true,
1017
+ "autoincrement": false
1018
+ },
1019
+ "scheduled_at": {
1020
+ "name": "scheduled_at",
1021
+ "type": "text",
1022
+ "primaryKey": false,
1023
+ "notNull": true,
1024
+ "autoincrement": false
1025
+ },
1026
+ "version": {
1027
+ "name": "version",
1028
+ "type": "integer",
1029
+ "primaryKey": false,
1030
+ "notNull": true,
1031
+ "autoincrement": false
1032
+ },
1033
+ "acknowledged": {
1034
+ "name": "acknowledged",
1035
+ "type": "text",
1036
+ "primaryKey": false,
1037
+ "notNull": true,
1038
+ "autoincrement": false
1039
+ },
1040
+ "actor_kind": {
1041
+ "name": "actor_kind",
1042
+ "type": "text",
1043
+ "primaryKey": false,
1044
+ "notNull": true,
1045
+ "autoincrement": false
1046
+ },
1047
+ "actor_user_id": {
1048
+ "name": "actor_user_id",
1049
+ "type": "text",
1050
+ "primaryKey": false,
1051
+ "notNull": true,
1052
+ "autoincrement": false
1053
+ },
1054
+ "actor_token_id": {
1055
+ "name": "actor_token_id",
1056
+ "type": "text",
1057
+ "primaryKey": false,
1058
+ "notNull": false,
1059
+ "autoincrement": false
1060
+ },
1061
+ "actor_meta": {
1062
+ "name": "actor_meta",
1063
+ "type": "text",
1064
+ "primaryKey": false,
1065
+ "notNull": false,
1066
+ "autoincrement": false
1067
+ },
1068
+ "created_at": {
1069
+ "name": "created_at",
1070
+ "type": "text",
1071
+ "primaryKey": false,
1072
+ "notNull": true,
1073
+ "autoincrement": false
1074
+ },
1075
+ "updated_at": {
1076
+ "name": "updated_at",
1077
+ "type": "text",
1078
+ "primaryKey": false,
1079
+ "notNull": true,
1080
+ "autoincrement": false
1081
+ }
1082
+ },
1083
+ "indexes": {
1084
+ "schedules_due": {
1085
+ "name": "schedules_due",
1086
+ "columns": [
1087
+ "scheduled_at"
1088
+ ],
1089
+ "isUnique": false
1090
+ },
1091
+ "schedules_id_site": {
1092
+ "name": "schedules_id_site",
1093
+ "columns": [
1094
+ "id",
1095
+ "site_id"
1096
+ ],
1097
+ "isUnique": true
1098
+ },
1099
+ "schedules_entry": {
1100
+ "name": "schedules_entry",
1101
+ "columns": [
1102
+ "site_id",
1103
+ "entry_id"
1104
+ ],
1105
+ "isUnique": true
1106
+ }
1107
+ },
1108
+ "foreignKeys": {
1109
+ "schedules_site": {
1110
+ "name": "schedules_site",
1111
+ "tableFrom": "schedules",
1112
+ "tableTo": "sites",
1113
+ "columnsFrom": [
1114
+ "site_id"
1115
+ ],
1116
+ "columnsTo": [
1117
+ "id"
1118
+ ],
1119
+ "onDelete": "no action",
1120
+ "onUpdate": "no action"
1121
+ },
1122
+ "schedules_entry_fk": {
1123
+ "name": "schedules_entry_fk",
1124
+ "tableFrom": "schedules",
1125
+ "tableTo": "entries",
1126
+ "columnsFrom": [
1127
+ "entry_id",
1128
+ "site_id"
1129
+ ],
1130
+ "columnsTo": [
1131
+ "id",
1132
+ "site_id"
1133
+ ],
1134
+ "onDelete": "no action",
1135
+ "onUpdate": "no action"
1136
+ },
1137
+ "schedules_user": {
1138
+ "name": "schedules_user",
1139
+ "tableFrom": "schedules",
1140
+ "tableTo": "users",
1141
+ "columnsFrom": [
1142
+ "actor_user_id"
1143
+ ],
1144
+ "columnsTo": [
1145
+ "id"
1146
+ ],
1147
+ "onDelete": "no action",
1148
+ "onUpdate": "no action"
1149
+ },
1150
+ "schedules_token": {
1151
+ "name": "schedules_token",
1152
+ "tableFrom": "schedules",
1153
+ "tableTo": "tokens",
1154
+ "columnsFrom": [
1155
+ "actor_token_id",
1156
+ "site_id"
1157
+ ],
1158
+ "columnsTo": [
1159
+ "id",
1160
+ "site_id"
1161
+ ],
1162
+ "onDelete": "no action",
1163
+ "onUpdate": "no action"
1164
+ }
1165
+ },
1166
+ "compositePrimaryKeys": {},
1167
+ "uniqueConstraints": {},
1168
+ "checkConstraints": {
1169
+ "schedules_actor_kind": {
1170
+ "name": "schedules_actor_kind",
1171
+ "value": "\"schedules\".\"actor_kind\" IN ('token', 'user', 'oauth_client')"
1172
+ },
1173
+ "schedules_json": {
1174
+ "name": "schedules_json",
1175
+ "value": "json_valid(\"schedules\".\"acknowledged\") AND json_type(\"schedules\".\"acknowledged\") = 'array' AND (\"schedules\".\"actor_meta\" IS NULL OR json_valid(\"schedules\".\"actor_meta\"))"
1176
+ }
1177
+ }
1178
+ },
1179
+ "sites": {
1180
+ "name": "sites",
1181
+ "columns": {
1182
+ "id": {
1183
+ "name": "id",
1184
+ "type": "text",
1185
+ "primaryKey": true,
1186
+ "notNull": true,
1187
+ "autoincrement": false
1188
+ },
1189
+ "created_at": {
1190
+ "name": "created_at",
1191
+ "type": "text",
1192
+ "primaryKey": false,
1193
+ "notNull": true,
1194
+ "autoincrement": false
1195
+ },
1196
+ "updated_at": {
1197
+ "name": "updated_at",
1198
+ "type": "text",
1199
+ "primaryKey": false,
1200
+ "notNull": true,
1201
+ "autoincrement": false
1202
+ }
1203
+ },
1204
+ "indexes": {},
1205
+ "foreignKeys": {},
1206
+ "compositePrimaryKeys": {},
1207
+ "uniqueConstraints": {},
1208
+ "checkConstraints": {}
1209
+ },
1210
+ "tokens": {
1211
+ "name": "tokens",
1212
+ "columns": {
1213
+ "id": {
1214
+ "name": "id",
1215
+ "type": "text",
1216
+ "primaryKey": true,
1217
+ "notNull": true,
1218
+ "autoincrement": false
1219
+ },
1220
+ "site_id": {
1221
+ "name": "site_id",
1222
+ "type": "text",
1223
+ "primaryKey": false,
1224
+ "notNull": true,
1225
+ "autoincrement": false
1226
+ },
1227
+ "user_id": {
1228
+ "name": "user_id",
1229
+ "type": "text",
1230
+ "primaryKey": false,
1231
+ "notNull": true,
1232
+ "autoincrement": false
1233
+ },
1234
+ "label": {
1235
+ "name": "label",
1236
+ "type": "text",
1237
+ "primaryKey": false,
1238
+ "notNull": true,
1239
+ "autoincrement": false
1240
+ },
1241
+ "hash": {
1242
+ "name": "hash",
1243
+ "type": "text",
1244
+ "primaryKey": false,
1245
+ "notNull": true,
1246
+ "autoincrement": false
1247
+ },
1248
+ "scopes": {
1249
+ "name": "scopes",
1250
+ "type": "text",
1251
+ "primaryKey": false,
1252
+ "notNull": true,
1253
+ "autoincrement": false
1254
+ },
1255
+ "expires_at": {
1256
+ "name": "expires_at",
1257
+ "type": "text",
1258
+ "primaryKey": false,
1259
+ "notNull": false,
1260
+ "autoincrement": false
1261
+ },
1262
+ "revoked_at": {
1263
+ "name": "revoked_at",
1264
+ "type": "text",
1265
+ "primaryKey": false,
1266
+ "notNull": false,
1267
+ "autoincrement": false
1268
+ },
1269
+ "last_used_at": {
1270
+ "name": "last_used_at",
1271
+ "type": "text",
1272
+ "primaryKey": false,
1273
+ "notNull": false,
1274
+ "autoincrement": false
1275
+ },
1276
+ "created_at": {
1277
+ "name": "created_at",
1278
+ "type": "text",
1279
+ "primaryKey": false,
1280
+ "notNull": true,
1281
+ "autoincrement": false
1282
+ },
1283
+ "updated_at": {
1284
+ "name": "updated_at",
1285
+ "type": "text",
1286
+ "primaryKey": false,
1287
+ "notNull": true,
1288
+ "autoincrement": false
1289
+ }
1290
+ },
1291
+ "indexes": {
1292
+ "tokens_id_site": {
1293
+ "name": "tokens_id_site",
1294
+ "columns": [
1295
+ "id",
1296
+ "site_id"
1297
+ ],
1298
+ "isUnique": true
1299
+ },
1300
+ "tokens_hash": {
1301
+ "name": "tokens_hash",
1302
+ "columns": [
1303
+ "hash"
1304
+ ],
1305
+ "isUnique": true
1306
+ }
1307
+ },
1308
+ "foreignKeys": {
1309
+ "tokens_site": {
1310
+ "name": "tokens_site",
1311
+ "tableFrom": "tokens",
1312
+ "tableTo": "sites",
1313
+ "columnsFrom": [
1314
+ "site_id"
1315
+ ],
1316
+ "columnsTo": [
1317
+ "id"
1318
+ ],
1319
+ "onDelete": "no action",
1320
+ "onUpdate": "no action"
1321
+ },
1322
+ "tokens_user": {
1323
+ "name": "tokens_user",
1324
+ "tableFrom": "tokens",
1325
+ "tableTo": "users",
1326
+ "columnsFrom": [
1327
+ "user_id"
1328
+ ],
1329
+ "columnsTo": [
1330
+ "id"
1331
+ ],
1332
+ "onDelete": "no action",
1333
+ "onUpdate": "no action"
1334
+ }
1335
+ },
1336
+ "compositePrimaryKeys": {},
1337
+ "uniqueConstraints": {},
1338
+ "checkConstraints": {
1339
+ "tokens_scopes": {
1340
+ "name": "tokens_scopes",
1341
+ "value": "json_valid(\"tokens\".\"scopes\") AND json_type(\"tokens\".\"scopes\") = 'array'"
1342
+ }
1343
+ }
1344
+ },
1345
+ "users": {
1346
+ "name": "users",
1347
+ "columns": {
1348
+ "id": {
1349
+ "name": "id",
1350
+ "type": "text",
1351
+ "primaryKey": true,
1352
+ "notNull": true,
1353
+ "autoincrement": false
1354
+ },
1355
+ "name": {
1356
+ "name": "name",
1357
+ "type": "text",
1358
+ "primaryKey": false,
1359
+ "notNull": false,
1360
+ "autoincrement": false
1361
+ },
1362
+ "role": {
1363
+ "name": "role",
1364
+ "type": "text",
1365
+ "primaryKey": false,
1366
+ "notNull": true,
1367
+ "autoincrement": false
1368
+ },
1369
+ "created_at": {
1370
+ "name": "created_at",
1371
+ "type": "text",
1372
+ "primaryKey": false,
1373
+ "notNull": true,
1374
+ "autoincrement": false
1375
+ },
1376
+ "updated_at": {
1377
+ "name": "updated_at",
1378
+ "type": "text",
1379
+ "primaryKey": false,
1380
+ "notNull": true,
1381
+ "autoincrement": false
1382
+ }
1383
+ },
1384
+ "indexes": {},
1385
+ "foreignKeys": {},
1386
+ "compositePrimaryKeys": {},
1387
+ "uniqueConstraints": {},
1388
+ "checkConstraints": {
1389
+ "users_role": {
1390
+ "name": "users_role",
1391
+ "value": "\"users\".\"role\" IN ('owner', 'editor', 'reviewer')"
1392
+ }
1393
+ }
1394
+ }
1395
+ },
1396
+ "views": {},
1397
+ "enums": {},
1398
+ "_meta": {
1399
+ "schemas": {},
1400
+ "tables": {},
1401
+ "columns": {}
1402
+ },
1403
+ "internal": {
1404
+ "indexes": {}
1405
+ }
1406
+ }