@manablox/db 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3574 @@
1
+ {
2
+ "id": "cd9e8db2-18b0-4d20-9a01-33856d6b28ed",
3
+ "prevId": "61070f4c-9643-4334-8309-e3642501dc66",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.asset_usages": {
8
+ "name": "asset_usages",
9
+ "schema": "",
10
+ "columns": {
11
+ "asset_id": {
12
+ "name": "asset_id",
13
+ "type": "uuid",
14
+ "primaryKey": false,
15
+ "notNull": true
16
+ },
17
+ "content_id": {
18
+ "name": "content_id",
19
+ "type": "uuid",
20
+ "primaryKey": false,
21
+ "notNull": true
22
+ },
23
+ "space_id": {
24
+ "name": "space_id",
25
+ "type": "uuid",
26
+ "primaryKey": false,
27
+ "notNull": true
28
+ },
29
+ "published": {
30
+ "name": "published",
31
+ "type": "boolean",
32
+ "primaryKey": false,
33
+ "notNull": true,
34
+ "default": false
35
+ },
36
+ "updated_at": {
37
+ "name": "updated_at",
38
+ "type": "timestamp with time zone",
39
+ "primaryKey": false,
40
+ "notNull": true,
41
+ "default": "now()"
42
+ }
43
+ },
44
+ "indexes": {
45
+ "asset_usages_published_idx": {
46
+ "name": "asset_usages_published_idx",
47
+ "columns": [
48
+ {
49
+ "expression": "asset_id",
50
+ "isExpression": false,
51
+ "asc": true,
52
+ "nulls": "last"
53
+ },
54
+ {
55
+ "expression": "published",
56
+ "isExpression": false,
57
+ "asc": true,
58
+ "nulls": "last"
59
+ }
60
+ ],
61
+ "isUnique": false,
62
+ "concurrently": false,
63
+ "method": "btree",
64
+ "with": {}
65
+ },
66
+ "asset_usages_content_idx": {
67
+ "name": "asset_usages_content_idx",
68
+ "columns": [
69
+ {
70
+ "expression": "content_id",
71
+ "isExpression": false,
72
+ "asc": true,
73
+ "nulls": "last"
74
+ }
75
+ ],
76
+ "isUnique": false,
77
+ "concurrently": false,
78
+ "method": "btree",
79
+ "with": {}
80
+ }
81
+ },
82
+ "foreignKeys": {
83
+ "asset_usages_asset_id_assets_id_fk": {
84
+ "name": "asset_usages_asset_id_assets_id_fk",
85
+ "tableFrom": "asset_usages",
86
+ "tableTo": "assets",
87
+ "columnsFrom": [
88
+ "asset_id"
89
+ ],
90
+ "columnsTo": [
91
+ "id"
92
+ ],
93
+ "onDelete": "cascade",
94
+ "onUpdate": "no action"
95
+ },
96
+ "asset_usages_content_id_contents_id_fk": {
97
+ "name": "asset_usages_content_id_contents_id_fk",
98
+ "tableFrom": "asset_usages",
99
+ "tableTo": "contents",
100
+ "columnsFrom": [
101
+ "content_id"
102
+ ],
103
+ "columnsTo": [
104
+ "id"
105
+ ],
106
+ "onDelete": "cascade",
107
+ "onUpdate": "no action"
108
+ },
109
+ "asset_usages_space_id_spaces_id_fk": {
110
+ "name": "asset_usages_space_id_spaces_id_fk",
111
+ "tableFrom": "asset_usages",
112
+ "tableTo": "spaces",
113
+ "columnsFrom": [
114
+ "space_id"
115
+ ],
116
+ "columnsTo": [
117
+ "id"
118
+ ],
119
+ "onDelete": "cascade",
120
+ "onUpdate": "no action"
121
+ }
122
+ },
123
+ "compositePrimaryKeys": {
124
+ "asset_usages_asset_id_content_id_pk": {
125
+ "name": "asset_usages_asset_id_content_id_pk",
126
+ "columns": [
127
+ "asset_id",
128
+ "content_id"
129
+ ]
130
+ }
131
+ },
132
+ "uniqueConstraints": {},
133
+ "policies": {},
134
+ "checkConstraints": {},
135
+ "isRLSEnabled": false
136
+ },
137
+ "public.asset_variants": {
138
+ "name": "asset_variants",
139
+ "schema": "",
140
+ "columns": {
141
+ "id": {
142
+ "name": "id",
143
+ "type": "uuid",
144
+ "primaryKey": true,
145
+ "notNull": true,
146
+ "default": "gen_random_uuid()"
147
+ },
148
+ "asset_id": {
149
+ "name": "asset_id",
150
+ "type": "uuid",
151
+ "primaryKey": false,
152
+ "notNull": true
153
+ },
154
+ "preset": {
155
+ "name": "preset",
156
+ "type": "text",
157
+ "primaryKey": false,
158
+ "notNull": true
159
+ },
160
+ "format": {
161
+ "name": "format",
162
+ "type": "text",
163
+ "primaryKey": false,
164
+ "notNull": true
165
+ },
166
+ "key": {
167
+ "name": "key",
168
+ "type": "text",
169
+ "primaryKey": false,
170
+ "notNull": true
171
+ },
172
+ "width": {
173
+ "name": "width",
174
+ "type": "integer",
175
+ "primaryKey": false,
176
+ "notNull": false
177
+ },
178
+ "height": {
179
+ "name": "height",
180
+ "type": "integer",
181
+ "primaryKey": false,
182
+ "notNull": false
183
+ },
184
+ "size": {
185
+ "name": "size",
186
+ "type": "integer",
187
+ "primaryKey": false,
188
+ "notNull": true
189
+ },
190
+ "created_at": {
191
+ "name": "created_at",
192
+ "type": "timestamp with time zone",
193
+ "primaryKey": false,
194
+ "notNull": true,
195
+ "default": "now()"
196
+ }
197
+ },
198
+ "indexes": {
199
+ "asset_variants_asset_preset_format_key": {
200
+ "name": "asset_variants_asset_preset_format_key",
201
+ "columns": [
202
+ {
203
+ "expression": "asset_id",
204
+ "isExpression": false,
205
+ "asc": true,
206
+ "nulls": "last"
207
+ },
208
+ {
209
+ "expression": "preset",
210
+ "isExpression": false,
211
+ "asc": true,
212
+ "nulls": "last"
213
+ },
214
+ {
215
+ "expression": "format",
216
+ "isExpression": false,
217
+ "asc": true,
218
+ "nulls": "last"
219
+ }
220
+ ],
221
+ "isUnique": true,
222
+ "concurrently": false,
223
+ "method": "btree",
224
+ "with": {}
225
+ }
226
+ },
227
+ "foreignKeys": {
228
+ "asset_variants_asset_id_assets_id_fk": {
229
+ "name": "asset_variants_asset_id_assets_id_fk",
230
+ "tableFrom": "asset_variants",
231
+ "tableTo": "assets",
232
+ "columnsFrom": [
233
+ "asset_id"
234
+ ],
235
+ "columnsTo": [
236
+ "id"
237
+ ],
238
+ "onDelete": "cascade",
239
+ "onUpdate": "no action"
240
+ }
241
+ },
242
+ "compositePrimaryKeys": {},
243
+ "uniqueConstraints": {},
244
+ "policies": {},
245
+ "checkConstraints": {},
246
+ "isRLSEnabled": false
247
+ },
248
+ "public.assets": {
249
+ "name": "assets",
250
+ "schema": "",
251
+ "columns": {
252
+ "id": {
253
+ "name": "id",
254
+ "type": "uuid",
255
+ "primaryKey": true,
256
+ "notNull": true,
257
+ "default": "gen_random_uuid()"
258
+ },
259
+ "space_id": {
260
+ "name": "space_id",
261
+ "type": "uuid",
262
+ "primaryKey": false,
263
+ "notNull": true
264
+ },
265
+ "driver": {
266
+ "name": "driver",
267
+ "type": "text",
268
+ "primaryKey": false,
269
+ "notNull": true,
270
+ "default": "'local'"
271
+ },
272
+ "key": {
273
+ "name": "key",
274
+ "type": "text",
275
+ "primaryKey": false,
276
+ "notNull": true
277
+ },
278
+ "filename": {
279
+ "name": "filename",
280
+ "type": "text",
281
+ "primaryKey": false,
282
+ "notNull": true
283
+ },
284
+ "name": {
285
+ "name": "name",
286
+ "type": "text",
287
+ "primaryKey": false,
288
+ "notNull": true
289
+ },
290
+ "mime_type": {
291
+ "name": "mime_type",
292
+ "type": "text",
293
+ "primaryKey": false,
294
+ "notNull": true
295
+ },
296
+ "size": {
297
+ "name": "size",
298
+ "type": "integer",
299
+ "primaryKey": false,
300
+ "notNull": true
301
+ },
302
+ "width": {
303
+ "name": "width",
304
+ "type": "integer",
305
+ "primaryKey": false,
306
+ "notNull": false
307
+ },
308
+ "height": {
309
+ "name": "height",
310
+ "type": "integer",
311
+ "primaryKey": false,
312
+ "notNull": false
313
+ },
314
+ "duration": {
315
+ "name": "duration",
316
+ "type": "integer",
317
+ "primaryKey": false,
318
+ "notNull": false
319
+ },
320
+ "checksum": {
321
+ "name": "checksum",
322
+ "type": "text",
323
+ "primaryKey": false,
324
+ "notNull": false
325
+ },
326
+ "alt": {
327
+ "name": "alt",
328
+ "type": "text",
329
+ "primaryKey": false,
330
+ "notNull": false
331
+ },
332
+ "title": {
333
+ "name": "title",
334
+ "type": "text",
335
+ "primaryKey": false,
336
+ "notNull": false
337
+ },
338
+ "meta": {
339
+ "name": "meta",
340
+ "type": "jsonb",
341
+ "primaryKey": false,
342
+ "notNull": true,
343
+ "default": "'{}'::jsonb"
344
+ },
345
+ "created_at": {
346
+ "name": "created_at",
347
+ "type": "timestamp with time zone",
348
+ "primaryKey": false,
349
+ "notNull": true,
350
+ "default": "now()"
351
+ },
352
+ "updated_at": {
353
+ "name": "updated_at",
354
+ "type": "timestamp with time zone",
355
+ "primaryKey": false,
356
+ "notNull": true,
357
+ "default": "now()"
358
+ },
359
+ "created_by": {
360
+ "name": "created_by",
361
+ "type": "uuid",
362
+ "primaryKey": false,
363
+ "notNull": false
364
+ }
365
+ },
366
+ "indexes": {
367
+ "assets_driver_key_key": {
368
+ "name": "assets_driver_key_key",
369
+ "columns": [
370
+ {
371
+ "expression": "driver",
372
+ "isExpression": false,
373
+ "asc": true,
374
+ "nulls": "last"
375
+ },
376
+ {
377
+ "expression": "key",
378
+ "isExpression": false,
379
+ "asc": true,
380
+ "nulls": "last"
381
+ }
382
+ ],
383
+ "isUnique": true,
384
+ "concurrently": false,
385
+ "method": "btree",
386
+ "with": {}
387
+ },
388
+ "assets_space_idx": {
389
+ "name": "assets_space_idx",
390
+ "columns": [
391
+ {
392
+ "expression": "space_id",
393
+ "isExpression": false,
394
+ "asc": true,
395
+ "nulls": "last"
396
+ },
397
+ {
398
+ "expression": "created_at",
399
+ "isExpression": false,
400
+ "asc": true,
401
+ "nulls": "last"
402
+ }
403
+ ],
404
+ "isUnique": false,
405
+ "concurrently": false,
406
+ "method": "btree",
407
+ "with": {}
408
+ },
409
+ "assets_checksum_idx": {
410
+ "name": "assets_checksum_idx",
411
+ "columns": [
412
+ {
413
+ "expression": "space_id",
414
+ "isExpression": false,
415
+ "asc": true,
416
+ "nulls": "last"
417
+ },
418
+ {
419
+ "expression": "checksum",
420
+ "isExpression": false,
421
+ "asc": true,
422
+ "nulls": "last"
423
+ }
424
+ ],
425
+ "isUnique": false,
426
+ "concurrently": false,
427
+ "method": "btree",
428
+ "with": {}
429
+ },
430
+ "assets_mime_idx": {
431
+ "name": "assets_mime_idx",
432
+ "columns": [
433
+ {
434
+ "expression": "space_id",
435
+ "isExpression": false,
436
+ "asc": true,
437
+ "nulls": "last"
438
+ },
439
+ {
440
+ "expression": "mime_type",
441
+ "isExpression": false,
442
+ "asc": true,
443
+ "nulls": "last"
444
+ }
445
+ ],
446
+ "isUnique": false,
447
+ "concurrently": false,
448
+ "method": "btree",
449
+ "with": {}
450
+ }
451
+ },
452
+ "foreignKeys": {
453
+ "assets_space_id_spaces_id_fk": {
454
+ "name": "assets_space_id_spaces_id_fk",
455
+ "tableFrom": "assets",
456
+ "tableTo": "spaces",
457
+ "columnsFrom": [
458
+ "space_id"
459
+ ],
460
+ "columnsTo": [
461
+ "id"
462
+ ],
463
+ "onDelete": "cascade",
464
+ "onUpdate": "no action"
465
+ }
466
+ },
467
+ "compositePrimaryKeys": {},
468
+ "uniqueConstraints": {},
469
+ "policies": {},
470
+ "checkConstraints": {},
471
+ "isRLSEnabled": false
472
+ },
473
+ "public.audit_entries": {
474
+ "name": "audit_entries",
475
+ "schema": "",
476
+ "columns": {
477
+ "id": {
478
+ "name": "id",
479
+ "type": "uuid",
480
+ "primaryKey": true,
481
+ "notNull": true,
482
+ "default": "gen_random_uuid()"
483
+ },
484
+ "seq": {
485
+ "name": "seq",
486
+ "type": "bigserial",
487
+ "primaryKey": false,
488
+ "notNull": true
489
+ },
490
+ "at": {
491
+ "name": "at",
492
+ "type": "timestamp with time zone",
493
+ "primaryKey": false,
494
+ "notNull": true,
495
+ "default": "now()"
496
+ },
497
+ "space_id": {
498
+ "name": "space_id",
499
+ "type": "uuid",
500
+ "primaryKey": false,
501
+ "notNull": false
502
+ },
503
+ "actor_kind": {
504
+ "name": "actor_kind",
505
+ "type": "text",
506
+ "primaryKey": false,
507
+ "notNull": true
508
+ },
509
+ "actor_id": {
510
+ "name": "actor_id",
511
+ "type": "text",
512
+ "primaryKey": false,
513
+ "notNull": false
514
+ },
515
+ "actor_label": {
516
+ "name": "actor_label",
517
+ "type": "text",
518
+ "primaryKey": false,
519
+ "notNull": true
520
+ },
521
+ "actor_detail": {
522
+ "name": "actor_detail",
523
+ "type": "jsonb",
524
+ "primaryKey": false,
525
+ "notNull": false
526
+ },
527
+ "action": {
528
+ "name": "action",
529
+ "type": "text",
530
+ "primaryKey": false,
531
+ "notNull": true
532
+ },
533
+ "target_kind": {
534
+ "name": "target_kind",
535
+ "type": "text",
536
+ "primaryKey": false,
537
+ "notNull": true
538
+ },
539
+ "target_id": {
540
+ "name": "target_id",
541
+ "type": "text",
542
+ "primaryKey": false,
543
+ "notNull": false
544
+ },
545
+ "target_label": {
546
+ "name": "target_label",
547
+ "type": "text",
548
+ "primaryKey": false,
549
+ "notNull": false
550
+ },
551
+ "changes": {
552
+ "name": "changes",
553
+ "type": "jsonb",
554
+ "primaryKey": false,
555
+ "notNull": true,
556
+ "default": "'[]'::jsonb"
557
+ },
558
+ "meta": {
559
+ "name": "meta",
560
+ "type": "jsonb",
561
+ "primaryKey": false,
562
+ "notNull": false
563
+ },
564
+ "prev_hash": {
565
+ "name": "prev_hash",
566
+ "type": "text",
567
+ "primaryKey": false,
568
+ "notNull": false
569
+ },
570
+ "hash": {
571
+ "name": "hash",
572
+ "type": "text",
573
+ "primaryKey": false,
574
+ "notNull": true
575
+ }
576
+ },
577
+ "indexes": {
578
+ "audit_entries_seq_idx": {
579
+ "name": "audit_entries_seq_idx",
580
+ "columns": [
581
+ {
582
+ "expression": "seq",
583
+ "isExpression": false,
584
+ "asc": true,
585
+ "nulls": "last"
586
+ }
587
+ ],
588
+ "isUnique": false,
589
+ "concurrently": false,
590
+ "method": "btree",
591
+ "with": {}
592
+ },
593
+ "audit_entries_space_at_idx": {
594
+ "name": "audit_entries_space_at_idx",
595
+ "columns": [
596
+ {
597
+ "expression": "space_id",
598
+ "isExpression": false,
599
+ "asc": true,
600
+ "nulls": "last"
601
+ },
602
+ {
603
+ "expression": "at",
604
+ "isExpression": false,
605
+ "asc": true,
606
+ "nulls": "last"
607
+ }
608
+ ],
609
+ "isUnique": false,
610
+ "concurrently": false,
611
+ "method": "btree",
612
+ "with": {}
613
+ },
614
+ "audit_entries_target_idx": {
615
+ "name": "audit_entries_target_idx",
616
+ "columns": [
617
+ {
618
+ "expression": "target_kind",
619
+ "isExpression": false,
620
+ "asc": true,
621
+ "nulls": "last"
622
+ },
623
+ {
624
+ "expression": "target_id",
625
+ "isExpression": false,
626
+ "asc": true,
627
+ "nulls": "last"
628
+ }
629
+ ],
630
+ "isUnique": false,
631
+ "concurrently": false,
632
+ "method": "btree",
633
+ "with": {}
634
+ },
635
+ "audit_entries_actor_idx": {
636
+ "name": "audit_entries_actor_idx",
637
+ "columns": [
638
+ {
639
+ "expression": "actor_kind",
640
+ "isExpression": false,
641
+ "asc": true,
642
+ "nulls": "last"
643
+ },
644
+ {
645
+ "expression": "actor_id",
646
+ "isExpression": false,
647
+ "asc": true,
648
+ "nulls": "last"
649
+ }
650
+ ],
651
+ "isUnique": false,
652
+ "concurrently": false,
653
+ "method": "btree",
654
+ "with": {}
655
+ },
656
+ "audit_entries_action_idx": {
657
+ "name": "audit_entries_action_idx",
658
+ "columns": [
659
+ {
660
+ "expression": "action",
661
+ "isExpression": false,
662
+ "asc": true,
663
+ "nulls": "last"
664
+ }
665
+ ],
666
+ "isUnique": false,
667
+ "concurrently": false,
668
+ "method": "btree",
669
+ "with": {}
670
+ }
671
+ },
672
+ "foreignKeys": {},
673
+ "compositePrimaryKeys": {},
674
+ "uniqueConstraints": {},
675
+ "policies": {},
676
+ "checkConstraints": {},
677
+ "isRLSEnabled": false
678
+ },
679
+ "public.accounts": {
680
+ "name": "accounts",
681
+ "schema": "",
682
+ "columns": {
683
+ "id": {
684
+ "name": "id",
685
+ "type": "uuid",
686
+ "primaryKey": true,
687
+ "notNull": true,
688
+ "default": "gen_random_uuid()"
689
+ },
690
+ "user_id": {
691
+ "name": "user_id",
692
+ "type": "uuid",
693
+ "primaryKey": false,
694
+ "notNull": true
695
+ },
696
+ "account_id": {
697
+ "name": "account_id",
698
+ "type": "text",
699
+ "primaryKey": false,
700
+ "notNull": true
701
+ },
702
+ "provider_id": {
703
+ "name": "provider_id",
704
+ "type": "text",
705
+ "primaryKey": false,
706
+ "notNull": true
707
+ },
708
+ "issuer": {
709
+ "name": "issuer",
710
+ "type": "text",
711
+ "primaryKey": false,
712
+ "notNull": true,
713
+ "default": "''"
714
+ },
715
+ "access_token": {
716
+ "name": "access_token",
717
+ "type": "text",
718
+ "primaryKey": false,
719
+ "notNull": false
720
+ },
721
+ "refresh_token": {
722
+ "name": "refresh_token",
723
+ "type": "text",
724
+ "primaryKey": false,
725
+ "notNull": false
726
+ },
727
+ "access_token_expires_at": {
728
+ "name": "access_token_expires_at",
729
+ "type": "timestamp with time zone",
730
+ "primaryKey": false,
731
+ "notNull": false
732
+ },
733
+ "refresh_token_expires_at": {
734
+ "name": "refresh_token_expires_at",
735
+ "type": "timestamp with time zone",
736
+ "primaryKey": false,
737
+ "notNull": false
738
+ },
739
+ "scope": {
740
+ "name": "scope",
741
+ "type": "text",
742
+ "primaryKey": false,
743
+ "notNull": false
744
+ },
745
+ "id_token": {
746
+ "name": "id_token",
747
+ "type": "text",
748
+ "primaryKey": false,
749
+ "notNull": false
750
+ },
751
+ "password": {
752
+ "name": "password",
753
+ "type": "text",
754
+ "primaryKey": false,
755
+ "notNull": false
756
+ },
757
+ "created_at": {
758
+ "name": "created_at",
759
+ "type": "timestamp with time zone",
760
+ "primaryKey": false,
761
+ "notNull": true,
762
+ "default": "now()"
763
+ },
764
+ "updated_at": {
765
+ "name": "updated_at",
766
+ "type": "timestamp with time zone",
767
+ "primaryKey": false,
768
+ "notNull": true,
769
+ "default": "now()"
770
+ }
771
+ },
772
+ "indexes": {
773
+ "accounts_provider_account_key": {
774
+ "name": "accounts_provider_account_key",
775
+ "columns": [
776
+ {
777
+ "expression": "provider_id",
778
+ "isExpression": false,
779
+ "asc": true,
780
+ "nulls": "last"
781
+ },
782
+ {
783
+ "expression": "account_id",
784
+ "isExpression": false,
785
+ "asc": true,
786
+ "nulls": "last"
787
+ }
788
+ ],
789
+ "isUnique": true,
790
+ "concurrently": false,
791
+ "method": "btree",
792
+ "with": {}
793
+ }
794
+ },
795
+ "foreignKeys": {
796
+ "accounts_user_id_users_id_fk": {
797
+ "name": "accounts_user_id_users_id_fk",
798
+ "tableFrom": "accounts",
799
+ "tableTo": "users",
800
+ "columnsFrom": [
801
+ "user_id"
802
+ ],
803
+ "columnsTo": [
804
+ "id"
805
+ ],
806
+ "onDelete": "cascade",
807
+ "onUpdate": "no action"
808
+ }
809
+ },
810
+ "compositePrimaryKeys": {},
811
+ "uniqueConstraints": {},
812
+ "policies": {},
813
+ "checkConstraints": {},
814
+ "isRLSEnabled": false
815
+ },
816
+ "public.apikeys": {
817
+ "name": "apikeys",
818
+ "schema": "",
819
+ "columns": {
820
+ "id": {
821
+ "name": "id",
822
+ "type": "uuid",
823
+ "primaryKey": true,
824
+ "notNull": true,
825
+ "default": "gen_random_uuid()"
826
+ },
827
+ "name": {
828
+ "name": "name",
829
+ "type": "text",
830
+ "primaryKey": false,
831
+ "notNull": false
832
+ },
833
+ "start": {
834
+ "name": "start",
835
+ "type": "text",
836
+ "primaryKey": false,
837
+ "notNull": false
838
+ },
839
+ "prefix": {
840
+ "name": "prefix",
841
+ "type": "text",
842
+ "primaryKey": false,
843
+ "notNull": false
844
+ },
845
+ "key": {
846
+ "name": "key",
847
+ "type": "text",
848
+ "primaryKey": false,
849
+ "notNull": true
850
+ },
851
+ "user_id": {
852
+ "name": "user_id",
853
+ "type": "uuid",
854
+ "primaryKey": false,
855
+ "notNull": true
856
+ },
857
+ "enabled": {
858
+ "name": "enabled",
859
+ "type": "boolean",
860
+ "primaryKey": false,
861
+ "notNull": true,
862
+ "default": true
863
+ },
864
+ "expires_at": {
865
+ "name": "expires_at",
866
+ "type": "timestamp with time zone",
867
+ "primaryKey": false,
868
+ "notNull": false
869
+ },
870
+ "last_request": {
871
+ "name": "last_request",
872
+ "type": "timestamp with time zone",
873
+ "primaryKey": false,
874
+ "notNull": false
875
+ },
876
+ "permissions": {
877
+ "name": "permissions",
878
+ "type": "jsonb",
879
+ "primaryKey": false,
880
+ "notNull": false
881
+ },
882
+ "space_ids": {
883
+ "name": "space_ids",
884
+ "type": "jsonb",
885
+ "primaryKey": false,
886
+ "notNull": false
887
+ },
888
+ "metadata": {
889
+ "name": "metadata",
890
+ "type": "text",
891
+ "primaryKey": false,
892
+ "notNull": false
893
+ },
894
+ "created_at": {
895
+ "name": "created_at",
896
+ "type": "timestamp with time zone",
897
+ "primaryKey": false,
898
+ "notNull": true,
899
+ "default": "now()"
900
+ },
901
+ "updated_at": {
902
+ "name": "updated_at",
903
+ "type": "timestamp with time zone",
904
+ "primaryKey": false,
905
+ "notNull": true,
906
+ "default": "now()"
907
+ }
908
+ },
909
+ "indexes": {
910
+ "apikeys_user_idx": {
911
+ "name": "apikeys_user_idx",
912
+ "columns": [
913
+ {
914
+ "expression": "user_id",
915
+ "isExpression": false,
916
+ "asc": true,
917
+ "nulls": "last"
918
+ }
919
+ ],
920
+ "isUnique": false,
921
+ "concurrently": false,
922
+ "method": "btree",
923
+ "with": {}
924
+ }
925
+ },
926
+ "foreignKeys": {
927
+ "apikeys_user_id_users_id_fk": {
928
+ "name": "apikeys_user_id_users_id_fk",
929
+ "tableFrom": "apikeys",
930
+ "tableTo": "users",
931
+ "columnsFrom": [
932
+ "user_id"
933
+ ],
934
+ "columnsTo": [
935
+ "id"
936
+ ],
937
+ "onDelete": "cascade",
938
+ "onUpdate": "no action"
939
+ }
940
+ },
941
+ "compositePrimaryKeys": {},
942
+ "uniqueConstraints": {},
943
+ "policies": {},
944
+ "checkConstraints": {},
945
+ "isRLSEnabled": false
946
+ },
947
+ "public.memberships": {
948
+ "name": "memberships",
949
+ "schema": "",
950
+ "columns": {
951
+ "user_id": {
952
+ "name": "user_id",
953
+ "type": "uuid",
954
+ "primaryKey": false,
955
+ "notNull": true
956
+ },
957
+ "space_id": {
958
+ "name": "space_id",
959
+ "type": "uuid",
960
+ "primaryKey": false,
961
+ "notNull": true
962
+ },
963
+ "role": {
964
+ "name": "role",
965
+ "type": "text",
966
+ "primaryKey": false,
967
+ "notNull": true,
968
+ "default": "'editor'"
969
+ },
970
+ "created_at": {
971
+ "name": "created_at",
972
+ "type": "timestamp with time zone",
973
+ "primaryKey": false,
974
+ "notNull": true,
975
+ "default": "now()"
976
+ }
977
+ },
978
+ "indexes": {
979
+ "memberships_space_idx": {
980
+ "name": "memberships_space_idx",
981
+ "columns": [
982
+ {
983
+ "expression": "space_id",
984
+ "isExpression": false,
985
+ "asc": true,
986
+ "nulls": "last"
987
+ }
988
+ ],
989
+ "isUnique": false,
990
+ "concurrently": false,
991
+ "method": "btree",
992
+ "with": {}
993
+ }
994
+ },
995
+ "foreignKeys": {
996
+ "memberships_user_id_users_id_fk": {
997
+ "name": "memberships_user_id_users_id_fk",
998
+ "tableFrom": "memberships",
999
+ "tableTo": "users",
1000
+ "columnsFrom": [
1001
+ "user_id"
1002
+ ],
1003
+ "columnsTo": [
1004
+ "id"
1005
+ ],
1006
+ "onDelete": "cascade",
1007
+ "onUpdate": "no action"
1008
+ },
1009
+ "memberships_space_id_spaces_id_fk": {
1010
+ "name": "memberships_space_id_spaces_id_fk",
1011
+ "tableFrom": "memberships",
1012
+ "tableTo": "spaces",
1013
+ "columnsFrom": [
1014
+ "space_id"
1015
+ ],
1016
+ "columnsTo": [
1017
+ "id"
1018
+ ],
1019
+ "onDelete": "cascade",
1020
+ "onUpdate": "no action"
1021
+ }
1022
+ },
1023
+ "compositePrimaryKeys": {
1024
+ "memberships_user_id_space_id_pk": {
1025
+ "name": "memberships_user_id_space_id_pk",
1026
+ "columns": [
1027
+ "user_id",
1028
+ "space_id"
1029
+ ]
1030
+ }
1031
+ },
1032
+ "uniqueConstraints": {},
1033
+ "policies": {},
1034
+ "checkConstraints": {},
1035
+ "isRLSEnabled": false
1036
+ },
1037
+ "public.roles": {
1038
+ "name": "roles",
1039
+ "schema": "",
1040
+ "columns": {
1041
+ "id": {
1042
+ "name": "id",
1043
+ "type": "uuid",
1044
+ "primaryKey": true,
1045
+ "notNull": true,
1046
+ "default": "gen_random_uuid()"
1047
+ },
1048
+ "space_id": {
1049
+ "name": "space_id",
1050
+ "type": "uuid",
1051
+ "primaryKey": false,
1052
+ "notNull": true
1053
+ },
1054
+ "name": {
1055
+ "name": "name",
1056
+ "type": "text",
1057
+ "primaryKey": false,
1058
+ "notNull": true
1059
+ },
1060
+ "machine_name": {
1061
+ "name": "machine_name",
1062
+ "type": "text",
1063
+ "primaryKey": false,
1064
+ "notNull": true
1065
+ },
1066
+ "description": {
1067
+ "name": "description",
1068
+ "type": "text",
1069
+ "primaryKey": false,
1070
+ "notNull": false
1071
+ },
1072
+ "permissions": {
1073
+ "name": "permissions",
1074
+ "type": "jsonb",
1075
+ "primaryKey": false,
1076
+ "notNull": true,
1077
+ "default": "'[]'::jsonb"
1078
+ },
1079
+ "created_at": {
1080
+ "name": "created_at",
1081
+ "type": "timestamp with time zone",
1082
+ "primaryKey": false,
1083
+ "notNull": true,
1084
+ "default": "now()"
1085
+ },
1086
+ "updated_at": {
1087
+ "name": "updated_at",
1088
+ "type": "timestamp with time zone",
1089
+ "primaryKey": false,
1090
+ "notNull": true,
1091
+ "default": "now()"
1092
+ }
1093
+ },
1094
+ "indexes": {
1095
+ "roles_space_machine_name_key": {
1096
+ "name": "roles_space_machine_name_key",
1097
+ "columns": [
1098
+ {
1099
+ "expression": "space_id",
1100
+ "isExpression": false,
1101
+ "asc": true,
1102
+ "nulls": "last"
1103
+ },
1104
+ {
1105
+ "expression": "machine_name",
1106
+ "isExpression": false,
1107
+ "asc": true,
1108
+ "nulls": "last"
1109
+ }
1110
+ ],
1111
+ "isUnique": true,
1112
+ "concurrently": false,
1113
+ "method": "btree",
1114
+ "with": {}
1115
+ }
1116
+ },
1117
+ "foreignKeys": {
1118
+ "roles_space_id_spaces_id_fk": {
1119
+ "name": "roles_space_id_spaces_id_fk",
1120
+ "tableFrom": "roles",
1121
+ "tableTo": "spaces",
1122
+ "columnsFrom": [
1123
+ "space_id"
1124
+ ],
1125
+ "columnsTo": [
1126
+ "id"
1127
+ ],
1128
+ "onDelete": "cascade",
1129
+ "onUpdate": "no action"
1130
+ }
1131
+ },
1132
+ "compositePrimaryKeys": {},
1133
+ "uniqueConstraints": {},
1134
+ "policies": {},
1135
+ "checkConstraints": {},
1136
+ "isRLSEnabled": false
1137
+ },
1138
+ "public.sessions": {
1139
+ "name": "sessions",
1140
+ "schema": "",
1141
+ "columns": {
1142
+ "id": {
1143
+ "name": "id",
1144
+ "type": "uuid",
1145
+ "primaryKey": true,
1146
+ "notNull": true,
1147
+ "default": "gen_random_uuid()"
1148
+ },
1149
+ "user_id": {
1150
+ "name": "user_id",
1151
+ "type": "uuid",
1152
+ "primaryKey": false,
1153
+ "notNull": true
1154
+ },
1155
+ "token": {
1156
+ "name": "token",
1157
+ "type": "text",
1158
+ "primaryKey": false,
1159
+ "notNull": true
1160
+ },
1161
+ "expires_at": {
1162
+ "name": "expires_at",
1163
+ "type": "timestamp with time zone",
1164
+ "primaryKey": false,
1165
+ "notNull": true
1166
+ },
1167
+ "ip_address": {
1168
+ "name": "ip_address",
1169
+ "type": "text",
1170
+ "primaryKey": false,
1171
+ "notNull": false
1172
+ },
1173
+ "user_agent": {
1174
+ "name": "user_agent",
1175
+ "type": "text",
1176
+ "primaryKey": false,
1177
+ "notNull": false
1178
+ },
1179
+ "created_at": {
1180
+ "name": "created_at",
1181
+ "type": "timestamp with time zone",
1182
+ "primaryKey": false,
1183
+ "notNull": true,
1184
+ "default": "now()"
1185
+ },
1186
+ "updated_at": {
1187
+ "name": "updated_at",
1188
+ "type": "timestamp with time zone",
1189
+ "primaryKey": false,
1190
+ "notNull": true,
1191
+ "default": "now()"
1192
+ }
1193
+ },
1194
+ "indexes": {
1195
+ "sessions_token_key": {
1196
+ "name": "sessions_token_key",
1197
+ "columns": [
1198
+ {
1199
+ "expression": "token",
1200
+ "isExpression": false,
1201
+ "asc": true,
1202
+ "nulls": "last"
1203
+ }
1204
+ ],
1205
+ "isUnique": true,
1206
+ "concurrently": false,
1207
+ "method": "btree",
1208
+ "with": {}
1209
+ },
1210
+ "sessions_user_idx": {
1211
+ "name": "sessions_user_idx",
1212
+ "columns": [
1213
+ {
1214
+ "expression": "user_id",
1215
+ "isExpression": false,
1216
+ "asc": true,
1217
+ "nulls": "last"
1218
+ }
1219
+ ],
1220
+ "isUnique": false,
1221
+ "concurrently": false,
1222
+ "method": "btree",
1223
+ "with": {}
1224
+ },
1225
+ "sessions_expires_idx": {
1226
+ "name": "sessions_expires_idx",
1227
+ "columns": [
1228
+ {
1229
+ "expression": "expires_at",
1230
+ "isExpression": false,
1231
+ "asc": true,
1232
+ "nulls": "last"
1233
+ }
1234
+ ],
1235
+ "isUnique": false,
1236
+ "concurrently": false,
1237
+ "method": "btree",
1238
+ "with": {}
1239
+ }
1240
+ },
1241
+ "foreignKeys": {
1242
+ "sessions_user_id_users_id_fk": {
1243
+ "name": "sessions_user_id_users_id_fk",
1244
+ "tableFrom": "sessions",
1245
+ "tableTo": "users",
1246
+ "columnsFrom": [
1247
+ "user_id"
1248
+ ],
1249
+ "columnsTo": [
1250
+ "id"
1251
+ ],
1252
+ "onDelete": "cascade",
1253
+ "onUpdate": "no action"
1254
+ }
1255
+ },
1256
+ "compositePrimaryKeys": {},
1257
+ "uniqueConstraints": {},
1258
+ "policies": {},
1259
+ "checkConstraints": {},
1260
+ "isRLSEnabled": false
1261
+ },
1262
+ "public.users": {
1263
+ "name": "users",
1264
+ "schema": "",
1265
+ "columns": {
1266
+ "id": {
1267
+ "name": "id",
1268
+ "type": "uuid",
1269
+ "primaryKey": true,
1270
+ "notNull": true,
1271
+ "default": "gen_random_uuid()"
1272
+ },
1273
+ "name": {
1274
+ "name": "name",
1275
+ "type": "text",
1276
+ "primaryKey": false,
1277
+ "notNull": true,
1278
+ "default": "''"
1279
+ },
1280
+ "email": {
1281
+ "name": "email",
1282
+ "type": "text",
1283
+ "primaryKey": false,
1284
+ "notNull": true
1285
+ },
1286
+ "email_verified": {
1287
+ "name": "email_verified",
1288
+ "type": "boolean",
1289
+ "primaryKey": false,
1290
+ "notNull": true,
1291
+ "default": false
1292
+ },
1293
+ "image": {
1294
+ "name": "image",
1295
+ "type": "text",
1296
+ "primaryKey": false,
1297
+ "notNull": false
1298
+ },
1299
+ "role": {
1300
+ "name": "role",
1301
+ "type": "text",
1302
+ "primaryKey": false,
1303
+ "notNull": true,
1304
+ "default": "'editor'"
1305
+ },
1306
+ "banned": {
1307
+ "name": "banned",
1308
+ "type": "boolean",
1309
+ "primaryKey": false,
1310
+ "notNull": true,
1311
+ "default": false
1312
+ },
1313
+ "ban_reason": {
1314
+ "name": "ban_reason",
1315
+ "type": "text",
1316
+ "primaryKey": false,
1317
+ "notNull": false
1318
+ },
1319
+ "notification_preferences": {
1320
+ "name": "notification_preferences",
1321
+ "type": "jsonb",
1322
+ "primaryKey": false,
1323
+ "notNull": true,
1324
+ "default": "'{}'::jsonb"
1325
+ },
1326
+ "created_at": {
1327
+ "name": "created_at",
1328
+ "type": "timestamp with time zone",
1329
+ "primaryKey": false,
1330
+ "notNull": true,
1331
+ "default": "now()"
1332
+ },
1333
+ "updated_at": {
1334
+ "name": "updated_at",
1335
+ "type": "timestamp with time zone",
1336
+ "primaryKey": false,
1337
+ "notNull": true,
1338
+ "default": "now()"
1339
+ }
1340
+ },
1341
+ "indexes": {
1342
+ "users_email_key": {
1343
+ "name": "users_email_key",
1344
+ "columns": [
1345
+ {
1346
+ "expression": "email",
1347
+ "isExpression": false,
1348
+ "asc": true,
1349
+ "nulls": "last"
1350
+ }
1351
+ ],
1352
+ "isUnique": true,
1353
+ "concurrently": false,
1354
+ "method": "btree",
1355
+ "with": {}
1356
+ }
1357
+ },
1358
+ "foreignKeys": {},
1359
+ "compositePrimaryKeys": {},
1360
+ "uniqueConstraints": {},
1361
+ "policies": {},
1362
+ "checkConstraints": {},
1363
+ "isRLSEnabled": false
1364
+ },
1365
+ "public.verifications": {
1366
+ "name": "verifications",
1367
+ "schema": "",
1368
+ "columns": {
1369
+ "id": {
1370
+ "name": "id",
1371
+ "type": "uuid",
1372
+ "primaryKey": true,
1373
+ "notNull": true,
1374
+ "default": "gen_random_uuid()"
1375
+ },
1376
+ "identifier": {
1377
+ "name": "identifier",
1378
+ "type": "text",
1379
+ "primaryKey": false,
1380
+ "notNull": true
1381
+ },
1382
+ "value": {
1383
+ "name": "value",
1384
+ "type": "text",
1385
+ "primaryKey": false,
1386
+ "notNull": true
1387
+ },
1388
+ "expires_at": {
1389
+ "name": "expires_at",
1390
+ "type": "timestamp with time zone",
1391
+ "primaryKey": false,
1392
+ "notNull": true
1393
+ },
1394
+ "created_at": {
1395
+ "name": "created_at",
1396
+ "type": "timestamp with time zone",
1397
+ "primaryKey": false,
1398
+ "notNull": true,
1399
+ "default": "now()"
1400
+ },
1401
+ "updated_at": {
1402
+ "name": "updated_at",
1403
+ "type": "timestamp with time zone",
1404
+ "primaryKey": false,
1405
+ "notNull": true,
1406
+ "default": "now()"
1407
+ }
1408
+ },
1409
+ "indexes": {
1410
+ "verifications_identifier_idx": {
1411
+ "name": "verifications_identifier_idx",
1412
+ "columns": [
1413
+ {
1414
+ "expression": "identifier",
1415
+ "isExpression": false,
1416
+ "asc": true,
1417
+ "nulls": "last"
1418
+ }
1419
+ ],
1420
+ "isUnique": false,
1421
+ "concurrently": false,
1422
+ "method": "btree",
1423
+ "with": {}
1424
+ }
1425
+ },
1426
+ "foreignKeys": {},
1427
+ "compositePrimaryKeys": {},
1428
+ "uniqueConstraints": {},
1429
+ "policies": {},
1430
+ "checkConstraints": {},
1431
+ "isRLSEnabled": false
1432
+ },
1433
+ "public.content_versions": {
1434
+ "name": "content_versions",
1435
+ "schema": "",
1436
+ "columns": {
1437
+ "id": {
1438
+ "name": "id",
1439
+ "type": "uuid",
1440
+ "primaryKey": true,
1441
+ "notNull": true,
1442
+ "default": "gen_random_uuid()"
1443
+ },
1444
+ "content_id": {
1445
+ "name": "content_id",
1446
+ "type": "uuid",
1447
+ "primaryKey": false,
1448
+ "notNull": true
1449
+ },
1450
+ "version": {
1451
+ "name": "version",
1452
+ "type": "integer",
1453
+ "primaryKey": false,
1454
+ "notNull": true
1455
+ },
1456
+ "label": {
1457
+ "name": "label",
1458
+ "type": "text",
1459
+ "primaryKey": false,
1460
+ "notNull": false
1461
+ },
1462
+ "snapshot": {
1463
+ "name": "snapshot",
1464
+ "type": "jsonb",
1465
+ "primaryKey": false,
1466
+ "notNull": true
1467
+ },
1468
+ "created_at": {
1469
+ "name": "created_at",
1470
+ "type": "timestamp with time zone",
1471
+ "primaryKey": false,
1472
+ "notNull": true,
1473
+ "default": "now()"
1474
+ },
1475
+ "created_by": {
1476
+ "name": "created_by",
1477
+ "type": "uuid",
1478
+ "primaryKey": false,
1479
+ "notNull": false
1480
+ }
1481
+ },
1482
+ "indexes": {
1483
+ "content_versions_content_version_key": {
1484
+ "name": "content_versions_content_version_key",
1485
+ "columns": [
1486
+ {
1487
+ "expression": "content_id",
1488
+ "isExpression": false,
1489
+ "asc": true,
1490
+ "nulls": "last"
1491
+ },
1492
+ {
1493
+ "expression": "version",
1494
+ "isExpression": false,
1495
+ "asc": true,
1496
+ "nulls": "last"
1497
+ }
1498
+ ],
1499
+ "isUnique": true,
1500
+ "concurrently": false,
1501
+ "method": "btree",
1502
+ "with": {}
1503
+ },
1504
+ "content_versions_content_idx": {
1505
+ "name": "content_versions_content_idx",
1506
+ "columns": [
1507
+ {
1508
+ "expression": "content_id",
1509
+ "isExpression": false,
1510
+ "asc": true,
1511
+ "nulls": "last"
1512
+ },
1513
+ {
1514
+ "expression": "created_at",
1515
+ "isExpression": false,
1516
+ "asc": true,
1517
+ "nulls": "last"
1518
+ }
1519
+ ],
1520
+ "isUnique": false,
1521
+ "concurrently": false,
1522
+ "method": "btree",
1523
+ "with": {}
1524
+ }
1525
+ },
1526
+ "foreignKeys": {},
1527
+ "compositePrimaryKeys": {},
1528
+ "uniqueConstraints": {},
1529
+ "policies": {},
1530
+ "checkConstraints": {},
1531
+ "isRLSEnabled": false
1532
+ },
1533
+ "public.contents": {
1534
+ "name": "contents",
1535
+ "schema": "",
1536
+ "columns": {
1537
+ "id": {
1538
+ "name": "id",
1539
+ "type": "uuid",
1540
+ "primaryKey": true,
1541
+ "notNull": true,
1542
+ "default": "gen_random_uuid()"
1543
+ },
1544
+ "space_id": {
1545
+ "name": "space_id",
1546
+ "type": "uuid",
1547
+ "primaryKey": false,
1548
+ "notNull": true
1549
+ },
1550
+ "type_id": {
1551
+ "name": "type_id",
1552
+ "type": "uuid",
1553
+ "primaryKey": false,
1554
+ "notNull": true
1555
+ },
1556
+ "locale": {
1557
+ "name": "locale",
1558
+ "type": "text",
1559
+ "primaryKey": false,
1560
+ "notNull": true
1561
+ },
1562
+ "localization_id": {
1563
+ "name": "localization_id",
1564
+ "type": "uuid",
1565
+ "primaryKey": false,
1566
+ "notNull": true
1567
+ },
1568
+ "parent_id": {
1569
+ "name": "parent_id",
1570
+ "type": "uuid",
1571
+ "primaryKey": false,
1572
+ "notNull": false
1573
+ },
1574
+ "title": {
1575
+ "name": "title",
1576
+ "type": "text",
1577
+ "primaryKey": false,
1578
+ "notNull": true
1579
+ },
1580
+ "slug": {
1581
+ "name": "slug",
1582
+ "type": "text",
1583
+ "primaryKey": false,
1584
+ "notNull": true
1585
+ },
1586
+ "path": {
1587
+ "name": "path",
1588
+ "type": "ltree",
1589
+ "primaryKey": false,
1590
+ "notNull": true
1591
+ },
1592
+ "permalink": {
1593
+ "name": "permalink",
1594
+ "type": "text",
1595
+ "primaryKey": false,
1596
+ "notNull": false
1597
+ },
1598
+ "permalink_path": {
1599
+ "name": "permalink_path",
1600
+ "type": "text",
1601
+ "primaryKey": false,
1602
+ "notNull": true,
1603
+ "default": "''"
1604
+ },
1605
+ "permalink_segment": {
1606
+ "name": "permalink_segment",
1607
+ "type": "text",
1608
+ "primaryKey": false,
1609
+ "notNull": false
1610
+ },
1611
+ "status": {
1612
+ "name": "status",
1613
+ "type": "text",
1614
+ "primaryKey": false,
1615
+ "notNull": true,
1616
+ "default": "'draft'"
1617
+ },
1618
+ "position": {
1619
+ "name": "position",
1620
+ "type": "integer",
1621
+ "primaryKey": false,
1622
+ "notNull": true,
1623
+ "default": 0
1624
+ },
1625
+ "fields": {
1626
+ "name": "fields",
1627
+ "type": "jsonb",
1628
+ "primaryKey": false,
1629
+ "notNull": true,
1630
+ "default": "'{}'::jsonb"
1631
+ },
1632
+ "search_text": {
1633
+ "name": "search_text",
1634
+ "type": "text",
1635
+ "primaryKey": false,
1636
+ "notNull": true,
1637
+ "default": "''"
1638
+ },
1639
+ "version": {
1640
+ "name": "version",
1641
+ "type": "integer",
1642
+ "primaryKey": false,
1643
+ "notNull": true,
1644
+ "default": 1
1645
+ },
1646
+ "created_at": {
1647
+ "name": "created_at",
1648
+ "type": "timestamp with time zone",
1649
+ "primaryKey": false,
1650
+ "notNull": true,
1651
+ "default": "now()"
1652
+ },
1653
+ "updated_at": {
1654
+ "name": "updated_at",
1655
+ "type": "timestamp with time zone",
1656
+ "primaryKey": false,
1657
+ "notNull": true,
1658
+ "default": "now()"
1659
+ },
1660
+ "created_by": {
1661
+ "name": "created_by",
1662
+ "type": "uuid",
1663
+ "primaryKey": false,
1664
+ "notNull": false
1665
+ },
1666
+ "updated_by": {
1667
+ "name": "updated_by",
1668
+ "type": "uuid",
1669
+ "primaryKey": false,
1670
+ "notNull": false
1671
+ },
1672
+ "published_at": {
1673
+ "name": "published_at",
1674
+ "type": "timestamp with time zone",
1675
+ "primaryKey": false,
1676
+ "notNull": false
1677
+ },
1678
+ "search": {
1679
+ "name": "search",
1680
+ "type": "tsvector",
1681
+ "primaryKey": false,
1682
+ "notNull": false,
1683
+ "generated": {
1684
+ "as": "to_tsvector('simple', coalesce(title, '') || ' ' || coalesce(search_text, ''))",
1685
+ "type": "stored"
1686
+ }
1687
+ }
1688
+ },
1689
+ "indexes": {
1690
+ "contents_path_gist_idx": {
1691
+ "name": "contents_path_gist_idx",
1692
+ "columns": [
1693
+ {
1694
+ "expression": "path",
1695
+ "isExpression": false,
1696
+ "asc": true,
1697
+ "nulls": "last"
1698
+ }
1699
+ ],
1700
+ "isUnique": false,
1701
+ "concurrently": false,
1702
+ "method": "gist",
1703
+ "with": {}
1704
+ },
1705
+ "contents_parent_idx": {
1706
+ "name": "contents_parent_idx",
1707
+ "columns": [
1708
+ {
1709
+ "expression": "parent_id",
1710
+ "isExpression": false,
1711
+ "asc": true,
1712
+ "nulls": "last"
1713
+ }
1714
+ ],
1715
+ "isUnique": false,
1716
+ "concurrently": false,
1717
+ "method": "btree",
1718
+ "with": {}
1719
+ },
1720
+ "contents_space_type_idx": {
1721
+ "name": "contents_space_type_idx",
1722
+ "columns": [
1723
+ {
1724
+ "expression": "space_id",
1725
+ "isExpression": false,
1726
+ "asc": true,
1727
+ "nulls": "last"
1728
+ },
1729
+ {
1730
+ "expression": "type_id",
1731
+ "isExpression": false,
1732
+ "asc": true,
1733
+ "nulls": "last"
1734
+ }
1735
+ ],
1736
+ "isUnique": false,
1737
+ "concurrently": false,
1738
+ "method": "btree",
1739
+ "with": {}
1740
+ },
1741
+ "contents_localization_idx": {
1742
+ "name": "contents_localization_idx",
1743
+ "columns": [
1744
+ {
1745
+ "expression": "localization_id",
1746
+ "isExpression": false,
1747
+ "asc": true,
1748
+ "nulls": "last"
1749
+ }
1750
+ ],
1751
+ "isUnique": false,
1752
+ "concurrently": false,
1753
+ "method": "btree",
1754
+ "with": {}
1755
+ },
1756
+ "contents_status_idx": {
1757
+ "name": "contents_status_idx",
1758
+ "columns": [
1759
+ {
1760
+ "expression": "space_id",
1761
+ "isExpression": false,
1762
+ "asc": true,
1763
+ "nulls": "last"
1764
+ },
1765
+ {
1766
+ "expression": "status",
1767
+ "isExpression": false,
1768
+ "asc": true,
1769
+ "nulls": "last"
1770
+ }
1771
+ ],
1772
+ "isUnique": false,
1773
+ "concurrently": false,
1774
+ "method": "btree",
1775
+ "with": {}
1776
+ },
1777
+ "contents_fields_gin_idx": {
1778
+ "name": "contents_fields_gin_idx",
1779
+ "columns": [
1780
+ {
1781
+ "expression": "\"fields\" jsonb_path_ops",
1782
+ "asc": true,
1783
+ "isExpression": true,
1784
+ "nulls": "last"
1785
+ }
1786
+ ],
1787
+ "isUnique": false,
1788
+ "concurrently": false,
1789
+ "method": "gin",
1790
+ "with": {}
1791
+ },
1792
+ "contents_search_gin_idx": {
1793
+ "name": "contents_search_gin_idx",
1794
+ "columns": [
1795
+ {
1796
+ "expression": "search",
1797
+ "isExpression": false,
1798
+ "asc": true,
1799
+ "nulls": "last"
1800
+ }
1801
+ ],
1802
+ "isUnique": false,
1803
+ "concurrently": false,
1804
+ "method": "gin",
1805
+ "with": {}
1806
+ },
1807
+ "contents_permalink_key": {
1808
+ "name": "contents_permalink_key",
1809
+ "columns": [
1810
+ {
1811
+ "expression": "space_id",
1812
+ "isExpression": false,
1813
+ "asc": true,
1814
+ "nulls": "last"
1815
+ },
1816
+ {
1817
+ "expression": "locale",
1818
+ "isExpression": false,
1819
+ "asc": true,
1820
+ "nulls": "last"
1821
+ },
1822
+ {
1823
+ "expression": "permalink",
1824
+ "isExpression": false,
1825
+ "asc": true,
1826
+ "nulls": "last"
1827
+ }
1828
+ ],
1829
+ "isUnique": true,
1830
+ "where": "permalink is not null",
1831
+ "concurrently": false,
1832
+ "method": "btree",
1833
+ "with": {}
1834
+ }
1835
+ },
1836
+ "foreignKeys": {
1837
+ "contents_space_id_spaces_id_fk": {
1838
+ "name": "contents_space_id_spaces_id_fk",
1839
+ "tableFrom": "contents",
1840
+ "tableTo": "spaces",
1841
+ "columnsFrom": [
1842
+ "space_id"
1843
+ ],
1844
+ "columnsTo": [
1845
+ "id"
1846
+ ],
1847
+ "onDelete": "cascade",
1848
+ "onUpdate": "no action"
1849
+ }
1850
+ },
1851
+ "compositePrimaryKeys": {},
1852
+ "uniqueConstraints": {
1853
+ "contents_sibling_slug_key": {
1854
+ "name": "contents_sibling_slug_key",
1855
+ "nullsNotDistinct": true,
1856
+ "columns": [
1857
+ "space_id",
1858
+ "parent_id",
1859
+ "locale",
1860
+ "slug"
1861
+ ]
1862
+ }
1863
+ },
1864
+ "policies": {},
1865
+ "checkConstraints": {},
1866
+ "isRLSEnabled": false
1867
+ },
1868
+ "public.published_contents": {
1869
+ "name": "published_contents",
1870
+ "schema": "",
1871
+ "columns": {
1872
+ "id": {
1873
+ "name": "id",
1874
+ "type": "uuid",
1875
+ "primaryKey": true,
1876
+ "notNull": true,
1877
+ "default": "gen_random_uuid()"
1878
+ },
1879
+ "space_id": {
1880
+ "name": "space_id",
1881
+ "type": "uuid",
1882
+ "primaryKey": false,
1883
+ "notNull": true
1884
+ },
1885
+ "type_id": {
1886
+ "name": "type_id",
1887
+ "type": "uuid",
1888
+ "primaryKey": false,
1889
+ "notNull": true
1890
+ },
1891
+ "locale": {
1892
+ "name": "locale",
1893
+ "type": "text",
1894
+ "primaryKey": false,
1895
+ "notNull": true
1896
+ },
1897
+ "localization_id": {
1898
+ "name": "localization_id",
1899
+ "type": "uuid",
1900
+ "primaryKey": false,
1901
+ "notNull": true
1902
+ },
1903
+ "parent_id": {
1904
+ "name": "parent_id",
1905
+ "type": "uuid",
1906
+ "primaryKey": false,
1907
+ "notNull": false
1908
+ },
1909
+ "title": {
1910
+ "name": "title",
1911
+ "type": "text",
1912
+ "primaryKey": false,
1913
+ "notNull": true
1914
+ },
1915
+ "slug": {
1916
+ "name": "slug",
1917
+ "type": "text",
1918
+ "primaryKey": false,
1919
+ "notNull": true
1920
+ },
1921
+ "path": {
1922
+ "name": "path",
1923
+ "type": "ltree",
1924
+ "primaryKey": false,
1925
+ "notNull": true
1926
+ },
1927
+ "permalink": {
1928
+ "name": "permalink",
1929
+ "type": "text",
1930
+ "primaryKey": false,
1931
+ "notNull": false
1932
+ },
1933
+ "permalink_path": {
1934
+ "name": "permalink_path",
1935
+ "type": "text",
1936
+ "primaryKey": false,
1937
+ "notNull": true,
1938
+ "default": "''"
1939
+ },
1940
+ "permalink_segment": {
1941
+ "name": "permalink_segment",
1942
+ "type": "text",
1943
+ "primaryKey": false,
1944
+ "notNull": false
1945
+ },
1946
+ "status": {
1947
+ "name": "status",
1948
+ "type": "text",
1949
+ "primaryKey": false,
1950
+ "notNull": true,
1951
+ "default": "'draft'"
1952
+ },
1953
+ "position": {
1954
+ "name": "position",
1955
+ "type": "integer",
1956
+ "primaryKey": false,
1957
+ "notNull": true,
1958
+ "default": 0
1959
+ },
1960
+ "fields": {
1961
+ "name": "fields",
1962
+ "type": "jsonb",
1963
+ "primaryKey": false,
1964
+ "notNull": true,
1965
+ "default": "'{}'::jsonb"
1966
+ },
1967
+ "search_text": {
1968
+ "name": "search_text",
1969
+ "type": "text",
1970
+ "primaryKey": false,
1971
+ "notNull": true,
1972
+ "default": "''"
1973
+ },
1974
+ "version": {
1975
+ "name": "version",
1976
+ "type": "integer",
1977
+ "primaryKey": false,
1978
+ "notNull": true,
1979
+ "default": 1
1980
+ },
1981
+ "created_at": {
1982
+ "name": "created_at",
1983
+ "type": "timestamp with time zone",
1984
+ "primaryKey": false,
1985
+ "notNull": true,
1986
+ "default": "now()"
1987
+ },
1988
+ "updated_at": {
1989
+ "name": "updated_at",
1990
+ "type": "timestamp with time zone",
1991
+ "primaryKey": false,
1992
+ "notNull": true,
1993
+ "default": "now()"
1994
+ },
1995
+ "created_by": {
1996
+ "name": "created_by",
1997
+ "type": "uuid",
1998
+ "primaryKey": false,
1999
+ "notNull": false
2000
+ },
2001
+ "updated_by": {
2002
+ "name": "updated_by",
2003
+ "type": "uuid",
2004
+ "primaryKey": false,
2005
+ "notNull": false
2006
+ },
2007
+ "published_at": {
2008
+ "name": "published_at",
2009
+ "type": "timestamp with time zone",
2010
+ "primaryKey": false,
2011
+ "notNull": false
2012
+ },
2013
+ "source_version": {
2014
+ "name": "source_version",
2015
+ "type": "integer",
2016
+ "primaryKey": false,
2017
+ "notNull": true,
2018
+ "default": 1
2019
+ },
2020
+ "search": {
2021
+ "name": "search",
2022
+ "type": "tsvector",
2023
+ "primaryKey": false,
2024
+ "notNull": false,
2025
+ "generated": {
2026
+ "as": "to_tsvector('simple', coalesce(title, '') || ' ' || coalesce(search_text, ''))",
2027
+ "type": "stored"
2028
+ }
2029
+ }
2030
+ },
2031
+ "indexes": {
2032
+ "published_contents_path_gist_idx": {
2033
+ "name": "published_contents_path_gist_idx",
2034
+ "columns": [
2035
+ {
2036
+ "expression": "path",
2037
+ "isExpression": false,
2038
+ "asc": true,
2039
+ "nulls": "last"
2040
+ }
2041
+ ],
2042
+ "isUnique": false,
2043
+ "concurrently": false,
2044
+ "method": "gist",
2045
+ "with": {}
2046
+ },
2047
+ "published_contents_parent_idx": {
2048
+ "name": "published_contents_parent_idx",
2049
+ "columns": [
2050
+ {
2051
+ "expression": "parent_id",
2052
+ "isExpression": false,
2053
+ "asc": true,
2054
+ "nulls": "last"
2055
+ }
2056
+ ],
2057
+ "isUnique": false,
2058
+ "concurrently": false,
2059
+ "method": "btree",
2060
+ "with": {}
2061
+ },
2062
+ "published_contents_space_type_idx": {
2063
+ "name": "published_contents_space_type_idx",
2064
+ "columns": [
2065
+ {
2066
+ "expression": "space_id",
2067
+ "isExpression": false,
2068
+ "asc": true,
2069
+ "nulls": "last"
2070
+ },
2071
+ {
2072
+ "expression": "type_id",
2073
+ "isExpression": false,
2074
+ "asc": true,
2075
+ "nulls": "last"
2076
+ }
2077
+ ],
2078
+ "isUnique": false,
2079
+ "concurrently": false,
2080
+ "method": "btree",
2081
+ "with": {}
2082
+ },
2083
+ "published_contents_fields_gin_idx": {
2084
+ "name": "published_contents_fields_gin_idx",
2085
+ "columns": [
2086
+ {
2087
+ "expression": "\"fields\" jsonb_path_ops",
2088
+ "asc": true,
2089
+ "isExpression": true,
2090
+ "nulls": "last"
2091
+ }
2092
+ ],
2093
+ "isUnique": false,
2094
+ "concurrently": false,
2095
+ "method": "gin",
2096
+ "with": {}
2097
+ },
2098
+ "published_contents_search_gin_idx": {
2099
+ "name": "published_contents_search_gin_idx",
2100
+ "columns": [
2101
+ {
2102
+ "expression": "search",
2103
+ "isExpression": false,
2104
+ "asc": true,
2105
+ "nulls": "last"
2106
+ }
2107
+ ],
2108
+ "isUnique": false,
2109
+ "concurrently": false,
2110
+ "method": "gin",
2111
+ "with": {}
2112
+ },
2113
+ "published_contents_permalink_key": {
2114
+ "name": "published_contents_permalink_key",
2115
+ "columns": [
2116
+ {
2117
+ "expression": "space_id",
2118
+ "isExpression": false,
2119
+ "asc": true,
2120
+ "nulls": "last"
2121
+ },
2122
+ {
2123
+ "expression": "locale",
2124
+ "isExpression": false,
2125
+ "asc": true,
2126
+ "nulls": "last"
2127
+ },
2128
+ {
2129
+ "expression": "permalink",
2130
+ "isExpression": false,
2131
+ "asc": true,
2132
+ "nulls": "last"
2133
+ }
2134
+ ],
2135
+ "isUnique": true,
2136
+ "where": "permalink is not null",
2137
+ "concurrently": false,
2138
+ "method": "btree",
2139
+ "with": {}
2140
+ }
2141
+ },
2142
+ "foreignKeys": {
2143
+ "published_contents_space_id_spaces_id_fk": {
2144
+ "name": "published_contents_space_id_spaces_id_fk",
2145
+ "tableFrom": "published_contents",
2146
+ "tableTo": "spaces",
2147
+ "columnsFrom": [
2148
+ "space_id"
2149
+ ],
2150
+ "columnsTo": [
2151
+ "id"
2152
+ ],
2153
+ "onDelete": "cascade",
2154
+ "onUpdate": "no action"
2155
+ }
2156
+ },
2157
+ "compositePrimaryKeys": {},
2158
+ "uniqueConstraints": {},
2159
+ "policies": {},
2160
+ "checkConstraints": {},
2161
+ "isRLSEnabled": false
2162
+ },
2163
+ "public.content_types": {
2164
+ "name": "content_types",
2165
+ "schema": "",
2166
+ "columns": {
2167
+ "id": {
2168
+ "name": "id",
2169
+ "type": "uuid",
2170
+ "primaryKey": true,
2171
+ "notNull": true,
2172
+ "default": "gen_random_uuid()"
2173
+ },
2174
+ "space_id": {
2175
+ "name": "space_id",
2176
+ "type": "uuid",
2177
+ "primaryKey": false,
2178
+ "notNull": false
2179
+ },
2180
+ "name": {
2181
+ "name": "name",
2182
+ "type": "text",
2183
+ "primaryKey": false,
2184
+ "notNull": true
2185
+ },
2186
+ "label": {
2187
+ "name": "label",
2188
+ "type": "text",
2189
+ "primaryKey": false,
2190
+ "notNull": true
2191
+ },
2192
+ "description": {
2193
+ "name": "description",
2194
+ "type": "text",
2195
+ "primaryKey": false,
2196
+ "notNull": false
2197
+ },
2198
+ "icon": {
2199
+ "name": "icon",
2200
+ "type": "text",
2201
+ "primaryKey": false,
2202
+ "notNull": false
2203
+ },
2204
+ "kind": {
2205
+ "name": "kind",
2206
+ "type": "text",
2207
+ "primaryKey": false,
2208
+ "notNull": true,
2209
+ "default": "'content'"
2210
+ },
2211
+ "has_slug": {
2212
+ "name": "has_slug",
2213
+ "type": "boolean",
2214
+ "primaryKey": false,
2215
+ "notNull": true,
2216
+ "default": true
2217
+ },
2218
+ "is_publishable": {
2219
+ "name": "is_publishable",
2220
+ "type": "boolean",
2221
+ "primaryKey": false,
2222
+ "notNull": true,
2223
+ "default": true
2224
+ },
2225
+ "is_visible_in_tree": {
2226
+ "name": "is_visible_in_tree",
2227
+ "type": "boolean",
2228
+ "primaryKey": false,
2229
+ "notNull": true,
2230
+ "default": true
2231
+ },
2232
+ "can_be_visible_in_menu": {
2233
+ "name": "can_be_visible_in_menu",
2234
+ "type": "boolean",
2235
+ "primaryKey": false,
2236
+ "notNull": true,
2237
+ "default": true
2238
+ },
2239
+ "requires_approval": {
2240
+ "name": "requires_approval",
2241
+ "type": "boolean",
2242
+ "primaryKey": false,
2243
+ "notNull": true,
2244
+ "default": false
2245
+ },
2246
+ "fields": {
2247
+ "name": "fields",
2248
+ "type": "jsonb",
2249
+ "primaryKey": false,
2250
+ "notNull": true,
2251
+ "default": "'[]'::jsonb"
2252
+ },
2253
+ "created_at": {
2254
+ "name": "created_at",
2255
+ "type": "timestamp with time zone",
2256
+ "primaryKey": false,
2257
+ "notNull": true,
2258
+ "default": "now()"
2259
+ },
2260
+ "updated_at": {
2261
+ "name": "updated_at",
2262
+ "type": "timestamp with time zone",
2263
+ "primaryKey": false,
2264
+ "notNull": true,
2265
+ "default": "now()"
2266
+ }
2267
+ },
2268
+ "indexes": {
2269
+ "content_types_space_idx": {
2270
+ "name": "content_types_space_idx",
2271
+ "columns": [
2272
+ {
2273
+ "expression": "space_id",
2274
+ "isExpression": false,
2275
+ "asc": true,
2276
+ "nulls": "last"
2277
+ }
2278
+ ],
2279
+ "isUnique": false,
2280
+ "concurrently": false,
2281
+ "method": "btree",
2282
+ "with": {}
2283
+ }
2284
+ },
2285
+ "foreignKeys": {
2286
+ "content_types_space_id_spaces_id_fk": {
2287
+ "name": "content_types_space_id_spaces_id_fk",
2288
+ "tableFrom": "content_types",
2289
+ "tableTo": "spaces",
2290
+ "columnsFrom": [
2291
+ "space_id"
2292
+ ],
2293
+ "columnsTo": [
2294
+ "id"
2295
+ ],
2296
+ "onDelete": "cascade",
2297
+ "onUpdate": "no action"
2298
+ }
2299
+ },
2300
+ "compositePrimaryKeys": {},
2301
+ "uniqueConstraints": {
2302
+ "content_types_space_name_key": {
2303
+ "name": "content_types_space_name_key",
2304
+ "nullsNotDistinct": true,
2305
+ "columns": [
2306
+ "space_id",
2307
+ "name"
2308
+ ]
2309
+ }
2310
+ },
2311
+ "policies": {},
2312
+ "checkConstraints": {},
2313
+ "isRLSEnabled": false
2314
+ },
2315
+ "public.menu_items": {
2316
+ "name": "menu_items",
2317
+ "schema": "",
2318
+ "columns": {
2319
+ "id": {
2320
+ "name": "id",
2321
+ "type": "uuid",
2322
+ "primaryKey": true,
2323
+ "notNull": true,
2324
+ "default": "gen_random_uuid()"
2325
+ },
2326
+ "menu_id": {
2327
+ "name": "menu_id",
2328
+ "type": "uuid",
2329
+ "primaryKey": false,
2330
+ "notNull": true
2331
+ },
2332
+ "parent_id": {
2333
+ "name": "parent_id",
2334
+ "type": "uuid",
2335
+ "primaryKey": false,
2336
+ "notNull": false
2337
+ },
2338
+ "position": {
2339
+ "name": "position",
2340
+ "type": "integer",
2341
+ "primaryKey": false,
2342
+ "notNull": true,
2343
+ "default": 0
2344
+ },
2345
+ "localization_id": {
2346
+ "name": "localization_id",
2347
+ "type": "uuid",
2348
+ "primaryKey": false,
2349
+ "notNull": false
2350
+ },
2351
+ "label": {
2352
+ "name": "label",
2353
+ "type": "text",
2354
+ "primaryKey": false,
2355
+ "notNull": false
2356
+ },
2357
+ "url": {
2358
+ "name": "url",
2359
+ "type": "text",
2360
+ "primaryKey": false,
2361
+ "notNull": false
2362
+ }
2363
+ },
2364
+ "indexes": {
2365
+ "menu_items_menu_idx": {
2366
+ "name": "menu_items_menu_idx",
2367
+ "columns": [
2368
+ {
2369
+ "expression": "menu_id",
2370
+ "isExpression": false,
2371
+ "asc": true,
2372
+ "nulls": "last"
2373
+ },
2374
+ {
2375
+ "expression": "parent_id",
2376
+ "isExpression": false,
2377
+ "asc": true,
2378
+ "nulls": "last"
2379
+ },
2380
+ {
2381
+ "expression": "position",
2382
+ "isExpression": false,
2383
+ "asc": true,
2384
+ "nulls": "last"
2385
+ }
2386
+ ],
2387
+ "isUnique": false,
2388
+ "concurrently": false,
2389
+ "method": "btree",
2390
+ "with": {}
2391
+ },
2392
+ "menu_items_localization_idx": {
2393
+ "name": "menu_items_localization_idx",
2394
+ "columns": [
2395
+ {
2396
+ "expression": "localization_id",
2397
+ "isExpression": false,
2398
+ "asc": true,
2399
+ "nulls": "last"
2400
+ }
2401
+ ],
2402
+ "isUnique": false,
2403
+ "concurrently": false,
2404
+ "method": "btree",
2405
+ "with": {}
2406
+ }
2407
+ },
2408
+ "foreignKeys": {
2409
+ "menu_items_menu_id_menus_id_fk": {
2410
+ "name": "menu_items_menu_id_menus_id_fk",
2411
+ "tableFrom": "menu_items",
2412
+ "tableTo": "menus",
2413
+ "columnsFrom": [
2414
+ "menu_id"
2415
+ ],
2416
+ "columnsTo": [
2417
+ "id"
2418
+ ],
2419
+ "onDelete": "cascade",
2420
+ "onUpdate": "no action"
2421
+ },
2422
+ "menu_items_parent_id_menu_items_id_fk": {
2423
+ "name": "menu_items_parent_id_menu_items_id_fk",
2424
+ "tableFrom": "menu_items",
2425
+ "tableTo": "menu_items",
2426
+ "columnsFrom": [
2427
+ "parent_id"
2428
+ ],
2429
+ "columnsTo": [
2430
+ "id"
2431
+ ],
2432
+ "onDelete": "cascade",
2433
+ "onUpdate": "no action"
2434
+ }
2435
+ },
2436
+ "compositePrimaryKeys": {},
2437
+ "uniqueConstraints": {},
2438
+ "policies": {},
2439
+ "checkConstraints": {},
2440
+ "isRLSEnabled": false
2441
+ },
2442
+ "public.menus": {
2443
+ "name": "menus",
2444
+ "schema": "",
2445
+ "columns": {
2446
+ "id": {
2447
+ "name": "id",
2448
+ "type": "uuid",
2449
+ "primaryKey": true,
2450
+ "notNull": true,
2451
+ "default": "gen_random_uuid()"
2452
+ },
2453
+ "space_id": {
2454
+ "name": "space_id",
2455
+ "type": "uuid",
2456
+ "primaryKey": false,
2457
+ "notNull": true
2458
+ },
2459
+ "name": {
2460
+ "name": "name",
2461
+ "type": "text",
2462
+ "primaryKey": false,
2463
+ "notNull": true
2464
+ },
2465
+ "machine_name": {
2466
+ "name": "machine_name",
2467
+ "type": "text",
2468
+ "primaryKey": false,
2469
+ "notNull": true
2470
+ },
2471
+ "description": {
2472
+ "name": "description",
2473
+ "type": "text",
2474
+ "primaryKey": false,
2475
+ "notNull": false
2476
+ },
2477
+ "created_at": {
2478
+ "name": "created_at",
2479
+ "type": "timestamp with time zone",
2480
+ "primaryKey": false,
2481
+ "notNull": true,
2482
+ "default": "now()"
2483
+ },
2484
+ "updated_at": {
2485
+ "name": "updated_at",
2486
+ "type": "timestamp with time zone",
2487
+ "primaryKey": false,
2488
+ "notNull": true,
2489
+ "default": "now()"
2490
+ }
2491
+ },
2492
+ "indexes": {},
2493
+ "foreignKeys": {
2494
+ "menus_space_id_spaces_id_fk": {
2495
+ "name": "menus_space_id_spaces_id_fk",
2496
+ "tableFrom": "menus",
2497
+ "tableTo": "spaces",
2498
+ "columnsFrom": [
2499
+ "space_id"
2500
+ ],
2501
+ "columnsTo": [
2502
+ "id"
2503
+ ],
2504
+ "onDelete": "cascade",
2505
+ "onUpdate": "no action"
2506
+ }
2507
+ },
2508
+ "compositePrimaryKeys": {},
2509
+ "uniqueConstraints": {
2510
+ "menus_space_machine_name_key": {
2511
+ "name": "menus_space_machine_name_key",
2512
+ "nullsNotDistinct": false,
2513
+ "columns": [
2514
+ "space_id",
2515
+ "machine_name"
2516
+ ]
2517
+ }
2518
+ },
2519
+ "policies": {},
2520
+ "checkConstraints": {},
2521
+ "isRLSEnabled": false
2522
+ },
2523
+ "public.content_approvals": {
2524
+ "name": "content_approvals",
2525
+ "schema": "",
2526
+ "columns": {
2527
+ "id": {
2528
+ "name": "id",
2529
+ "type": "uuid",
2530
+ "primaryKey": true,
2531
+ "notNull": true,
2532
+ "default": "gen_random_uuid()"
2533
+ },
2534
+ "space_id": {
2535
+ "name": "space_id",
2536
+ "type": "uuid",
2537
+ "primaryKey": false,
2538
+ "notNull": true
2539
+ },
2540
+ "content_id": {
2541
+ "name": "content_id",
2542
+ "type": "uuid",
2543
+ "primaryKey": false,
2544
+ "notNull": true
2545
+ },
2546
+ "type_id": {
2547
+ "name": "type_id",
2548
+ "type": "uuid",
2549
+ "primaryKey": false,
2550
+ "notNull": true
2551
+ },
2552
+ "status": {
2553
+ "name": "status",
2554
+ "type": "text",
2555
+ "primaryKey": false,
2556
+ "notNull": true,
2557
+ "default": "'pending'"
2558
+ },
2559
+ "requested_by": {
2560
+ "name": "requested_by",
2561
+ "type": "uuid",
2562
+ "primaryKey": false,
2563
+ "notNull": false
2564
+ },
2565
+ "requested_by_label": {
2566
+ "name": "requested_by_label",
2567
+ "type": "text",
2568
+ "primaryKey": false,
2569
+ "notNull": true,
2570
+ "default": "''"
2571
+ },
2572
+ "request_note": {
2573
+ "name": "request_note",
2574
+ "type": "text",
2575
+ "primaryKey": false,
2576
+ "notNull": false
2577
+ },
2578
+ "content_version": {
2579
+ "name": "content_version",
2580
+ "type": "integer",
2581
+ "primaryKey": false,
2582
+ "notNull": false
2583
+ },
2584
+ "requested_at": {
2585
+ "name": "requested_at",
2586
+ "type": "timestamp with time zone",
2587
+ "primaryKey": false,
2588
+ "notNull": true,
2589
+ "default": "now()"
2590
+ },
2591
+ "decided_by": {
2592
+ "name": "decided_by",
2593
+ "type": "uuid",
2594
+ "primaryKey": false,
2595
+ "notNull": false
2596
+ },
2597
+ "decided_by_label": {
2598
+ "name": "decided_by_label",
2599
+ "type": "text",
2600
+ "primaryKey": false,
2601
+ "notNull": false
2602
+ },
2603
+ "decision_note": {
2604
+ "name": "decision_note",
2605
+ "type": "text",
2606
+ "primaryKey": false,
2607
+ "notNull": false
2608
+ },
2609
+ "decided_at": {
2610
+ "name": "decided_at",
2611
+ "type": "timestamp with time zone",
2612
+ "primaryKey": false,
2613
+ "notNull": false
2614
+ }
2615
+ },
2616
+ "indexes": {
2617
+ "content_approvals_content_idx": {
2618
+ "name": "content_approvals_content_idx",
2619
+ "columns": [
2620
+ {
2621
+ "expression": "content_id",
2622
+ "isExpression": false,
2623
+ "asc": true,
2624
+ "nulls": "last"
2625
+ },
2626
+ {
2627
+ "expression": "requested_at",
2628
+ "isExpression": false,
2629
+ "asc": true,
2630
+ "nulls": "last"
2631
+ }
2632
+ ],
2633
+ "isUnique": false,
2634
+ "concurrently": false,
2635
+ "method": "btree",
2636
+ "with": {}
2637
+ },
2638
+ "content_approvals_space_status_idx": {
2639
+ "name": "content_approvals_space_status_idx",
2640
+ "columns": [
2641
+ {
2642
+ "expression": "space_id",
2643
+ "isExpression": false,
2644
+ "asc": true,
2645
+ "nulls": "last"
2646
+ },
2647
+ {
2648
+ "expression": "status",
2649
+ "isExpression": false,
2650
+ "asc": true,
2651
+ "nulls": "last"
2652
+ },
2653
+ {
2654
+ "expression": "requested_at",
2655
+ "isExpression": false,
2656
+ "asc": true,
2657
+ "nulls": "last"
2658
+ }
2659
+ ],
2660
+ "isUnique": false,
2661
+ "concurrently": false,
2662
+ "method": "btree",
2663
+ "with": {}
2664
+ }
2665
+ },
2666
+ "foreignKeys": {
2667
+ "content_approvals_space_id_spaces_id_fk": {
2668
+ "name": "content_approvals_space_id_spaces_id_fk",
2669
+ "tableFrom": "content_approvals",
2670
+ "tableTo": "spaces",
2671
+ "columnsFrom": [
2672
+ "space_id"
2673
+ ],
2674
+ "columnsTo": [
2675
+ "id"
2676
+ ],
2677
+ "onDelete": "cascade",
2678
+ "onUpdate": "no action"
2679
+ },
2680
+ "content_approvals_content_id_contents_id_fk": {
2681
+ "name": "content_approvals_content_id_contents_id_fk",
2682
+ "tableFrom": "content_approvals",
2683
+ "tableTo": "contents",
2684
+ "columnsFrom": [
2685
+ "content_id"
2686
+ ],
2687
+ "columnsTo": [
2688
+ "id"
2689
+ ],
2690
+ "onDelete": "cascade",
2691
+ "onUpdate": "no action"
2692
+ }
2693
+ },
2694
+ "compositePrimaryKeys": {},
2695
+ "uniqueConstraints": {},
2696
+ "policies": {},
2697
+ "checkConstraints": {},
2698
+ "isRLSEnabled": false
2699
+ },
2700
+ "public.notifications": {
2701
+ "name": "notifications",
2702
+ "schema": "",
2703
+ "columns": {
2704
+ "id": {
2705
+ "name": "id",
2706
+ "type": "uuid",
2707
+ "primaryKey": true,
2708
+ "notNull": true,
2709
+ "default": "gen_random_uuid()"
2710
+ },
2711
+ "user_id": {
2712
+ "name": "user_id",
2713
+ "type": "uuid",
2714
+ "primaryKey": false,
2715
+ "notNull": true
2716
+ },
2717
+ "space_id": {
2718
+ "name": "space_id",
2719
+ "type": "uuid",
2720
+ "primaryKey": false,
2721
+ "notNull": false
2722
+ },
2723
+ "kind": {
2724
+ "name": "kind",
2725
+ "type": "text",
2726
+ "primaryKey": false,
2727
+ "notNull": true
2728
+ },
2729
+ "title": {
2730
+ "name": "title",
2731
+ "type": "text",
2732
+ "primaryKey": false,
2733
+ "notNull": true
2734
+ },
2735
+ "body": {
2736
+ "name": "body",
2737
+ "type": "text",
2738
+ "primaryKey": false,
2739
+ "notNull": true,
2740
+ "default": "''"
2741
+ },
2742
+ "url": {
2743
+ "name": "url",
2744
+ "type": "text",
2745
+ "primaryKey": false,
2746
+ "notNull": false
2747
+ },
2748
+ "target_kind": {
2749
+ "name": "target_kind",
2750
+ "type": "text",
2751
+ "primaryKey": false,
2752
+ "notNull": false
2753
+ },
2754
+ "target_id": {
2755
+ "name": "target_id",
2756
+ "type": "text",
2757
+ "primaryKey": false,
2758
+ "notNull": false
2759
+ },
2760
+ "actor_id": {
2761
+ "name": "actor_id",
2762
+ "type": "text",
2763
+ "primaryKey": false,
2764
+ "notNull": false
2765
+ },
2766
+ "actor_label": {
2767
+ "name": "actor_label",
2768
+ "type": "text",
2769
+ "primaryKey": false,
2770
+ "notNull": false
2771
+ },
2772
+ "meta": {
2773
+ "name": "meta",
2774
+ "type": "jsonb",
2775
+ "primaryKey": false,
2776
+ "notNull": false
2777
+ },
2778
+ "read_at": {
2779
+ "name": "read_at",
2780
+ "type": "timestamp with time zone",
2781
+ "primaryKey": false,
2782
+ "notNull": false
2783
+ },
2784
+ "created_at": {
2785
+ "name": "created_at",
2786
+ "type": "timestamp with time zone",
2787
+ "primaryKey": false,
2788
+ "notNull": true,
2789
+ "default": "now()"
2790
+ }
2791
+ },
2792
+ "indexes": {
2793
+ "notifications_user_created_idx": {
2794
+ "name": "notifications_user_created_idx",
2795
+ "columns": [
2796
+ {
2797
+ "expression": "user_id",
2798
+ "isExpression": false,
2799
+ "asc": true,
2800
+ "nulls": "last"
2801
+ },
2802
+ {
2803
+ "expression": "created_at",
2804
+ "isExpression": false,
2805
+ "asc": true,
2806
+ "nulls": "last"
2807
+ }
2808
+ ],
2809
+ "isUnique": false,
2810
+ "concurrently": false,
2811
+ "method": "btree",
2812
+ "with": {}
2813
+ },
2814
+ "notifications_user_unread_idx": {
2815
+ "name": "notifications_user_unread_idx",
2816
+ "columns": [
2817
+ {
2818
+ "expression": "user_id",
2819
+ "isExpression": false,
2820
+ "asc": true,
2821
+ "nulls": "last"
2822
+ },
2823
+ {
2824
+ "expression": "read_at",
2825
+ "isExpression": false,
2826
+ "asc": true,
2827
+ "nulls": "last"
2828
+ }
2829
+ ],
2830
+ "isUnique": false,
2831
+ "concurrently": false,
2832
+ "method": "btree",
2833
+ "with": {}
2834
+ },
2835
+ "notifications_target_idx": {
2836
+ "name": "notifications_target_idx",
2837
+ "columns": [
2838
+ {
2839
+ "expression": "target_kind",
2840
+ "isExpression": false,
2841
+ "asc": true,
2842
+ "nulls": "last"
2843
+ },
2844
+ {
2845
+ "expression": "target_id",
2846
+ "isExpression": false,
2847
+ "asc": true,
2848
+ "nulls": "last"
2849
+ }
2850
+ ],
2851
+ "isUnique": false,
2852
+ "concurrently": false,
2853
+ "method": "btree",
2854
+ "with": {}
2855
+ }
2856
+ },
2857
+ "foreignKeys": {
2858
+ "notifications_user_id_users_id_fk": {
2859
+ "name": "notifications_user_id_users_id_fk",
2860
+ "tableFrom": "notifications",
2861
+ "tableTo": "users",
2862
+ "columnsFrom": [
2863
+ "user_id"
2864
+ ],
2865
+ "columnsTo": [
2866
+ "id"
2867
+ ],
2868
+ "onDelete": "cascade",
2869
+ "onUpdate": "no action"
2870
+ },
2871
+ "notifications_space_id_spaces_id_fk": {
2872
+ "name": "notifications_space_id_spaces_id_fk",
2873
+ "tableFrom": "notifications",
2874
+ "tableTo": "spaces",
2875
+ "columnsFrom": [
2876
+ "space_id"
2877
+ ],
2878
+ "columnsTo": [
2879
+ "id"
2880
+ ],
2881
+ "onDelete": "cascade",
2882
+ "onUpdate": "no action"
2883
+ }
2884
+ },
2885
+ "compositePrimaryKeys": {},
2886
+ "uniqueConstraints": {},
2887
+ "policies": {},
2888
+ "checkConstraints": {},
2889
+ "isRLSEnabled": false
2890
+ },
2891
+ "public.spaces": {
2892
+ "name": "spaces",
2893
+ "schema": "",
2894
+ "columns": {
2895
+ "id": {
2896
+ "name": "id",
2897
+ "type": "uuid",
2898
+ "primaryKey": true,
2899
+ "notNull": true,
2900
+ "default": "gen_random_uuid()"
2901
+ },
2902
+ "name": {
2903
+ "name": "name",
2904
+ "type": "text",
2905
+ "primaryKey": false,
2906
+ "notNull": true
2907
+ },
2908
+ "machine_name": {
2909
+ "name": "machine_name",
2910
+ "type": "text",
2911
+ "primaryKey": false,
2912
+ "notNull": true
2913
+ },
2914
+ "description": {
2915
+ "name": "description",
2916
+ "type": "text",
2917
+ "primaryKey": false,
2918
+ "notNull": false
2919
+ },
2920
+ "url": {
2921
+ "name": "url",
2922
+ "type": "text",
2923
+ "primaryKey": false,
2924
+ "notNull": true
2925
+ },
2926
+ "default_locale": {
2927
+ "name": "default_locale",
2928
+ "type": "text",
2929
+ "primaryKey": false,
2930
+ "notNull": true,
2931
+ "default": "'en'"
2932
+ },
2933
+ "locales": {
2934
+ "name": "locales",
2935
+ "type": "jsonb",
2936
+ "primaryKey": false,
2937
+ "notNull": true,
2938
+ "default": "'[\"en\"]'::jsonb"
2939
+ },
2940
+ "settings": {
2941
+ "name": "settings",
2942
+ "type": "jsonb",
2943
+ "primaryKey": false,
2944
+ "notNull": true,
2945
+ "default": "'{}'::jsonb"
2946
+ },
2947
+ "created_at": {
2948
+ "name": "created_at",
2949
+ "type": "timestamp with time zone",
2950
+ "primaryKey": false,
2951
+ "notNull": true,
2952
+ "default": "now()"
2953
+ },
2954
+ "updated_at": {
2955
+ "name": "updated_at",
2956
+ "type": "timestamp with time zone",
2957
+ "primaryKey": false,
2958
+ "notNull": true,
2959
+ "default": "now()"
2960
+ }
2961
+ },
2962
+ "indexes": {
2963
+ "spaces_machine_name_key": {
2964
+ "name": "spaces_machine_name_key",
2965
+ "columns": [
2966
+ {
2967
+ "expression": "machine_name",
2968
+ "isExpression": false,
2969
+ "asc": true,
2970
+ "nulls": "last"
2971
+ }
2972
+ ],
2973
+ "isUnique": true,
2974
+ "concurrently": false,
2975
+ "method": "btree",
2976
+ "with": {}
2977
+ }
2978
+ },
2979
+ "foreignKeys": {},
2980
+ "compositePrimaryKeys": {},
2981
+ "uniqueConstraints": {},
2982
+ "policies": {},
2983
+ "checkConstraints": {},
2984
+ "isRLSEnabled": false
2985
+ },
2986
+ "public.webhook_deliveries": {
2987
+ "name": "webhook_deliveries",
2988
+ "schema": "",
2989
+ "columns": {
2990
+ "id": {
2991
+ "name": "id",
2992
+ "type": "uuid",
2993
+ "primaryKey": true,
2994
+ "notNull": true,
2995
+ "default": "gen_random_uuid()"
2996
+ },
2997
+ "webhook_id": {
2998
+ "name": "webhook_id",
2999
+ "type": "uuid",
3000
+ "primaryKey": false,
3001
+ "notNull": true
3002
+ },
3003
+ "event": {
3004
+ "name": "event",
3005
+ "type": "text",
3006
+ "primaryKey": false,
3007
+ "notNull": true
3008
+ },
3009
+ "payload": {
3010
+ "name": "payload",
3011
+ "type": "jsonb",
3012
+ "primaryKey": false,
3013
+ "notNull": true
3014
+ },
3015
+ "status": {
3016
+ "name": "status",
3017
+ "type": "integer",
3018
+ "primaryKey": false,
3019
+ "notNull": false
3020
+ },
3021
+ "error": {
3022
+ "name": "error",
3023
+ "type": "text",
3024
+ "primaryKey": false,
3025
+ "notNull": false
3026
+ },
3027
+ "attempt": {
3028
+ "name": "attempt",
3029
+ "type": "integer",
3030
+ "primaryKey": false,
3031
+ "notNull": true,
3032
+ "default": 1
3033
+ },
3034
+ "created_at": {
3035
+ "name": "created_at",
3036
+ "type": "timestamp with time zone",
3037
+ "primaryKey": false,
3038
+ "notNull": true,
3039
+ "default": "now()"
3040
+ }
3041
+ },
3042
+ "indexes": {
3043
+ "webhook_deliveries_webhook_idx": {
3044
+ "name": "webhook_deliveries_webhook_idx",
3045
+ "columns": [
3046
+ {
3047
+ "expression": "webhook_id",
3048
+ "isExpression": false,
3049
+ "asc": true,
3050
+ "nulls": "last"
3051
+ },
3052
+ {
3053
+ "expression": "created_at",
3054
+ "isExpression": false,
3055
+ "asc": true,
3056
+ "nulls": "last"
3057
+ }
3058
+ ],
3059
+ "isUnique": false,
3060
+ "concurrently": false,
3061
+ "method": "btree",
3062
+ "with": {}
3063
+ }
3064
+ },
3065
+ "foreignKeys": {
3066
+ "webhook_deliveries_webhook_id_webhooks_id_fk": {
3067
+ "name": "webhook_deliveries_webhook_id_webhooks_id_fk",
3068
+ "tableFrom": "webhook_deliveries",
3069
+ "tableTo": "webhooks",
3070
+ "columnsFrom": [
3071
+ "webhook_id"
3072
+ ],
3073
+ "columnsTo": [
3074
+ "id"
3075
+ ],
3076
+ "onDelete": "cascade",
3077
+ "onUpdate": "no action"
3078
+ }
3079
+ },
3080
+ "compositePrimaryKeys": {},
3081
+ "uniqueConstraints": {},
3082
+ "policies": {},
3083
+ "checkConstraints": {},
3084
+ "isRLSEnabled": false
3085
+ },
3086
+ "public.webhooks": {
3087
+ "name": "webhooks",
3088
+ "schema": "",
3089
+ "columns": {
3090
+ "id": {
3091
+ "name": "id",
3092
+ "type": "uuid",
3093
+ "primaryKey": true,
3094
+ "notNull": true,
3095
+ "default": "gen_random_uuid()"
3096
+ },
3097
+ "space_id": {
3098
+ "name": "space_id",
3099
+ "type": "uuid",
3100
+ "primaryKey": false,
3101
+ "notNull": true
3102
+ },
3103
+ "name": {
3104
+ "name": "name",
3105
+ "type": "text",
3106
+ "primaryKey": false,
3107
+ "notNull": true
3108
+ },
3109
+ "url": {
3110
+ "name": "url",
3111
+ "type": "text",
3112
+ "primaryKey": false,
3113
+ "notNull": true
3114
+ },
3115
+ "secret": {
3116
+ "name": "secret",
3117
+ "type": "text",
3118
+ "primaryKey": false,
3119
+ "notNull": false
3120
+ },
3121
+ "events": {
3122
+ "name": "events",
3123
+ "type": "jsonb",
3124
+ "primaryKey": false,
3125
+ "notNull": true,
3126
+ "default": "'[]'::jsonb"
3127
+ },
3128
+ "enabled": {
3129
+ "name": "enabled",
3130
+ "type": "boolean",
3131
+ "primaryKey": false,
3132
+ "notNull": true,
3133
+ "default": true
3134
+ },
3135
+ "created_at": {
3136
+ "name": "created_at",
3137
+ "type": "timestamp with time zone",
3138
+ "primaryKey": false,
3139
+ "notNull": true,
3140
+ "default": "now()"
3141
+ }
3142
+ },
3143
+ "indexes": {
3144
+ "webhooks_space_idx": {
3145
+ "name": "webhooks_space_idx",
3146
+ "columns": [
3147
+ {
3148
+ "expression": "space_id",
3149
+ "isExpression": false,
3150
+ "asc": true,
3151
+ "nulls": "last"
3152
+ }
3153
+ ],
3154
+ "isUnique": false,
3155
+ "concurrently": false,
3156
+ "method": "btree",
3157
+ "with": {}
3158
+ }
3159
+ },
3160
+ "foreignKeys": {
3161
+ "webhooks_space_id_spaces_id_fk": {
3162
+ "name": "webhooks_space_id_spaces_id_fk",
3163
+ "tableFrom": "webhooks",
3164
+ "tableTo": "spaces",
3165
+ "columnsFrom": [
3166
+ "space_id"
3167
+ ],
3168
+ "columnsTo": [
3169
+ "id"
3170
+ ],
3171
+ "onDelete": "cascade",
3172
+ "onUpdate": "no action"
3173
+ }
3174
+ },
3175
+ "compositePrimaryKeys": {},
3176
+ "uniqueConstraints": {},
3177
+ "policies": {},
3178
+ "checkConstraints": {},
3179
+ "isRLSEnabled": false
3180
+ },
3181
+ "public.push_subscriptions": {
3182
+ "name": "push_subscriptions",
3183
+ "schema": "",
3184
+ "columns": {
3185
+ "id": {
3186
+ "name": "id",
3187
+ "type": "uuid",
3188
+ "primaryKey": true,
3189
+ "notNull": true,
3190
+ "default": "gen_random_uuid()"
3191
+ },
3192
+ "user_id": {
3193
+ "name": "user_id",
3194
+ "type": "uuid",
3195
+ "primaryKey": false,
3196
+ "notNull": true
3197
+ },
3198
+ "endpoint": {
3199
+ "name": "endpoint",
3200
+ "type": "text",
3201
+ "primaryKey": false,
3202
+ "notNull": true
3203
+ },
3204
+ "keys": {
3205
+ "name": "keys",
3206
+ "type": "jsonb",
3207
+ "primaryKey": false,
3208
+ "notNull": true
3209
+ },
3210
+ "user_agent": {
3211
+ "name": "user_agent",
3212
+ "type": "text",
3213
+ "primaryKey": false,
3214
+ "notNull": false
3215
+ },
3216
+ "created_at": {
3217
+ "name": "created_at",
3218
+ "type": "timestamp with time zone",
3219
+ "primaryKey": false,
3220
+ "notNull": true,
3221
+ "default": "now()"
3222
+ },
3223
+ "last_used_at": {
3224
+ "name": "last_used_at",
3225
+ "type": "timestamp with time zone",
3226
+ "primaryKey": false,
3227
+ "notNull": false
3228
+ }
3229
+ },
3230
+ "indexes": {
3231
+ "push_subscriptions_user_idx": {
3232
+ "name": "push_subscriptions_user_idx",
3233
+ "columns": [
3234
+ {
3235
+ "expression": "user_id",
3236
+ "isExpression": false,
3237
+ "asc": true,
3238
+ "nulls": "last"
3239
+ }
3240
+ ],
3241
+ "isUnique": false,
3242
+ "concurrently": false,
3243
+ "method": "btree",
3244
+ "with": {}
3245
+ }
3246
+ },
3247
+ "foreignKeys": {
3248
+ "push_subscriptions_user_id_users_id_fk": {
3249
+ "name": "push_subscriptions_user_id_users_id_fk",
3250
+ "tableFrom": "push_subscriptions",
3251
+ "tableTo": "users",
3252
+ "columnsFrom": [
3253
+ "user_id"
3254
+ ],
3255
+ "columnsTo": [
3256
+ "id"
3257
+ ],
3258
+ "onDelete": "cascade",
3259
+ "onUpdate": "no action"
3260
+ }
3261
+ },
3262
+ "compositePrimaryKeys": {},
3263
+ "uniqueConstraints": {
3264
+ "push_subscriptions_endpoint_key": {
3265
+ "name": "push_subscriptions_endpoint_key",
3266
+ "nullsNotDistinct": false,
3267
+ "columns": [
3268
+ "endpoint"
3269
+ ]
3270
+ }
3271
+ },
3272
+ "policies": {},
3273
+ "checkConstraints": {},
3274
+ "isRLSEnabled": false
3275
+ },
3276
+ "public.workflow_runs": {
3277
+ "name": "workflow_runs",
3278
+ "schema": "",
3279
+ "columns": {
3280
+ "id": {
3281
+ "name": "id",
3282
+ "type": "uuid",
3283
+ "primaryKey": true,
3284
+ "notNull": true,
3285
+ "default": "gen_random_uuid()"
3286
+ },
3287
+ "workflow_id": {
3288
+ "name": "workflow_id",
3289
+ "type": "uuid",
3290
+ "primaryKey": false,
3291
+ "notNull": true
3292
+ },
3293
+ "space_id": {
3294
+ "name": "space_id",
3295
+ "type": "uuid",
3296
+ "primaryKey": false,
3297
+ "notNull": true
3298
+ },
3299
+ "trigger": {
3300
+ "name": "trigger",
3301
+ "type": "text",
3302
+ "primaryKey": false,
3303
+ "notNull": true
3304
+ },
3305
+ "status": {
3306
+ "name": "status",
3307
+ "type": "text",
3308
+ "primaryKey": false,
3309
+ "notNull": true,
3310
+ "default": "'queued'"
3311
+ },
3312
+ "context": {
3313
+ "name": "context",
3314
+ "type": "jsonb",
3315
+ "primaryKey": false,
3316
+ "notNull": true
3317
+ },
3318
+ "cursor": {
3319
+ "name": "cursor",
3320
+ "type": "jsonb",
3321
+ "primaryKey": false,
3322
+ "notNull": true,
3323
+ "default": "'[]'::jsonb"
3324
+ },
3325
+ "log": {
3326
+ "name": "log",
3327
+ "type": "jsonb",
3328
+ "primaryKey": false,
3329
+ "notNull": true,
3330
+ "default": "'[]'::jsonb"
3331
+ },
3332
+ "error": {
3333
+ "name": "error",
3334
+ "type": "text",
3335
+ "primaryKey": false,
3336
+ "notNull": false
3337
+ },
3338
+ "resume_at": {
3339
+ "name": "resume_at",
3340
+ "type": "timestamp with time zone",
3341
+ "primaryKey": false,
3342
+ "notNull": false
3343
+ },
3344
+ "started_at": {
3345
+ "name": "started_at",
3346
+ "type": "timestamp with time zone",
3347
+ "primaryKey": false,
3348
+ "notNull": false
3349
+ },
3350
+ "finished_at": {
3351
+ "name": "finished_at",
3352
+ "type": "timestamp with time zone",
3353
+ "primaryKey": false,
3354
+ "notNull": false
3355
+ },
3356
+ "created_at": {
3357
+ "name": "created_at",
3358
+ "type": "timestamp with time zone",
3359
+ "primaryKey": false,
3360
+ "notNull": true,
3361
+ "default": "now()"
3362
+ }
3363
+ },
3364
+ "indexes": {
3365
+ "workflow_runs_workflow_idx": {
3366
+ "name": "workflow_runs_workflow_idx",
3367
+ "columns": [
3368
+ {
3369
+ "expression": "workflow_id",
3370
+ "isExpression": false,
3371
+ "asc": true,
3372
+ "nulls": "last"
3373
+ },
3374
+ {
3375
+ "expression": "created_at",
3376
+ "isExpression": false,
3377
+ "asc": true,
3378
+ "nulls": "last"
3379
+ }
3380
+ ],
3381
+ "isUnique": false,
3382
+ "concurrently": false,
3383
+ "method": "btree",
3384
+ "with": {}
3385
+ },
3386
+ "workflow_runs_resume_idx": {
3387
+ "name": "workflow_runs_resume_idx",
3388
+ "columns": [
3389
+ {
3390
+ "expression": "status",
3391
+ "isExpression": false,
3392
+ "asc": true,
3393
+ "nulls": "last"
3394
+ },
3395
+ {
3396
+ "expression": "resume_at",
3397
+ "isExpression": false,
3398
+ "asc": true,
3399
+ "nulls": "last"
3400
+ }
3401
+ ],
3402
+ "isUnique": false,
3403
+ "concurrently": false,
3404
+ "method": "btree",
3405
+ "with": {}
3406
+ }
3407
+ },
3408
+ "foreignKeys": {
3409
+ "workflow_runs_workflow_id_workflows_id_fk": {
3410
+ "name": "workflow_runs_workflow_id_workflows_id_fk",
3411
+ "tableFrom": "workflow_runs",
3412
+ "tableTo": "workflows",
3413
+ "columnsFrom": [
3414
+ "workflow_id"
3415
+ ],
3416
+ "columnsTo": [
3417
+ "id"
3418
+ ],
3419
+ "onDelete": "cascade",
3420
+ "onUpdate": "no action"
3421
+ },
3422
+ "workflow_runs_space_id_spaces_id_fk": {
3423
+ "name": "workflow_runs_space_id_spaces_id_fk",
3424
+ "tableFrom": "workflow_runs",
3425
+ "tableTo": "spaces",
3426
+ "columnsFrom": [
3427
+ "space_id"
3428
+ ],
3429
+ "columnsTo": [
3430
+ "id"
3431
+ ],
3432
+ "onDelete": "cascade",
3433
+ "onUpdate": "no action"
3434
+ }
3435
+ },
3436
+ "compositePrimaryKeys": {},
3437
+ "uniqueConstraints": {},
3438
+ "policies": {},
3439
+ "checkConstraints": {},
3440
+ "isRLSEnabled": false
3441
+ },
3442
+ "public.workflows": {
3443
+ "name": "workflows",
3444
+ "schema": "",
3445
+ "columns": {
3446
+ "id": {
3447
+ "name": "id",
3448
+ "type": "uuid",
3449
+ "primaryKey": true,
3450
+ "notNull": true,
3451
+ "default": "gen_random_uuid()"
3452
+ },
3453
+ "space_id": {
3454
+ "name": "space_id",
3455
+ "type": "uuid",
3456
+ "primaryKey": false,
3457
+ "notNull": true
3458
+ },
3459
+ "name": {
3460
+ "name": "name",
3461
+ "type": "text",
3462
+ "primaryKey": false,
3463
+ "notNull": true
3464
+ },
3465
+ "description": {
3466
+ "name": "description",
3467
+ "type": "text",
3468
+ "primaryKey": false,
3469
+ "notNull": false
3470
+ },
3471
+ "enabled": {
3472
+ "name": "enabled",
3473
+ "type": "boolean",
3474
+ "primaryKey": false,
3475
+ "notNull": true,
3476
+ "default": false
3477
+ },
3478
+ "trigger": {
3479
+ "name": "trigger",
3480
+ "type": "jsonb",
3481
+ "primaryKey": false,
3482
+ "notNull": true
3483
+ },
3484
+ "steps": {
3485
+ "name": "steps",
3486
+ "type": "jsonb",
3487
+ "primaryKey": false,
3488
+ "notNull": true,
3489
+ "default": "'[]'::jsonb"
3490
+ },
3491
+ "last_scheduled_at": {
3492
+ "name": "last_scheduled_at",
3493
+ "type": "timestamp with time zone",
3494
+ "primaryKey": false,
3495
+ "notNull": false
3496
+ },
3497
+ "last_run_at": {
3498
+ "name": "last_run_at",
3499
+ "type": "timestamp with time zone",
3500
+ "primaryKey": false,
3501
+ "notNull": false
3502
+ },
3503
+ "created_at": {
3504
+ "name": "created_at",
3505
+ "type": "timestamp with time zone",
3506
+ "primaryKey": false,
3507
+ "notNull": true,
3508
+ "default": "now()"
3509
+ },
3510
+ "updated_at": {
3511
+ "name": "updated_at",
3512
+ "type": "timestamp with time zone",
3513
+ "primaryKey": false,
3514
+ "notNull": true,
3515
+ "default": "now()"
3516
+ }
3517
+ },
3518
+ "indexes": {
3519
+ "workflows_space_idx": {
3520
+ "name": "workflows_space_idx",
3521
+ "columns": [
3522
+ {
3523
+ "expression": "space_id",
3524
+ "isExpression": false,
3525
+ "asc": true,
3526
+ "nulls": "last"
3527
+ },
3528
+ {
3529
+ "expression": "enabled",
3530
+ "isExpression": false,
3531
+ "asc": true,
3532
+ "nulls": "last"
3533
+ }
3534
+ ],
3535
+ "isUnique": false,
3536
+ "concurrently": false,
3537
+ "method": "btree",
3538
+ "with": {}
3539
+ }
3540
+ },
3541
+ "foreignKeys": {
3542
+ "workflows_space_id_spaces_id_fk": {
3543
+ "name": "workflows_space_id_spaces_id_fk",
3544
+ "tableFrom": "workflows",
3545
+ "tableTo": "spaces",
3546
+ "columnsFrom": [
3547
+ "space_id"
3548
+ ],
3549
+ "columnsTo": [
3550
+ "id"
3551
+ ],
3552
+ "onDelete": "cascade",
3553
+ "onUpdate": "no action"
3554
+ }
3555
+ },
3556
+ "compositePrimaryKeys": {},
3557
+ "uniqueConstraints": {},
3558
+ "policies": {},
3559
+ "checkConstraints": {},
3560
+ "isRLSEnabled": false
3561
+ }
3562
+ },
3563
+ "enums": {},
3564
+ "schemas": {},
3565
+ "sequences": {},
3566
+ "roles": {},
3567
+ "policies": {},
3568
+ "views": {},
3569
+ "_meta": {
3570
+ "columns": {},
3571
+ "schemas": {},
3572
+ "tables": {}
3573
+ }
3574
+ }