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