@hollware/server 0.0.2 → 0.1.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,992 @@
1
+ {
2
+ "id": "c750134b-3d18-4d2d-93a7-18fdaf34b800",
3
+ "prevId": "cc8461ec-4147-46d9-9cb2-f236c0eac2cf",
4
+ "version": "6",
5
+ "dialect": "sqlite",
6
+ "tables": {
7
+ "entries": {
8
+ "name": "entries",
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
+ "collection": {
25
+ "name": "collection",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": true,
29
+ "autoincrement": false
30
+ },
31
+ "locale": {
32
+ "name": "locale",
33
+ "type": "text",
34
+ "primaryKey": false,
35
+ "notNull": true,
36
+ "autoincrement": false
37
+ },
38
+ "slug": {
39
+ "name": "slug",
40
+ "type": "text",
41
+ "primaryKey": false,
42
+ "notNull": true,
43
+ "autoincrement": false
44
+ },
45
+ "translation_group": {
46
+ "name": "translation_group",
47
+ "type": "text",
48
+ "primaryKey": false,
49
+ "notNull": false,
50
+ "autoincrement": false
51
+ },
52
+ "status": {
53
+ "name": "status",
54
+ "type": "text",
55
+ "primaryKey": false,
56
+ "notNull": true,
57
+ "autoincrement": false
58
+ },
59
+ "version": {
60
+ "name": "version",
61
+ "type": "integer",
62
+ "primaryKey": false,
63
+ "notNull": true,
64
+ "autoincrement": false
65
+ },
66
+ "head_rev": {
67
+ "name": "head_rev",
68
+ "type": "text",
69
+ "primaryKey": false,
70
+ "notNull": true,
71
+ "autoincrement": false
72
+ },
73
+ "published_rev": {
74
+ "name": "published_rev",
75
+ "type": "text",
76
+ "primaryKey": false,
77
+ "notNull": false,
78
+ "autoincrement": false
79
+ },
80
+ "published_at": {
81
+ "name": "published_at",
82
+ "type": "text",
83
+ "primaryKey": false,
84
+ "notNull": false,
85
+ "autoincrement": false
86
+ },
87
+ "published_sort_key": {
88
+ "name": "published_sort_key",
89
+ "type": "text",
90
+ "primaryKey": false,
91
+ "notNull": false,
92
+ "autoincrement": false
93
+ },
94
+ "scheduled_at": {
95
+ "name": "scheduled_at",
96
+ "type": "text",
97
+ "primaryKey": false,
98
+ "notNull": false,
99
+ "autoincrement": false
100
+ },
101
+ "created_at": {
102
+ "name": "created_at",
103
+ "type": "text",
104
+ "primaryKey": false,
105
+ "notNull": true,
106
+ "autoincrement": false
107
+ },
108
+ "updated_at": {
109
+ "name": "updated_at",
110
+ "type": "text",
111
+ "primaryKey": false,
112
+ "notNull": true,
113
+ "autoincrement": false
114
+ }
115
+ },
116
+ "indexes": {
117
+ "entries_head": {
118
+ "name": "entries_head",
119
+ "columns": [
120
+ "site_id",
121
+ "collection",
122
+ "updated_at",
123
+ "id"
124
+ ],
125
+ "isUnique": false
126
+ },
127
+ "entries_head_locale": {
128
+ "name": "entries_head_locale",
129
+ "columns": [
130
+ "site_id",
131
+ "collection",
132
+ "locale",
133
+ "updated_at",
134
+ "id"
135
+ ],
136
+ "isUnique": false
137
+ },
138
+ "entries_published": {
139
+ "name": "entries_published",
140
+ "columns": [
141
+ "site_id",
142
+ "collection",
143
+ "locale",
144
+ "published_sort_key",
145
+ "id"
146
+ ],
147
+ "where": "\"entries\".\"status\" = 'published'",
148
+ "isUnique": false
149
+ },
150
+ "entries_id_site": {
151
+ "name": "entries_id_site",
152
+ "columns": [
153
+ "id",
154
+ "site_id"
155
+ ],
156
+ "isUnique": true
157
+ },
158
+ "entries_slug": {
159
+ "name": "entries_slug",
160
+ "columns": [
161
+ "site_id",
162
+ "collection",
163
+ "locale",
164
+ "slug"
165
+ ],
166
+ "isUnique": true
167
+ },
168
+ "entries_translation": {
169
+ "name": "entries_translation",
170
+ "columns": [
171
+ "site_id",
172
+ "collection",
173
+ "translation_group",
174
+ "locale"
175
+ ],
176
+ "isUnique": true
177
+ }
178
+ },
179
+ "foreignKeys": {
180
+ "entries_site": {
181
+ "name": "entries_site",
182
+ "tableFrom": "entries",
183
+ "columnsFrom": [
184
+ "site_id"
185
+ ],
186
+ "tableTo": "sites",
187
+ "columnsTo": [
188
+ "id"
189
+ ],
190
+ "onUpdate": "no action",
191
+ "onDelete": "no action"
192
+ }
193
+ },
194
+ "compositePrimaryKeys": {},
195
+ "uniqueConstraints": {},
196
+ "checkConstraints": {
197
+ "entries_status": {
198
+ "name": "entries_status",
199
+ "value": "\"entries\".\"status\" IN ('draft', 'scheduled', 'published')"
200
+ },
201
+ "entries_version": {
202
+ "name": "entries_version",
203
+ "value": "\"entries\".\"version\" >= 1"
204
+ },
205
+ "entries_draft": {
206
+ "name": "entries_draft",
207
+ "value": "\"entries\".\"status\" <> 'draft' OR (\"entries\".\"published_rev\" IS NULL AND \"entries\".\"published_sort_key\" IS NULL AND \"entries\".\"scheduled_at\" IS NULL)"
208
+ },
209
+ "entries_published": {
210
+ "name": "entries_published",
211
+ "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)"
212
+ },
213
+ "entries_scheduled": {
214
+ "name": "entries_scheduled",
215
+ "value": "\"entries\".\"status\" <> 'scheduled' OR \"entries\".\"scheduled_at\" IS NOT NULL"
216
+ }
217
+ }
218
+ },
219
+ "_hollware_meta": {
220
+ "name": "_hollware_meta",
221
+ "columns": {
222
+ "key": {
223
+ "name": "key",
224
+ "type": "text",
225
+ "primaryKey": true,
226
+ "notNull": true,
227
+ "autoincrement": false
228
+ },
229
+ "value": {
230
+ "name": "value",
231
+ "type": "text",
232
+ "primaryKey": false,
233
+ "notNull": true,
234
+ "autoincrement": false
235
+ }
236
+ },
237
+ "indexes": {},
238
+ "foreignKeys": {},
239
+ "compositePrimaryKeys": {},
240
+ "uniqueConstraints": {},
241
+ "checkConstraints": {}
242
+ },
243
+ "publications": {
244
+ "name": "publications",
245
+ "columns": {
246
+ "id": {
247
+ "name": "id",
248
+ "type": "text",
249
+ "primaryKey": true,
250
+ "notNull": true,
251
+ "autoincrement": false
252
+ },
253
+ "site_id": {
254
+ "name": "site_id",
255
+ "type": "text",
256
+ "primaryKey": false,
257
+ "notNull": true,
258
+ "autoincrement": false
259
+ },
260
+ "entry_id": {
261
+ "name": "entry_id",
262
+ "type": "text",
263
+ "primaryKey": false,
264
+ "notNull": true,
265
+ "autoincrement": false
266
+ },
267
+ "action": {
268
+ "name": "action",
269
+ "type": "text",
270
+ "primaryKey": false,
271
+ "notNull": true,
272
+ "autoincrement": false
273
+ },
274
+ "revision_id": {
275
+ "name": "revision_id",
276
+ "type": "text",
277
+ "primaryKey": false,
278
+ "notNull": false,
279
+ "autoincrement": false
280
+ },
281
+ "verdict": {
282
+ "name": "verdict",
283
+ "type": "text",
284
+ "primaryKey": false,
285
+ "notNull": false,
286
+ "autoincrement": false
287
+ },
288
+ "acknowledged": {
289
+ "name": "acknowledged",
290
+ "type": "text",
291
+ "primaryKey": false,
292
+ "notNull": true,
293
+ "autoincrement": false
294
+ },
295
+ "actor_kind": {
296
+ "name": "actor_kind",
297
+ "type": "text",
298
+ "primaryKey": false,
299
+ "notNull": true,
300
+ "autoincrement": false
301
+ },
302
+ "actor_user_id": {
303
+ "name": "actor_user_id",
304
+ "type": "text",
305
+ "primaryKey": false,
306
+ "notNull": true,
307
+ "autoincrement": false
308
+ },
309
+ "actor_token_id": {
310
+ "name": "actor_token_id",
311
+ "type": "text",
312
+ "primaryKey": false,
313
+ "notNull": false,
314
+ "autoincrement": false
315
+ },
316
+ "actor_meta": {
317
+ "name": "actor_meta",
318
+ "type": "text",
319
+ "primaryKey": false,
320
+ "notNull": false,
321
+ "autoincrement": false
322
+ },
323
+ "created_at": {
324
+ "name": "created_at",
325
+ "type": "text",
326
+ "primaryKey": false,
327
+ "notNull": true,
328
+ "autoincrement": false
329
+ },
330
+ "updated_at": {
331
+ "name": "updated_at",
332
+ "type": "text",
333
+ "primaryKey": false,
334
+ "notNull": true,
335
+ "autoincrement": false
336
+ }
337
+ },
338
+ "indexes": {
339
+ "publications_entry": {
340
+ "name": "publications_entry",
341
+ "columns": [
342
+ "entry_id",
343
+ "created_at"
344
+ ],
345
+ "isUnique": false
346
+ },
347
+ "publications_id_site": {
348
+ "name": "publications_id_site",
349
+ "columns": [
350
+ "id",
351
+ "site_id"
352
+ ],
353
+ "isUnique": true
354
+ }
355
+ },
356
+ "foreignKeys": {
357
+ "publications_site": {
358
+ "name": "publications_site",
359
+ "tableFrom": "publications",
360
+ "columnsFrom": [
361
+ "site_id"
362
+ ],
363
+ "tableTo": "sites",
364
+ "columnsTo": [
365
+ "id"
366
+ ],
367
+ "onUpdate": "no action",
368
+ "onDelete": "no action"
369
+ },
370
+ "publications_entry": {
371
+ "name": "publications_entry",
372
+ "tableFrom": "publications",
373
+ "columnsFrom": [
374
+ "entry_id",
375
+ "site_id"
376
+ ],
377
+ "tableTo": "entries",
378
+ "columnsTo": [
379
+ "id",
380
+ "site_id"
381
+ ],
382
+ "onUpdate": "no action",
383
+ "onDelete": "no action"
384
+ },
385
+ "publications_revision": {
386
+ "name": "publications_revision",
387
+ "tableFrom": "publications",
388
+ "columnsFrom": [
389
+ "revision_id",
390
+ "site_id"
391
+ ],
392
+ "tableTo": "revisions",
393
+ "columnsTo": [
394
+ "id",
395
+ "site_id"
396
+ ],
397
+ "onUpdate": "no action",
398
+ "onDelete": "no action"
399
+ },
400
+ "publications_user": {
401
+ "name": "publications_user",
402
+ "tableFrom": "publications",
403
+ "columnsFrom": [
404
+ "actor_user_id"
405
+ ],
406
+ "tableTo": "users",
407
+ "columnsTo": [
408
+ "id"
409
+ ],
410
+ "onUpdate": "no action",
411
+ "onDelete": "no action"
412
+ },
413
+ "publications_token": {
414
+ "name": "publications_token",
415
+ "tableFrom": "publications",
416
+ "columnsFrom": [
417
+ "actor_token_id",
418
+ "site_id"
419
+ ],
420
+ "tableTo": "tokens",
421
+ "columnsTo": [
422
+ "id",
423
+ "site_id"
424
+ ],
425
+ "onUpdate": "no action",
426
+ "onDelete": "no action"
427
+ }
428
+ },
429
+ "compositePrimaryKeys": {},
430
+ "uniqueConstraints": {},
431
+ "checkConstraints": {
432
+ "publications_action": {
433
+ "name": "publications_action",
434
+ "value": "\"publications\".\"action\" IN ('publish', 'unpublish')"
435
+ },
436
+ "publications_shape": {
437
+ "name": "publications_shape",
438
+ "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)"
439
+ },
440
+ "publications_actor_kind": {
441
+ "name": "publications_actor_kind",
442
+ "value": "\"publications\".\"actor_kind\" IN ('token', 'user', 'oauth_client')"
443
+ },
444
+ "publications_json": {
445
+ "name": "publications_json",
446
+ "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\"))"
447
+ }
448
+ }
449
+ },
450
+ "revision_tags": {
451
+ "name": "revision_tags",
452
+ "columns": {
453
+ "id": {
454
+ "name": "id",
455
+ "type": "text",
456
+ "primaryKey": true,
457
+ "notNull": true,
458
+ "autoincrement": false
459
+ },
460
+ "site_id": {
461
+ "name": "site_id",
462
+ "type": "text",
463
+ "primaryKey": false,
464
+ "notNull": true,
465
+ "autoincrement": false
466
+ },
467
+ "revision_id": {
468
+ "name": "revision_id",
469
+ "type": "text",
470
+ "primaryKey": false,
471
+ "notNull": true,
472
+ "autoincrement": false
473
+ },
474
+ "tag": {
475
+ "name": "tag",
476
+ "type": "text",
477
+ "primaryKey": false,
478
+ "notNull": true,
479
+ "autoincrement": false
480
+ },
481
+ "created_at": {
482
+ "name": "created_at",
483
+ "type": "text",
484
+ "primaryKey": false,
485
+ "notNull": true,
486
+ "autoincrement": false
487
+ },
488
+ "updated_at": {
489
+ "name": "updated_at",
490
+ "type": "text",
491
+ "primaryKey": false,
492
+ "notNull": true,
493
+ "autoincrement": false
494
+ }
495
+ },
496
+ "indexes": {
497
+ "revision_tags_by_tag": {
498
+ "name": "revision_tags_by_tag",
499
+ "columns": [
500
+ "site_id",
501
+ "tag"
502
+ ],
503
+ "isUnique": false
504
+ },
505
+ "revision_tags_id_site": {
506
+ "name": "revision_tags_id_site",
507
+ "columns": [
508
+ "id",
509
+ "site_id"
510
+ ],
511
+ "isUnique": true
512
+ },
513
+ "revision_tags_tag": {
514
+ "name": "revision_tags_tag",
515
+ "columns": [
516
+ "revision_id",
517
+ "tag"
518
+ ],
519
+ "isUnique": true
520
+ }
521
+ },
522
+ "foreignKeys": {
523
+ "revision_tags_site": {
524
+ "name": "revision_tags_site",
525
+ "tableFrom": "revision_tags",
526
+ "columnsFrom": [
527
+ "site_id"
528
+ ],
529
+ "tableTo": "sites",
530
+ "columnsTo": [
531
+ "id"
532
+ ],
533
+ "onUpdate": "no action",
534
+ "onDelete": "no action"
535
+ },
536
+ "revision_tags_revision": {
537
+ "name": "revision_tags_revision",
538
+ "tableFrom": "revision_tags",
539
+ "columnsFrom": [
540
+ "revision_id",
541
+ "site_id"
542
+ ],
543
+ "tableTo": "revisions",
544
+ "columnsTo": [
545
+ "id",
546
+ "site_id"
547
+ ],
548
+ "onUpdate": "no action",
549
+ "onDelete": "no action"
550
+ }
551
+ },
552
+ "compositePrimaryKeys": {},
553
+ "uniqueConstraints": {},
554
+ "checkConstraints": {}
555
+ },
556
+ "revisions": {
557
+ "name": "revisions",
558
+ "columns": {
559
+ "id": {
560
+ "name": "id",
561
+ "type": "text",
562
+ "primaryKey": true,
563
+ "notNull": true,
564
+ "autoincrement": false
565
+ },
566
+ "site_id": {
567
+ "name": "site_id",
568
+ "type": "text",
569
+ "primaryKey": false,
570
+ "notNull": true,
571
+ "autoincrement": false
572
+ },
573
+ "entry_id": {
574
+ "name": "entry_id",
575
+ "type": "text",
576
+ "primaryKey": false,
577
+ "notNull": true,
578
+ "autoincrement": false
579
+ },
580
+ "markdown": {
581
+ "name": "markdown",
582
+ "type": "text",
583
+ "primaryKey": false,
584
+ "notNull": true,
585
+ "autoincrement": false
586
+ },
587
+ "frontmatter": {
588
+ "name": "frontmatter",
589
+ "type": "text",
590
+ "primaryKey": false,
591
+ "notNull": true,
592
+ "autoincrement": false
593
+ },
594
+ "document": {
595
+ "name": "document",
596
+ "type": "text",
597
+ "primaryKey": false,
598
+ "notNull": true,
599
+ "autoincrement": false
600
+ },
601
+ "comark_version": {
602
+ "name": "comark_version",
603
+ "type": "text",
604
+ "primaryKey": false,
605
+ "notNull": true,
606
+ "autoincrement": false
607
+ },
608
+ "pipeline_version": {
609
+ "name": "pipeline_version",
610
+ "type": "text",
611
+ "primaryKey": false,
612
+ "notNull": true,
613
+ "autoincrement": false
614
+ },
615
+ "word_count": {
616
+ "name": "word_count",
617
+ "type": "integer",
618
+ "primaryKey": false,
619
+ "notNull": true,
620
+ "autoincrement": false
621
+ },
622
+ "verdict": {
623
+ "name": "verdict",
624
+ "type": "text",
625
+ "primaryKey": false,
626
+ "notNull": true,
627
+ "autoincrement": false
628
+ },
629
+ "actor_kind": {
630
+ "name": "actor_kind",
631
+ "type": "text",
632
+ "primaryKey": false,
633
+ "notNull": true,
634
+ "autoincrement": false
635
+ },
636
+ "actor_user_id": {
637
+ "name": "actor_user_id",
638
+ "type": "text",
639
+ "primaryKey": false,
640
+ "notNull": true,
641
+ "autoincrement": false
642
+ },
643
+ "actor_token_id": {
644
+ "name": "actor_token_id",
645
+ "type": "text",
646
+ "primaryKey": false,
647
+ "notNull": false,
648
+ "autoincrement": false
649
+ },
650
+ "actor_meta": {
651
+ "name": "actor_meta",
652
+ "type": "text",
653
+ "primaryKey": false,
654
+ "notNull": false,
655
+ "autoincrement": false
656
+ },
657
+ "created_at": {
658
+ "name": "created_at",
659
+ "type": "text",
660
+ "primaryKey": false,
661
+ "notNull": true,
662
+ "autoincrement": false
663
+ },
664
+ "updated_at": {
665
+ "name": "updated_at",
666
+ "type": "text",
667
+ "primaryKey": false,
668
+ "notNull": true,
669
+ "autoincrement": false
670
+ }
671
+ },
672
+ "indexes": {
673
+ "revisions_entry": {
674
+ "name": "revisions_entry",
675
+ "columns": [
676
+ "entry_id",
677
+ "created_at"
678
+ ],
679
+ "isUnique": false
680
+ },
681
+ "revisions_id_site": {
682
+ "name": "revisions_id_site",
683
+ "columns": [
684
+ "id",
685
+ "site_id"
686
+ ],
687
+ "isUnique": true
688
+ }
689
+ },
690
+ "foreignKeys": {
691
+ "revisions_site": {
692
+ "name": "revisions_site",
693
+ "tableFrom": "revisions",
694
+ "columnsFrom": [
695
+ "site_id"
696
+ ],
697
+ "tableTo": "sites",
698
+ "columnsTo": [
699
+ "id"
700
+ ],
701
+ "onUpdate": "no action",
702
+ "onDelete": "no action"
703
+ },
704
+ "revisions_entry": {
705
+ "name": "revisions_entry",
706
+ "tableFrom": "revisions",
707
+ "columnsFrom": [
708
+ "entry_id",
709
+ "site_id"
710
+ ],
711
+ "tableTo": "entries",
712
+ "columnsTo": [
713
+ "id",
714
+ "site_id"
715
+ ],
716
+ "onUpdate": "no action",
717
+ "onDelete": "no action"
718
+ },
719
+ "revisions_user": {
720
+ "name": "revisions_user",
721
+ "tableFrom": "revisions",
722
+ "columnsFrom": [
723
+ "actor_user_id"
724
+ ],
725
+ "tableTo": "users",
726
+ "columnsTo": [
727
+ "id"
728
+ ],
729
+ "onUpdate": "no action",
730
+ "onDelete": "no action"
731
+ },
732
+ "revisions_token": {
733
+ "name": "revisions_token",
734
+ "tableFrom": "revisions",
735
+ "columnsFrom": [
736
+ "actor_token_id",
737
+ "site_id"
738
+ ],
739
+ "tableTo": "tokens",
740
+ "columnsTo": [
741
+ "id",
742
+ "site_id"
743
+ ],
744
+ "onUpdate": "no action",
745
+ "onDelete": "no action"
746
+ }
747
+ },
748
+ "compositePrimaryKeys": {},
749
+ "uniqueConstraints": {},
750
+ "checkConstraints": {
751
+ "revisions_actor_kind": {
752
+ "name": "revisions_actor_kind",
753
+ "value": "\"revisions\".\"actor_kind\" IN ('token', 'user', 'oauth_client')"
754
+ },
755
+ "revisions_json": {
756
+ "name": "revisions_json",
757
+ "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\"))"
758
+ },
759
+ "revisions_word_count": {
760
+ "name": "revisions_word_count",
761
+ "value": "\"revisions\".\"word_count\" >= 0"
762
+ }
763
+ }
764
+ },
765
+ "sites": {
766
+ "name": "sites",
767
+ "columns": {
768
+ "id": {
769
+ "name": "id",
770
+ "type": "text",
771
+ "primaryKey": true,
772
+ "notNull": true,
773
+ "autoincrement": false
774
+ },
775
+ "created_at": {
776
+ "name": "created_at",
777
+ "type": "text",
778
+ "primaryKey": false,
779
+ "notNull": true,
780
+ "autoincrement": false
781
+ },
782
+ "updated_at": {
783
+ "name": "updated_at",
784
+ "type": "text",
785
+ "primaryKey": false,
786
+ "notNull": true,
787
+ "autoincrement": false
788
+ }
789
+ },
790
+ "indexes": {},
791
+ "foreignKeys": {},
792
+ "compositePrimaryKeys": {},
793
+ "uniqueConstraints": {},
794
+ "checkConstraints": {}
795
+ },
796
+ "tokens": {
797
+ "name": "tokens",
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
+ "label": {
821
+ "name": "label",
822
+ "type": "text",
823
+ "primaryKey": false,
824
+ "notNull": true,
825
+ "autoincrement": false
826
+ },
827
+ "hash": {
828
+ "name": "hash",
829
+ "type": "text",
830
+ "primaryKey": false,
831
+ "notNull": true,
832
+ "autoincrement": false
833
+ },
834
+ "scopes": {
835
+ "name": "scopes",
836
+ "type": "text",
837
+ "primaryKey": false,
838
+ "notNull": true,
839
+ "autoincrement": false
840
+ },
841
+ "expires_at": {
842
+ "name": "expires_at",
843
+ "type": "text",
844
+ "primaryKey": false,
845
+ "notNull": false,
846
+ "autoincrement": false
847
+ },
848
+ "revoked_at": {
849
+ "name": "revoked_at",
850
+ "type": "text",
851
+ "primaryKey": false,
852
+ "notNull": false,
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
+ "tokens_id_site": {
879
+ "name": "tokens_id_site",
880
+ "columns": [
881
+ "id",
882
+ "site_id"
883
+ ],
884
+ "isUnique": true
885
+ },
886
+ "tokens_hash": {
887
+ "name": "tokens_hash",
888
+ "columns": [
889
+ "hash"
890
+ ],
891
+ "isUnique": true
892
+ }
893
+ },
894
+ "foreignKeys": {
895
+ "tokens_site": {
896
+ "name": "tokens_site",
897
+ "tableFrom": "tokens",
898
+ "columnsFrom": [
899
+ "site_id"
900
+ ],
901
+ "tableTo": "sites",
902
+ "columnsTo": [
903
+ "id"
904
+ ],
905
+ "onUpdate": "no action",
906
+ "onDelete": "no action"
907
+ },
908
+ "tokens_user": {
909
+ "name": "tokens_user",
910
+ "tableFrom": "tokens",
911
+ "columnsFrom": [
912
+ "user_id"
913
+ ],
914
+ "tableTo": "users",
915
+ "columnsTo": [
916
+ "id"
917
+ ],
918
+ "onUpdate": "no action",
919
+ "onDelete": "no action"
920
+ }
921
+ },
922
+ "compositePrimaryKeys": {},
923
+ "uniqueConstraints": {},
924
+ "checkConstraints": {
925
+ "tokens_scopes": {
926
+ "name": "tokens_scopes",
927
+ "value": "json_valid(\"tokens\".\"scopes\") AND json_type(\"tokens\".\"scopes\") = 'array'"
928
+ }
929
+ }
930
+ },
931
+ "users": {
932
+ "name": "users",
933
+ "columns": {
934
+ "id": {
935
+ "name": "id",
936
+ "type": "text",
937
+ "primaryKey": true,
938
+ "notNull": true,
939
+ "autoincrement": false
940
+ },
941
+ "name": {
942
+ "name": "name",
943
+ "type": "text",
944
+ "primaryKey": false,
945
+ "notNull": false,
946
+ "autoincrement": false
947
+ },
948
+ "role": {
949
+ "name": "role",
950
+ "type": "text",
951
+ "primaryKey": false,
952
+ "notNull": true,
953
+ "autoincrement": false
954
+ },
955
+ "created_at": {
956
+ "name": "created_at",
957
+ "type": "text",
958
+ "primaryKey": false,
959
+ "notNull": true,
960
+ "autoincrement": false
961
+ },
962
+ "updated_at": {
963
+ "name": "updated_at",
964
+ "type": "text",
965
+ "primaryKey": false,
966
+ "notNull": true,
967
+ "autoincrement": false
968
+ }
969
+ },
970
+ "indexes": {},
971
+ "foreignKeys": {},
972
+ "compositePrimaryKeys": {},
973
+ "uniqueConstraints": {},
974
+ "checkConstraints": {
975
+ "users_role": {
976
+ "name": "users_role",
977
+ "value": "\"users\".\"role\" IN ('owner', 'editor', 'reviewer')"
978
+ }
979
+ }
980
+ }
981
+ },
982
+ "views": {},
983
+ "enums": {},
984
+ "_meta": {
985
+ "columns": {},
986
+ "schemas": {},
987
+ "tables": {}
988
+ },
989
+ "internal": {
990
+ "indexes": {}
991
+ }
992
+ }