@hollware/server 0.2.0 → 0.4.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,1977 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "94d01b62-528a-41fd-aa2c-62390566add0",
5
+ "prevId": "4565280c-ae8c-40c6-97bf-6955260fcacf",
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
+ "revision_tags": {
1150
+ "name": "revision_tags",
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
+ "revision_id": {
1167
+ "name": "revision_id",
1168
+ "type": "text",
1169
+ "primaryKey": false,
1170
+ "notNull": true,
1171
+ "autoincrement": false
1172
+ },
1173
+ "tag": {
1174
+ "name": "tag",
1175
+ "type": "text",
1176
+ "primaryKey": false,
1177
+ "notNull": true,
1178
+ "autoincrement": false
1179
+ },
1180
+ "created_at": {
1181
+ "name": "created_at",
1182
+ "type": "text",
1183
+ "primaryKey": false,
1184
+ "notNull": true,
1185
+ "autoincrement": false
1186
+ },
1187
+ "updated_at": {
1188
+ "name": "updated_at",
1189
+ "type": "text",
1190
+ "primaryKey": false,
1191
+ "notNull": true,
1192
+ "autoincrement": false
1193
+ }
1194
+ },
1195
+ "indexes": {
1196
+ "revision_tags_by_tag": {
1197
+ "name": "revision_tags_by_tag",
1198
+ "columns": [
1199
+ "site_id",
1200
+ "tag"
1201
+ ],
1202
+ "isUnique": false
1203
+ },
1204
+ "revision_tags_id_site": {
1205
+ "name": "revision_tags_id_site",
1206
+ "columns": [
1207
+ "id",
1208
+ "site_id"
1209
+ ],
1210
+ "isUnique": true
1211
+ },
1212
+ "revision_tags_tag": {
1213
+ "name": "revision_tags_tag",
1214
+ "columns": [
1215
+ "revision_id",
1216
+ "tag"
1217
+ ],
1218
+ "isUnique": true
1219
+ }
1220
+ },
1221
+ "foreignKeys": {
1222
+ "revision_tags_site": {
1223
+ "name": "revision_tags_site",
1224
+ "tableFrom": "revision_tags",
1225
+ "tableTo": "sites",
1226
+ "columnsFrom": [
1227
+ "site_id"
1228
+ ],
1229
+ "columnsTo": [
1230
+ "id"
1231
+ ],
1232
+ "onDelete": "no action",
1233
+ "onUpdate": "no action"
1234
+ },
1235
+ "revision_tags_revision": {
1236
+ "name": "revision_tags_revision",
1237
+ "tableFrom": "revision_tags",
1238
+ "tableTo": "revisions",
1239
+ "columnsFrom": [
1240
+ "revision_id",
1241
+ "site_id"
1242
+ ],
1243
+ "columnsTo": [
1244
+ "id",
1245
+ "site_id"
1246
+ ],
1247
+ "onDelete": "no action",
1248
+ "onUpdate": "no action"
1249
+ }
1250
+ },
1251
+ "compositePrimaryKeys": {},
1252
+ "uniqueConstraints": {},
1253
+ "checkConstraints": {}
1254
+ },
1255
+ "revisions": {
1256
+ "name": "revisions",
1257
+ "columns": {
1258
+ "id": {
1259
+ "name": "id",
1260
+ "type": "text",
1261
+ "primaryKey": true,
1262
+ "notNull": true,
1263
+ "autoincrement": false
1264
+ },
1265
+ "site_id": {
1266
+ "name": "site_id",
1267
+ "type": "text",
1268
+ "primaryKey": false,
1269
+ "notNull": true,
1270
+ "autoincrement": false
1271
+ },
1272
+ "entry_id": {
1273
+ "name": "entry_id",
1274
+ "type": "text",
1275
+ "primaryKey": false,
1276
+ "notNull": true,
1277
+ "autoincrement": false
1278
+ },
1279
+ "markdown": {
1280
+ "name": "markdown",
1281
+ "type": "text",
1282
+ "primaryKey": false,
1283
+ "notNull": true,
1284
+ "autoincrement": false
1285
+ },
1286
+ "frontmatter": {
1287
+ "name": "frontmatter",
1288
+ "type": "text",
1289
+ "primaryKey": false,
1290
+ "notNull": true,
1291
+ "autoincrement": false
1292
+ },
1293
+ "document": {
1294
+ "name": "document",
1295
+ "type": "text",
1296
+ "primaryKey": false,
1297
+ "notNull": true,
1298
+ "autoincrement": false
1299
+ },
1300
+ "comark_version": {
1301
+ "name": "comark_version",
1302
+ "type": "text",
1303
+ "primaryKey": false,
1304
+ "notNull": true,
1305
+ "autoincrement": false
1306
+ },
1307
+ "pipeline_version": {
1308
+ "name": "pipeline_version",
1309
+ "type": "text",
1310
+ "primaryKey": false,
1311
+ "notNull": true,
1312
+ "autoincrement": false
1313
+ },
1314
+ "word_count": {
1315
+ "name": "word_count",
1316
+ "type": "integer",
1317
+ "primaryKey": false,
1318
+ "notNull": true,
1319
+ "autoincrement": false
1320
+ },
1321
+ "verdict": {
1322
+ "name": "verdict",
1323
+ "type": "text",
1324
+ "primaryKey": false,
1325
+ "notNull": true,
1326
+ "autoincrement": false
1327
+ },
1328
+ "actor_kind": {
1329
+ "name": "actor_kind",
1330
+ "type": "text",
1331
+ "primaryKey": false,
1332
+ "notNull": true,
1333
+ "autoincrement": false
1334
+ },
1335
+ "actor_user_id": {
1336
+ "name": "actor_user_id",
1337
+ "type": "text",
1338
+ "primaryKey": false,
1339
+ "notNull": true,
1340
+ "autoincrement": false
1341
+ },
1342
+ "actor_token_id": {
1343
+ "name": "actor_token_id",
1344
+ "type": "text",
1345
+ "primaryKey": false,
1346
+ "notNull": false,
1347
+ "autoincrement": false
1348
+ },
1349
+ "actor_meta": {
1350
+ "name": "actor_meta",
1351
+ "type": "text",
1352
+ "primaryKey": false,
1353
+ "notNull": false,
1354
+ "autoincrement": false
1355
+ },
1356
+ "created_at": {
1357
+ "name": "created_at",
1358
+ "type": "text",
1359
+ "primaryKey": false,
1360
+ "notNull": true,
1361
+ "autoincrement": false
1362
+ },
1363
+ "updated_at": {
1364
+ "name": "updated_at",
1365
+ "type": "text",
1366
+ "primaryKey": false,
1367
+ "notNull": true,
1368
+ "autoincrement": false
1369
+ }
1370
+ },
1371
+ "indexes": {
1372
+ "revisions_entry": {
1373
+ "name": "revisions_entry",
1374
+ "columns": [
1375
+ "entry_id",
1376
+ "created_at"
1377
+ ],
1378
+ "isUnique": false
1379
+ },
1380
+ "revisions_id_site": {
1381
+ "name": "revisions_id_site",
1382
+ "columns": [
1383
+ "id",
1384
+ "site_id"
1385
+ ],
1386
+ "isUnique": true
1387
+ }
1388
+ },
1389
+ "foreignKeys": {
1390
+ "revisions_site": {
1391
+ "name": "revisions_site",
1392
+ "tableFrom": "revisions",
1393
+ "tableTo": "sites",
1394
+ "columnsFrom": [
1395
+ "site_id"
1396
+ ],
1397
+ "columnsTo": [
1398
+ "id"
1399
+ ],
1400
+ "onDelete": "no action",
1401
+ "onUpdate": "no action"
1402
+ },
1403
+ "revisions_entry": {
1404
+ "name": "revisions_entry",
1405
+ "tableFrom": "revisions",
1406
+ "tableTo": "entries",
1407
+ "columnsFrom": [
1408
+ "entry_id",
1409
+ "site_id"
1410
+ ],
1411
+ "columnsTo": [
1412
+ "id",
1413
+ "site_id"
1414
+ ],
1415
+ "onDelete": "no action",
1416
+ "onUpdate": "no action"
1417
+ },
1418
+ "revisions_user": {
1419
+ "name": "revisions_user",
1420
+ "tableFrom": "revisions",
1421
+ "tableTo": "users",
1422
+ "columnsFrom": [
1423
+ "actor_user_id"
1424
+ ],
1425
+ "columnsTo": [
1426
+ "id"
1427
+ ],
1428
+ "onDelete": "no action",
1429
+ "onUpdate": "no action"
1430
+ },
1431
+ "revisions_token": {
1432
+ "name": "revisions_token",
1433
+ "tableFrom": "revisions",
1434
+ "tableTo": "tokens",
1435
+ "columnsFrom": [
1436
+ "actor_token_id",
1437
+ "site_id"
1438
+ ],
1439
+ "columnsTo": [
1440
+ "id",
1441
+ "site_id"
1442
+ ],
1443
+ "onDelete": "no action",
1444
+ "onUpdate": "no action"
1445
+ }
1446
+ },
1447
+ "compositePrimaryKeys": {},
1448
+ "uniqueConstraints": {},
1449
+ "checkConstraints": {
1450
+ "revisions_actor_kind": {
1451
+ "name": "revisions_actor_kind",
1452
+ "value": "\"revisions\".\"actor_kind\" IN ('token', 'user', 'oauth_client')"
1453
+ },
1454
+ "revisions_json": {
1455
+ "name": "revisions_json",
1456
+ "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\"))"
1457
+ },
1458
+ "revisions_word_count": {
1459
+ "name": "revisions_word_count",
1460
+ "value": "\"revisions\".\"word_count\" >= 0"
1461
+ }
1462
+ }
1463
+ },
1464
+ "schedules": {
1465
+ "name": "schedules",
1466
+ "columns": {
1467
+ "id": {
1468
+ "name": "id",
1469
+ "type": "text",
1470
+ "primaryKey": true,
1471
+ "notNull": true,
1472
+ "autoincrement": false
1473
+ },
1474
+ "site_id": {
1475
+ "name": "site_id",
1476
+ "type": "text",
1477
+ "primaryKey": false,
1478
+ "notNull": true,
1479
+ "autoincrement": false
1480
+ },
1481
+ "entry_id": {
1482
+ "name": "entry_id",
1483
+ "type": "text",
1484
+ "primaryKey": false,
1485
+ "notNull": true,
1486
+ "autoincrement": false
1487
+ },
1488
+ "scheduled_at": {
1489
+ "name": "scheduled_at",
1490
+ "type": "text",
1491
+ "primaryKey": false,
1492
+ "notNull": true,
1493
+ "autoincrement": false
1494
+ },
1495
+ "version": {
1496
+ "name": "version",
1497
+ "type": "integer",
1498
+ "primaryKey": false,
1499
+ "notNull": true,
1500
+ "autoincrement": false
1501
+ },
1502
+ "acknowledged": {
1503
+ "name": "acknowledged",
1504
+ "type": "text",
1505
+ "primaryKey": false,
1506
+ "notNull": true,
1507
+ "autoincrement": false
1508
+ },
1509
+ "actor_kind": {
1510
+ "name": "actor_kind",
1511
+ "type": "text",
1512
+ "primaryKey": false,
1513
+ "notNull": true,
1514
+ "autoincrement": false
1515
+ },
1516
+ "actor_user_id": {
1517
+ "name": "actor_user_id",
1518
+ "type": "text",
1519
+ "primaryKey": false,
1520
+ "notNull": true,
1521
+ "autoincrement": false
1522
+ },
1523
+ "actor_token_id": {
1524
+ "name": "actor_token_id",
1525
+ "type": "text",
1526
+ "primaryKey": false,
1527
+ "notNull": false,
1528
+ "autoincrement": false
1529
+ },
1530
+ "actor_meta": {
1531
+ "name": "actor_meta",
1532
+ "type": "text",
1533
+ "primaryKey": false,
1534
+ "notNull": false,
1535
+ "autoincrement": false
1536
+ },
1537
+ "created_at": {
1538
+ "name": "created_at",
1539
+ "type": "text",
1540
+ "primaryKey": false,
1541
+ "notNull": true,
1542
+ "autoincrement": false
1543
+ },
1544
+ "updated_at": {
1545
+ "name": "updated_at",
1546
+ "type": "text",
1547
+ "primaryKey": false,
1548
+ "notNull": true,
1549
+ "autoincrement": false
1550
+ }
1551
+ },
1552
+ "indexes": {
1553
+ "schedules_due": {
1554
+ "name": "schedules_due",
1555
+ "columns": [
1556
+ "scheduled_at"
1557
+ ],
1558
+ "isUnique": false
1559
+ },
1560
+ "schedules_id_site": {
1561
+ "name": "schedules_id_site",
1562
+ "columns": [
1563
+ "id",
1564
+ "site_id"
1565
+ ],
1566
+ "isUnique": true
1567
+ },
1568
+ "schedules_entry": {
1569
+ "name": "schedules_entry",
1570
+ "columns": [
1571
+ "site_id",
1572
+ "entry_id"
1573
+ ],
1574
+ "isUnique": true
1575
+ }
1576
+ },
1577
+ "foreignKeys": {
1578
+ "schedules_site": {
1579
+ "name": "schedules_site",
1580
+ "tableFrom": "schedules",
1581
+ "tableTo": "sites",
1582
+ "columnsFrom": [
1583
+ "site_id"
1584
+ ],
1585
+ "columnsTo": [
1586
+ "id"
1587
+ ],
1588
+ "onDelete": "no action",
1589
+ "onUpdate": "no action"
1590
+ },
1591
+ "schedules_entry_fk": {
1592
+ "name": "schedules_entry_fk",
1593
+ "tableFrom": "schedules",
1594
+ "tableTo": "entries",
1595
+ "columnsFrom": [
1596
+ "entry_id",
1597
+ "site_id"
1598
+ ],
1599
+ "columnsTo": [
1600
+ "id",
1601
+ "site_id"
1602
+ ],
1603
+ "onDelete": "no action",
1604
+ "onUpdate": "no action"
1605
+ },
1606
+ "schedules_user": {
1607
+ "name": "schedules_user",
1608
+ "tableFrom": "schedules",
1609
+ "tableTo": "users",
1610
+ "columnsFrom": [
1611
+ "actor_user_id"
1612
+ ],
1613
+ "columnsTo": [
1614
+ "id"
1615
+ ],
1616
+ "onDelete": "no action",
1617
+ "onUpdate": "no action"
1618
+ },
1619
+ "schedules_token": {
1620
+ "name": "schedules_token",
1621
+ "tableFrom": "schedules",
1622
+ "tableTo": "tokens",
1623
+ "columnsFrom": [
1624
+ "actor_token_id",
1625
+ "site_id"
1626
+ ],
1627
+ "columnsTo": [
1628
+ "id",
1629
+ "site_id"
1630
+ ],
1631
+ "onDelete": "no action",
1632
+ "onUpdate": "no action"
1633
+ }
1634
+ },
1635
+ "compositePrimaryKeys": {},
1636
+ "uniqueConstraints": {},
1637
+ "checkConstraints": {
1638
+ "schedules_actor_kind": {
1639
+ "name": "schedules_actor_kind",
1640
+ "value": "\"schedules\".\"actor_kind\" IN ('token', 'user', 'oauth_client')"
1641
+ },
1642
+ "schedules_json": {
1643
+ "name": "schedules_json",
1644
+ "value": "json_valid(\"schedules\".\"acknowledged\") AND json_type(\"schedules\".\"acknowledged\") = 'array' AND (\"schedules\".\"actor_meta\" IS NULL OR json_valid(\"schedules\".\"actor_meta\"))"
1645
+ }
1646
+ }
1647
+ },
1648
+ "sessions": {
1649
+ "name": "sessions",
1650
+ "columns": {
1651
+ "id": {
1652
+ "name": "id",
1653
+ "type": "text",
1654
+ "primaryKey": true,
1655
+ "notNull": true,
1656
+ "autoincrement": false
1657
+ },
1658
+ "site_id": {
1659
+ "name": "site_id",
1660
+ "type": "text",
1661
+ "primaryKey": false,
1662
+ "notNull": true,
1663
+ "autoincrement": false
1664
+ },
1665
+ "user_id": {
1666
+ "name": "user_id",
1667
+ "type": "text",
1668
+ "primaryKey": false,
1669
+ "notNull": true,
1670
+ "autoincrement": false
1671
+ },
1672
+ "hash": {
1673
+ "name": "hash",
1674
+ "type": "text",
1675
+ "primaryKey": false,
1676
+ "notNull": true,
1677
+ "autoincrement": false
1678
+ },
1679
+ "expires_at": {
1680
+ "name": "expires_at",
1681
+ "type": "text",
1682
+ "primaryKey": false,
1683
+ "notNull": true,
1684
+ "autoincrement": false
1685
+ },
1686
+ "created_at": {
1687
+ "name": "created_at",
1688
+ "type": "text",
1689
+ "primaryKey": false,
1690
+ "notNull": true,
1691
+ "autoincrement": false
1692
+ },
1693
+ "updated_at": {
1694
+ "name": "updated_at",
1695
+ "type": "text",
1696
+ "primaryKey": false,
1697
+ "notNull": true,
1698
+ "autoincrement": false
1699
+ }
1700
+ },
1701
+ "indexes": {
1702
+ "sessions_id_site": {
1703
+ "name": "sessions_id_site",
1704
+ "columns": [
1705
+ "id",
1706
+ "site_id"
1707
+ ],
1708
+ "isUnique": true
1709
+ },
1710
+ "sessions_hash": {
1711
+ "name": "sessions_hash",
1712
+ "columns": [
1713
+ "hash"
1714
+ ],
1715
+ "isUnique": true
1716
+ }
1717
+ },
1718
+ "foreignKeys": {
1719
+ "sessions_site": {
1720
+ "name": "sessions_site",
1721
+ "tableFrom": "sessions",
1722
+ "tableTo": "sites",
1723
+ "columnsFrom": [
1724
+ "site_id"
1725
+ ],
1726
+ "columnsTo": [
1727
+ "id"
1728
+ ],
1729
+ "onDelete": "no action",
1730
+ "onUpdate": "no action"
1731
+ },
1732
+ "sessions_user": {
1733
+ "name": "sessions_user",
1734
+ "tableFrom": "sessions",
1735
+ "tableTo": "users",
1736
+ "columnsFrom": [
1737
+ "user_id"
1738
+ ],
1739
+ "columnsTo": [
1740
+ "id"
1741
+ ],
1742
+ "onDelete": "no action",
1743
+ "onUpdate": "no action"
1744
+ }
1745
+ },
1746
+ "compositePrimaryKeys": {},
1747
+ "uniqueConstraints": {},
1748
+ "checkConstraints": {}
1749
+ },
1750
+ "sites": {
1751
+ "name": "sites",
1752
+ "columns": {
1753
+ "id": {
1754
+ "name": "id",
1755
+ "type": "text",
1756
+ "primaryKey": true,
1757
+ "notNull": true,
1758
+ "autoincrement": false
1759
+ },
1760
+ "created_at": {
1761
+ "name": "created_at",
1762
+ "type": "text",
1763
+ "primaryKey": false,
1764
+ "notNull": true,
1765
+ "autoincrement": false
1766
+ },
1767
+ "updated_at": {
1768
+ "name": "updated_at",
1769
+ "type": "text",
1770
+ "primaryKey": false,
1771
+ "notNull": true,
1772
+ "autoincrement": false
1773
+ }
1774
+ },
1775
+ "indexes": {},
1776
+ "foreignKeys": {},
1777
+ "compositePrimaryKeys": {},
1778
+ "uniqueConstraints": {},
1779
+ "checkConstraints": {}
1780
+ },
1781
+ "tokens": {
1782
+ "name": "tokens",
1783
+ "columns": {
1784
+ "id": {
1785
+ "name": "id",
1786
+ "type": "text",
1787
+ "primaryKey": true,
1788
+ "notNull": true,
1789
+ "autoincrement": false
1790
+ },
1791
+ "site_id": {
1792
+ "name": "site_id",
1793
+ "type": "text",
1794
+ "primaryKey": false,
1795
+ "notNull": true,
1796
+ "autoincrement": false
1797
+ },
1798
+ "user_id": {
1799
+ "name": "user_id",
1800
+ "type": "text",
1801
+ "primaryKey": false,
1802
+ "notNull": true,
1803
+ "autoincrement": false
1804
+ },
1805
+ "label": {
1806
+ "name": "label",
1807
+ "type": "text",
1808
+ "primaryKey": false,
1809
+ "notNull": true,
1810
+ "autoincrement": false
1811
+ },
1812
+ "hash": {
1813
+ "name": "hash",
1814
+ "type": "text",
1815
+ "primaryKey": false,
1816
+ "notNull": true,
1817
+ "autoincrement": false
1818
+ },
1819
+ "scopes": {
1820
+ "name": "scopes",
1821
+ "type": "text",
1822
+ "primaryKey": false,
1823
+ "notNull": true,
1824
+ "autoincrement": false
1825
+ },
1826
+ "expires_at": {
1827
+ "name": "expires_at",
1828
+ "type": "text",
1829
+ "primaryKey": false,
1830
+ "notNull": false,
1831
+ "autoincrement": false
1832
+ },
1833
+ "revoked_at": {
1834
+ "name": "revoked_at",
1835
+ "type": "text",
1836
+ "primaryKey": false,
1837
+ "notNull": false,
1838
+ "autoincrement": false
1839
+ },
1840
+ "last_used_at": {
1841
+ "name": "last_used_at",
1842
+ "type": "text",
1843
+ "primaryKey": false,
1844
+ "notNull": false,
1845
+ "autoincrement": false
1846
+ },
1847
+ "created_at": {
1848
+ "name": "created_at",
1849
+ "type": "text",
1850
+ "primaryKey": false,
1851
+ "notNull": true,
1852
+ "autoincrement": false
1853
+ },
1854
+ "updated_at": {
1855
+ "name": "updated_at",
1856
+ "type": "text",
1857
+ "primaryKey": false,
1858
+ "notNull": true,
1859
+ "autoincrement": false
1860
+ }
1861
+ },
1862
+ "indexes": {
1863
+ "tokens_id_site": {
1864
+ "name": "tokens_id_site",
1865
+ "columns": [
1866
+ "id",
1867
+ "site_id"
1868
+ ],
1869
+ "isUnique": true
1870
+ },
1871
+ "tokens_hash": {
1872
+ "name": "tokens_hash",
1873
+ "columns": [
1874
+ "hash"
1875
+ ],
1876
+ "isUnique": true
1877
+ }
1878
+ },
1879
+ "foreignKeys": {
1880
+ "tokens_site": {
1881
+ "name": "tokens_site",
1882
+ "tableFrom": "tokens",
1883
+ "tableTo": "sites",
1884
+ "columnsFrom": [
1885
+ "site_id"
1886
+ ],
1887
+ "columnsTo": [
1888
+ "id"
1889
+ ],
1890
+ "onDelete": "no action",
1891
+ "onUpdate": "no action"
1892
+ },
1893
+ "tokens_user": {
1894
+ "name": "tokens_user",
1895
+ "tableFrom": "tokens",
1896
+ "tableTo": "users",
1897
+ "columnsFrom": [
1898
+ "user_id"
1899
+ ],
1900
+ "columnsTo": [
1901
+ "id"
1902
+ ],
1903
+ "onDelete": "no action",
1904
+ "onUpdate": "no action"
1905
+ }
1906
+ },
1907
+ "compositePrimaryKeys": {},
1908
+ "uniqueConstraints": {},
1909
+ "checkConstraints": {
1910
+ "tokens_scopes": {
1911
+ "name": "tokens_scopes",
1912
+ "value": "json_valid(\"tokens\".\"scopes\") AND json_type(\"tokens\".\"scopes\") = 'array'"
1913
+ }
1914
+ }
1915
+ },
1916
+ "users": {
1917
+ "name": "users",
1918
+ "columns": {
1919
+ "id": {
1920
+ "name": "id",
1921
+ "type": "text",
1922
+ "primaryKey": true,
1923
+ "notNull": true,
1924
+ "autoincrement": false
1925
+ },
1926
+ "name": {
1927
+ "name": "name",
1928
+ "type": "text",
1929
+ "primaryKey": false,
1930
+ "notNull": false,
1931
+ "autoincrement": false
1932
+ },
1933
+ "role": {
1934
+ "name": "role",
1935
+ "type": "text",
1936
+ "primaryKey": false,
1937
+ "notNull": true,
1938
+ "autoincrement": false
1939
+ },
1940
+ "created_at": {
1941
+ "name": "created_at",
1942
+ "type": "text",
1943
+ "primaryKey": false,
1944
+ "notNull": true,
1945
+ "autoincrement": false
1946
+ },
1947
+ "updated_at": {
1948
+ "name": "updated_at",
1949
+ "type": "text",
1950
+ "primaryKey": false,
1951
+ "notNull": true,
1952
+ "autoincrement": false
1953
+ }
1954
+ },
1955
+ "indexes": {},
1956
+ "foreignKeys": {},
1957
+ "compositePrimaryKeys": {},
1958
+ "uniqueConstraints": {},
1959
+ "checkConstraints": {
1960
+ "users_role": {
1961
+ "name": "users_role",
1962
+ "value": "\"users\".\"role\" IN ('owner', 'editor', 'reviewer')"
1963
+ }
1964
+ }
1965
+ }
1966
+ },
1967
+ "views": {},
1968
+ "enums": {},
1969
+ "_meta": {
1970
+ "schemas": {},
1971
+ "tables": {},
1972
+ "columns": {}
1973
+ },
1974
+ "internal": {
1975
+ "indexes": {}
1976
+ }
1977
+ }