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