Barazo AppView backend
barazo.forum
1{
2 "id": "fb61c80e-ea91-48e9-8d9c-7beaf93d08f1",
3 "prevId": "5f8531c6-1108-4540-8776-0cb9de6ab736",
4 "version": "7",
5 "dialect": "postgresql",
6 "tables": {
7 "public.users": {
8 "name": "users",
9 "schema": "",
10 "columns": {
11 "did": {
12 "name": "did",
13 "type": "text",
14 "primaryKey": true,
15 "notNull": true
16 },
17 "handle": {
18 "name": "handle",
19 "type": "text",
20 "primaryKey": false,
21 "notNull": true
22 },
23 "display_name": {
24 "name": "display_name",
25 "type": "text",
26 "primaryKey": false,
27 "notNull": false
28 },
29 "avatar_url": {
30 "name": "avatar_url",
31 "type": "text",
32 "primaryKey": false,
33 "notNull": false
34 },
35 "banner_url": {
36 "name": "banner_url",
37 "type": "text",
38 "primaryKey": false,
39 "notNull": false
40 },
41 "bio": {
42 "name": "bio",
43 "type": "text",
44 "primaryKey": false,
45 "notNull": false
46 },
47 "role": {
48 "name": "role",
49 "type": "text",
50 "primaryKey": false,
51 "notNull": true,
52 "default": "'user'"
53 },
54 "is_banned": {
55 "name": "is_banned",
56 "type": "boolean",
57 "primaryKey": false,
58 "notNull": true,
59 "default": false
60 },
61 "reputation_score": {
62 "name": "reputation_score",
63 "type": "integer",
64 "primaryKey": false,
65 "notNull": true,
66 "default": 0
67 },
68 "first_seen_at": {
69 "name": "first_seen_at",
70 "type": "timestamp with time zone",
71 "primaryKey": false,
72 "notNull": true,
73 "default": "now()"
74 },
75 "last_active_at": {
76 "name": "last_active_at",
77 "type": "timestamp with time zone",
78 "primaryKey": false,
79 "notNull": true,
80 "default": "now()"
81 },
82 "declared_age": {
83 "name": "declared_age",
84 "type": "integer",
85 "primaryKey": false,
86 "notNull": false
87 },
88 "maturity_pref": {
89 "name": "maturity_pref",
90 "type": "text",
91 "primaryKey": false,
92 "notNull": true,
93 "default": "'safe'"
94 },
95 "account_created_at": {
96 "name": "account_created_at",
97 "type": "timestamp with time zone",
98 "primaryKey": false,
99 "notNull": false
100 },
101 "followers_count": {
102 "name": "followers_count",
103 "type": "integer",
104 "primaryKey": false,
105 "notNull": true,
106 "default": 0
107 },
108 "follows_count": {
109 "name": "follows_count",
110 "type": "integer",
111 "primaryKey": false,
112 "notNull": true,
113 "default": 0
114 },
115 "atproto_posts_count": {
116 "name": "atproto_posts_count",
117 "type": "integer",
118 "primaryKey": false,
119 "notNull": true,
120 "default": 0
121 },
122 "has_bluesky_profile": {
123 "name": "has_bluesky_profile",
124 "type": "boolean",
125 "primaryKey": false,
126 "notNull": true,
127 "default": false
128 },
129 "atproto_labels": {
130 "name": "atproto_labels",
131 "type": "jsonb",
132 "primaryKey": false,
133 "notNull": true,
134 "default": "'[]'::jsonb"
135 }
136 },
137 "indexes": {
138 "users_role_elevated_idx": {
139 "name": "users_role_elevated_idx",
140 "columns": [
141 {
142 "expression": "role",
143 "isExpression": false,
144 "asc": true,
145 "nulls": "last"
146 }
147 ],
148 "isUnique": false,
149 "where": "role IN ('moderator', 'admin')",
150 "concurrently": false,
151 "method": "btree",
152 "with": {}
153 },
154 "users_handle_idx": {
155 "name": "users_handle_idx",
156 "columns": [
157 {
158 "expression": "handle",
159 "isExpression": false,
160 "asc": true,
161 "nulls": "last"
162 }
163 ],
164 "isUnique": false,
165 "concurrently": false,
166 "method": "btree",
167 "with": {}
168 },
169 "users_account_created_at_idx": {
170 "name": "users_account_created_at_idx",
171 "columns": [
172 {
173 "expression": "account_created_at",
174 "isExpression": false,
175 "asc": true,
176 "nulls": "last"
177 }
178 ],
179 "isUnique": false,
180 "concurrently": false,
181 "method": "btree",
182 "with": {}
183 }
184 },
185 "foreignKeys": {},
186 "compositePrimaryKeys": {},
187 "uniqueConstraints": {},
188 "policies": {},
189 "checkConstraints": {},
190 "isRLSEnabled": false
191 },
192 "public.firehose_cursor": {
193 "name": "firehose_cursor",
194 "schema": "",
195 "columns": {
196 "id": {
197 "name": "id",
198 "type": "text",
199 "primaryKey": true,
200 "notNull": true,
201 "default": "'default'"
202 },
203 "cursor": {
204 "name": "cursor",
205 "type": "bigint",
206 "primaryKey": false,
207 "notNull": false
208 },
209 "updated_at": {
210 "name": "updated_at",
211 "type": "timestamp with time zone",
212 "primaryKey": false,
213 "notNull": true,
214 "default": "now()"
215 }
216 },
217 "indexes": {},
218 "foreignKeys": {},
219 "compositePrimaryKeys": {},
220 "uniqueConstraints": {},
221 "policies": {},
222 "checkConstraints": {},
223 "isRLSEnabled": false
224 },
225 "public.topics": {
226 "name": "topics",
227 "schema": "",
228 "columns": {
229 "uri": {
230 "name": "uri",
231 "type": "text",
232 "primaryKey": true,
233 "notNull": true
234 },
235 "rkey": {
236 "name": "rkey",
237 "type": "text",
238 "primaryKey": false,
239 "notNull": true
240 },
241 "author_did": {
242 "name": "author_did",
243 "type": "text",
244 "primaryKey": false,
245 "notNull": true
246 },
247 "title": {
248 "name": "title",
249 "type": "text",
250 "primaryKey": false,
251 "notNull": true
252 },
253 "content": {
254 "name": "content",
255 "type": "text",
256 "primaryKey": false,
257 "notNull": true
258 },
259 "content_format": {
260 "name": "content_format",
261 "type": "text",
262 "primaryKey": false,
263 "notNull": false
264 },
265 "category": {
266 "name": "category",
267 "type": "text",
268 "primaryKey": false,
269 "notNull": true
270 },
271 "tags": {
272 "name": "tags",
273 "type": "jsonb",
274 "primaryKey": false,
275 "notNull": false
276 },
277 "community_did": {
278 "name": "community_did",
279 "type": "text",
280 "primaryKey": false,
281 "notNull": true
282 },
283 "cid": {
284 "name": "cid",
285 "type": "text",
286 "primaryKey": false,
287 "notNull": true
288 },
289 "labels": {
290 "name": "labels",
291 "type": "jsonb",
292 "primaryKey": false,
293 "notNull": false
294 },
295 "reply_count": {
296 "name": "reply_count",
297 "type": "integer",
298 "primaryKey": false,
299 "notNull": true,
300 "default": 0
301 },
302 "reaction_count": {
303 "name": "reaction_count",
304 "type": "integer",
305 "primaryKey": false,
306 "notNull": true,
307 "default": 0
308 },
309 "vote_count": {
310 "name": "vote_count",
311 "type": "integer",
312 "primaryKey": false,
313 "notNull": true,
314 "default": 0
315 },
316 "last_activity_at": {
317 "name": "last_activity_at",
318 "type": "timestamp with time zone",
319 "primaryKey": false,
320 "notNull": true,
321 "default": "now()"
322 },
323 "created_at": {
324 "name": "created_at",
325 "type": "timestamp with time zone",
326 "primaryKey": false,
327 "notNull": true
328 },
329 "indexed_at": {
330 "name": "indexed_at",
331 "type": "timestamp with time zone",
332 "primaryKey": false,
333 "notNull": true,
334 "default": "now()"
335 },
336 "is_locked": {
337 "name": "is_locked",
338 "type": "boolean",
339 "primaryKey": false,
340 "notNull": true,
341 "default": false
342 },
343 "is_pinned": {
344 "name": "is_pinned",
345 "type": "boolean",
346 "primaryKey": false,
347 "notNull": true,
348 "default": false
349 },
350 "is_mod_deleted": {
351 "name": "is_mod_deleted",
352 "type": "boolean",
353 "primaryKey": false,
354 "notNull": true,
355 "default": false
356 },
357 "is_author_deleted": {
358 "name": "is_author_deleted",
359 "type": "boolean",
360 "primaryKey": false,
361 "notNull": true,
362 "default": false
363 },
364 "moderation_status": {
365 "name": "moderation_status",
366 "type": "text",
367 "primaryKey": false,
368 "notNull": true,
369 "default": "'approved'"
370 },
371 "trust_status": {
372 "name": "trust_status",
373 "type": "text",
374 "primaryKey": false,
375 "notNull": true,
376 "default": "'trusted'"
377 }
378 },
379 "indexes": {
380 "topics_author_did_idx": {
381 "name": "topics_author_did_idx",
382 "columns": [
383 {
384 "expression": "author_did",
385 "isExpression": false,
386 "asc": true,
387 "nulls": "last"
388 }
389 ],
390 "isUnique": false,
391 "concurrently": false,
392 "method": "btree",
393 "with": {}
394 },
395 "topics_category_idx": {
396 "name": "topics_category_idx",
397 "columns": [
398 {
399 "expression": "category",
400 "isExpression": false,
401 "asc": true,
402 "nulls": "last"
403 }
404 ],
405 "isUnique": false,
406 "concurrently": false,
407 "method": "btree",
408 "with": {}
409 },
410 "topics_created_at_idx": {
411 "name": "topics_created_at_idx",
412 "columns": [
413 {
414 "expression": "created_at",
415 "isExpression": false,
416 "asc": true,
417 "nulls": "last"
418 }
419 ],
420 "isUnique": false,
421 "concurrently": false,
422 "method": "btree",
423 "with": {}
424 },
425 "topics_last_activity_at_idx": {
426 "name": "topics_last_activity_at_idx",
427 "columns": [
428 {
429 "expression": "last_activity_at",
430 "isExpression": false,
431 "asc": true,
432 "nulls": "last"
433 }
434 ],
435 "isUnique": false,
436 "concurrently": false,
437 "method": "btree",
438 "with": {}
439 },
440 "topics_community_did_idx": {
441 "name": "topics_community_did_idx",
442 "columns": [
443 {
444 "expression": "community_did",
445 "isExpression": false,
446 "asc": true,
447 "nulls": "last"
448 }
449 ],
450 "isUnique": false,
451 "concurrently": false,
452 "method": "btree",
453 "with": {}
454 },
455 "topics_moderation_status_idx": {
456 "name": "topics_moderation_status_idx",
457 "columns": [
458 {
459 "expression": "moderation_status",
460 "isExpression": false,
461 "asc": true,
462 "nulls": "last"
463 }
464 ],
465 "isUnique": false,
466 "concurrently": false,
467 "method": "btree",
468 "with": {}
469 },
470 "topics_trust_status_idx": {
471 "name": "topics_trust_status_idx",
472 "columns": [
473 {
474 "expression": "trust_status",
475 "isExpression": false,
476 "asc": true,
477 "nulls": "last"
478 }
479 ],
480 "isUnique": false,
481 "concurrently": false,
482 "method": "btree",
483 "with": {}
484 },
485 "topics_community_category_activity_idx": {
486 "name": "topics_community_category_activity_idx",
487 "columns": [
488 {
489 "expression": "community_did",
490 "isExpression": false,
491 "asc": true,
492 "nulls": "last"
493 },
494 {
495 "expression": "category",
496 "isExpression": false,
497 "asc": true,
498 "nulls": "last"
499 },
500 {
501 "expression": "last_activity_at",
502 "isExpression": false,
503 "asc": true,
504 "nulls": "last"
505 }
506 ],
507 "isUnique": false,
508 "concurrently": false,
509 "method": "btree",
510 "with": {}
511 }
512 },
513 "foreignKeys": {},
514 "compositePrimaryKeys": {},
515 "uniqueConstraints": {},
516 "policies": {
517 "tenant_isolation": {
518 "name": "tenant_isolation",
519 "as": "PERMISSIVE",
520 "for": "ALL",
521 "to": ["barazo_app"],
522 "using": "community_did = current_setting('app.current_community_did', true)",
523 "withCheck": "community_did = current_setting('app.current_community_did', true)"
524 }
525 },
526 "checkConstraints": {},
527 "isRLSEnabled": true
528 },
529 "public.replies": {
530 "name": "replies",
531 "schema": "",
532 "columns": {
533 "uri": {
534 "name": "uri",
535 "type": "text",
536 "primaryKey": true,
537 "notNull": true
538 },
539 "rkey": {
540 "name": "rkey",
541 "type": "text",
542 "primaryKey": false,
543 "notNull": true
544 },
545 "author_did": {
546 "name": "author_did",
547 "type": "text",
548 "primaryKey": false,
549 "notNull": true
550 },
551 "content": {
552 "name": "content",
553 "type": "text",
554 "primaryKey": false,
555 "notNull": true
556 },
557 "content_format": {
558 "name": "content_format",
559 "type": "text",
560 "primaryKey": false,
561 "notNull": false
562 },
563 "root_uri": {
564 "name": "root_uri",
565 "type": "text",
566 "primaryKey": false,
567 "notNull": true
568 },
569 "root_cid": {
570 "name": "root_cid",
571 "type": "text",
572 "primaryKey": false,
573 "notNull": true
574 },
575 "parent_uri": {
576 "name": "parent_uri",
577 "type": "text",
578 "primaryKey": false,
579 "notNull": true
580 },
581 "parent_cid": {
582 "name": "parent_cid",
583 "type": "text",
584 "primaryKey": false,
585 "notNull": true
586 },
587 "community_did": {
588 "name": "community_did",
589 "type": "text",
590 "primaryKey": false,
591 "notNull": true
592 },
593 "cid": {
594 "name": "cid",
595 "type": "text",
596 "primaryKey": false,
597 "notNull": true
598 },
599 "labels": {
600 "name": "labels",
601 "type": "jsonb",
602 "primaryKey": false,
603 "notNull": false
604 },
605 "reaction_count": {
606 "name": "reaction_count",
607 "type": "integer",
608 "primaryKey": false,
609 "notNull": true,
610 "default": 0
611 },
612 "vote_count": {
613 "name": "vote_count",
614 "type": "integer",
615 "primaryKey": false,
616 "notNull": true,
617 "default": 0
618 },
619 "created_at": {
620 "name": "created_at",
621 "type": "timestamp with time zone",
622 "primaryKey": false,
623 "notNull": true
624 },
625 "indexed_at": {
626 "name": "indexed_at",
627 "type": "timestamp with time zone",
628 "primaryKey": false,
629 "notNull": true,
630 "default": "now()"
631 },
632 "is_author_deleted": {
633 "name": "is_author_deleted",
634 "type": "boolean",
635 "primaryKey": false,
636 "notNull": true,
637 "default": false
638 },
639 "is_mod_deleted": {
640 "name": "is_mod_deleted",
641 "type": "boolean",
642 "primaryKey": false,
643 "notNull": true,
644 "default": false
645 },
646 "moderation_status": {
647 "name": "moderation_status",
648 "type": "text",
649 "primaryKey": false,
650 "notNull": true,
651 "default": "'approved'"
652 },
653 "trust_status": {
654 "name": "trust_status",
655 "type": "text",
656 "primaryKey": false,
657 "notNull": true,
658 "default": "'trusted'"
659 }
660 },
661 "indexes": {
662 "replies_author_did_idx": {
663 "name": "replies_author_did_idx",
664 "columns": [
665 {
666 "expression": "author_did",
667 "isExpression": false,
668 "asc": true,
669 "nulls": "last"
670 }
671 ],
672 "isUnique": false,
673 "concurrently": false,
674 "method": "btree",
675 "with": {}
676 },
677 "replies_root_uri_idx": {
678 "name": "replies_root_uri_idx",
679 "columns": [
680 {
681 "expression": "root_uri",
682 "isExpression": false,
683 "asc": true,
684 "nulls": "last"
685 }
686 ],
687 "isUnique": false,
688 "concurrently": false,
689 "method": "btree",
690 "with": {}
691 },
692 "replies_parent_uri_idx": {
693 "name": "replies_parent_uri_idx",
694 "columns": [
695 {
696 "expression": "parent_uri",
697 "isExpression": false,
698 "asc": true,
699 "nulls": "last"
700 }
701 ],
702 "isUnique": false,
703 "concurrently": false,
704 "method": "btree",
705 "with": {}
706 },
707 "replies_created_at_idx": {
708 "name": "replies_created_at_idx",
709 "columns": [
710 {
711 "expression": "created_at",
712 "isExpression": false,
713 "asc": true,
714 "nulls": "last"
715 }
716 ],
717 "isUnique": false,
718 "concurrently": false,
719 "method": "btree",
720 "with": {}
721 },
722 "replies_community_did_idx": {
723 "name": "replies_community_did_idx",
724 "columns": [
725 {
726 "expression": "community_did",
727 "isExpression": false,
728 "asc": true,
729 "nulls": "last"
730 }
731 ],
732 "isUnique": false,
733 "concurrently": false,
734 "method": "btree",
735 "with": {}
736 },
737 "replies_moderation_status_idx": {
738 "name": "replies_moderation_status_idx",
739 "columns": [
740 {
741 "expression": "moderation_status",
742 "isExpression": false,
743 "asc": true,
744 "nulls": "last"
745 }
746 ],
747 "isUnique": false,
748 "concurrently": false,
749 "method": "btree",
750 "with": {}
751 },
752 "replies_trust_status_idx": {
753 "name": "replies_trust_status_idx",
754 "columns": [
755 {
756 "expression": "trust_status",
757 "isExpression": false,
758 "asc": true,
759 "nulls": "last"
760 }
761 ],
762 "isUnique": false,
763 "concurrently": false,
764 "method": "btree",
765 "with": {}
766 },
767 "replies_root_uri_created_at_idx": {
768 "name": "replies_root_uri_created_at_idx",
769 "columns": [
770 {
771 "expression": "root_uri",
772 "isExpression": false,
773 "asc": true,
774 "nulls": "last"
775 },
776 {
777 "expression": "created_at",
778 "isExpression": false,
779 "asc": true,
780 "nulls": "last"
781 }
782 ],
783 "isUnique": false,
784 "concurrently": false,
785 "method": "btree",
786 "with": {}
787 }
788 },
789 "foreignKeys": {},
790 "compositePrimaryKeys": {},
791 "uniqueConstraints": {},
792 "policies": {
793 "tenant_isolation": {
794 "name": "tenant_isolation",
795 "as": "PERMISSIVE",
796 "for": "ALL",
797 "to": ["barazo_app"],
798 "using": "community_did = current_setting('app.current_community_did', true)",
799 "withCheck": "community_did = current_setting('app.current_community_did', true)"
800 }
801 },
802 "checkConstraints": {},
803 "isRLSEnabled": true
804 },
805 "public.reactions": {
806 "name": "reactions",
807 "schema": "",
808 "columns": {
809 "uri": {
810 "name": "uri",
811 "type": "text",
812 "primaryKey": true,
813 "notNull": true
814 },
815 "rkey": {
816 "name": "rkey",
817 "type": "text",
818 "primaryKey": false,
819 "notNull": true
820 },
821 "author_did": {
822 "name": "author_did",
823 "type": "text",
824 "primaryKey": false,
825 "notNull": true
826 },
827 "subject_uri": {
828 "name": "subject_uri",
829 "type": "text",
830 "primaryKey": false,
831 "notNull": true
832 },
833 "subject_cid": {
834 "name": "subject_cid",
835 "type": "text",
836 "primaryKey": false,
837 "notNull": true
838 },
839 "type": {
840 "name": "type",
841 "type": "text",
842 "primaryKey": false,
843 "notNull": true
844 },
845 "community_did": {
846 "name": "community_did",
847 "type": "text",
848 "primaryKey": false,
849 "notNull": true
850 },
851 "cid": {
852 "name": "cid",
853 "type": "text",
854 "primaryKey": false,
855 "notNull": true
856 },
857 "created_at": {
858 "name": "created_at",
859 "type": "timestamp with time zone",
860 "primaryKey": false,
861 "notNull": true
862 },
863 "indexed_at": {
864 "name": "indexed_at",
865 "type": "timestamp with time zone",
866 "primaryKey": false,
867 "notNull": true,
868 "default": "now()"
869 }
870 },
871 "indexes": {
872 "reactions_author_did_idx": {
873 "name": "reactions_author_did_idx",
874 "columns": [
875 {
876 "expression": "author_did",
877 "isExpression": false,
878 "asc": true,
879 "nulls": "last"
880 }
881 ],
882 "isUnique": false,
883 "concurrently": false,
884 "method": "btree",
885 "with": {}
886 },
887 "reactions_subject_uri_idx": {
888 "name": "reactions_subject_uri_idx",
889 "columns": [
890 {
891 "expression": "subject_uri",
892 "isExpression": false,
893 "asc": true,
894 "nulls": "last"
895 }
896 ],
897 "isUnique": false,
898 "concurrently": false,
899 "method": "btree",
900 "with": {}
901 },
902 "reactions_community_did_idx": {
903 "name": "reactions_community_did_idx",
904 "columns": [
905 {
906 "expression": "community_did",
907 "isExpression": false,
908 "asc": true,
909 "nulls": "last"
910 }
911 ],
912 "isUnique": false,
913 "concurrently": false,
914 "method": "btree",
915 "with": {}
916 },
917 "reactions_subject_uri_type_idx": {
918 "name": "reactions_subject_uri_type_idx",
919 "columns": [
920 {
921 "expression": "subject_uri",
922 "isExpression": false,
923 "asc": true,
924 "nulls": "last"
925 },
926 {
927 "expression": "type",
928 "isExpression": false,
929 "asc": true,
930 "nulls": "last"
931 }
932 ],
933 "isUnique": false,
934 "concurrently": false,
935 "method": "btree",
936 "with": {}
937 }
938 },
939 "foreignKeys": {},
940 "compositePrimaryKeys": {},
941 "uniqueConstraints": {
942 "reactions_author_subject_type_uniq": {
943 "name": "reactions_author_subject_type_uniq",
944 "nullsNotDistinct": false,
945 "columns": ["author_did", "subject_uri", "type"]
946 }
947 },
948 "policies": {
949 "tenant_isolation": {
950 "name": "tenant_isolation",
951 "as": "PERMISSIVE",
952 "for": "ALL",
953 "to": ["barazo_app"],
954 "using": "community_did = current_setting('app.current_community_did', true)",
955 "withCheck": "community_did = current_setting('app.current_community_did', true)"
956 }
957 },
958 "checkConstraints": {},
959 "isRLSEnabled": true
960 },
961 "public.votes": {
962 "name": "votes",
963 "schema": "",
964 "columns": {
965 "uri": {
966 "name": "uri",
967 "type": "text",
968 "primaryKey": true,
969 "notNull": true
970 },
971 "rkey": {
972 "name": "rkey",
973 "type": "text",
974 "primaryKey": false,
975 "notNull": true
976 },
977 "author_did": {
978 "name": "author_did",
979 "type": "text",
980 "primaryKey": false,
981 "notNull": true
982 },
983 "subject_uri": {
984 "name": "subject_uri",
985 "type": "text",
986 "primaryKey": false,
987 "notNull": true
988 },
989 "subject_cid": {
990 "name": "subject_cid",
991 "type": "text",
992 "primaryKey": false,
993 "notNull": true
994 },
995 "direction": {
996 "name": "direction",
997 "type": "text",
998 "primaryKey": false,
999 "notNull": true
1000 },
1001 "community_did": {
1002 "name": "community_did",
1003 "type": "text",
1004 "primaryKey": false,
1005 "notNull": true
1006 },
1007 "cid": {
1008 "name": "cid",
1009 "type": "text",
1010 "primaryKey": false,
1011 "notNull": true
1012 },
1013 "created_at": {
1014 "name": "created_at",
1015 "type": "timestamp with time zone",
1016 "primaryKey": false,
1017 "notNull": true
1018 },
1019 "indexed_at": {
1020 "name": "indexed_at",
1021 "type": "timestamp with time zone",
1022 "primaryKey": false,
1023 "notNull": true,
1024 "default": "now()"
1025 }
1026 },
1027 "indexes": {
1028 "votes_author_did_idx": {
1029 "name": "votes_author_did_idx",
1030 "columns": [
1031 {
1032 "expression": "author_did",
1033 "isExpression": false,
1034 "asc": true,
1035 "nulls": "last"
1036 }
1037 ],
1038 "isUnique": false,
1039 "concurrently": false,
1040 "method": "btree",
1041 "with": {}
1042 },
1043 "votes_subject_uri_idx": {
1044 "name": "votes_subject_uri_idx",
1045 "columns": [
1046 {
1047 "expression": "subject_uri",
1048 "isExpression": false,
1049 "asc": true,
1050 "nulls": "last"
1051 }
1052 ],
1053 "isUnique": false,
1054 "concurrently": false,
1055 "method": "btree",
1056 "with": {}
1057 },
1058 "votes_community_did_idx": {
1059 "name": "votes_community_did_idx",
1060 "columns": [
1061 {
1062 "expression": "community_did",
1063 "isExpression": false,
1064 "asc": true,
1065 "nulls": "last"
1066 }
1067 ],
1068 "isUnique": false,
1069 "concurrently": false,
1070 "method": "btree",
1071 "with": {}
1072 }
1073 },
1074 "foreignKeys": {},
1075 "compositePrimaryKeys": {},
1076 "uniqueConstraints": {
1077 "votes_author_subject_uniq": {
1078 "name": "votes_author_subject_uniq",
1079 "nullsNotDistinct": false,
1080 "columns": ["author_did", "subject_uri"]
1081 }
1082 },
1083 "policies": {},
1084 "checkConstraints": {},
1085 "isRLSEnabled": false
1086 },
1087 "public.tracked_repos": {
1088 "name": "tracked_repos",
1089 "schema": "",
1090 "columns": {
1091 "did": {
1092 "name": "did",
1093 "type": "text",
1094 "primaryKey": true,
1095 "notNull": true
1096 },
1097 "tracked_at": {
1098 "name": "tracked_at",
1099 "type": "timestamp with time zone",
1100 "primaryKey": false,
1101 "notNull": true,
1102 "default": "now()"
1103 }
1104 },
1105 "indexes": {},
1106 "foreignKeys": {},
1107 "compositePrimaryKeys": {},
1108 "uniqueConstraints": {},
1109 "policies": {},
1110 "checkConstraints": {},
1111 "isRLSEnabled": false
1112 },
1113 "public.community_settings": {
1114 "name": "community_settings",
1115 "schema": "",
1116 "columns": {
1117 "community_did": {
1118 "name": "community_did",
1119 "type": "text",
1120 "primaryKey": true,
1121 "notNull": true
1122 },
1123 "domains": {
1124 "name": "domains",
1125 "type": "jsonb",
1126 "primaryKey": false,
1127 "notNull": true,
1128 "default": "'[]'::jsonb"
1129 },
1130 "initialized": {
1131 "name": "initialized",
1132 "type": "boolean",
1133 "primaryKey": false,
1134 "notNull": true,
1135 "default": false
1136 },
1137 "admin_did": {
1138 "name": "admin_did",
1139 "type": "text",
1140 "primaryKey": false,
1141 "notNull": false
1142 },
1143 "community_name": {
1144 "name": "community_name",
1145 "type": "text",
1146 "primaryKey": false,
1147 "notNull": true,
1148 "default": "'Barazo Community'"
1149 },
1150 "maturity_rating": {
1151 "name": "maturity_rating",
1152 "type": "text",
1153 "primaryKey": false,
1154 "notNull": true,
1155 "default": "'safe'"
1156 },
1157 "reaction_set": {
1158 "name": "reaction_set",
1159 "type": "jsonb",
1160 "primaryKey": false,
1161 "notNull": true,
1162 "default": "'[\"like\"]'::jsonb"
1163 },
1164 "moderation_thresholds": {
1165 "name": "moderation_thresholds",
1166 "type": "jsonb",
1167 "primaryKey": false,
1168 "notNull": true,
1169 "default": "'{\"autoBlockReportCount\":5,\"warnThreshold\":3,\"firstPostQueueCount\":3,\"newAccountDays\":7,\"newAccountWriteRatePerMin\":3,\"establishedWriteRatePerMin\":10,\"linkHoldEnabled\":true,\"topicCreationDelayEnabled\":true,\"burstPostCount\":5,\"burstWindowMinutes\":10,\"trustedPostThreshold\":10}'::jsonb"
1170 },
1171 "word_filter": {
1172 "name": "word_filter",
1173 "type": "jsonb",
1174 "primaryKey": false,
1175 "notNull": true,
1176 "default": "'[]'::jsonb"
1177 },
1178 "jurisdiction_country": {
1179 "name": "jurisdiction_country",
1180 "type": "text",
1181 "primaryKey": false,
1182 "notNull": false
1183 },
1184 "age_threshold": {
1185 "name": "age_threshold",
1186 "type": "integer",
1187 "primaryKey": false,
1188 "notNull": true,
1189 "default": 16
1190 },
1191 "require_login_for_mature": {
1192 "name": "require_login_for_mature",
1193 "type": "boolean",
1194 "primaryKey": false,
1195 "notNull": true,
1196 "default": true
1197 },
1198 "community_description": {
1199 "name": "community_description",
1200 "type": "text",
1201 "primaryKey": false,
1202 "notNull": false
1203 },
1204 "handle": {
1205 "name": "handle",
1206 "type": "text",
1207 "primaryKey": false,
1208 "notNull": false
1209 },
1210 "service_endpoint": {
1211 "name": "service_endpoint",
1212 "type": "text",
1213 "primaryKey": false,
1214 "notNull": false
1215 },
1216 "signing_key": {
1217 "name": "signing_key",
1218 "type": "text",
1219 "primaryKey": false,
1220 "notNull": false
1221 },
1222 "rotation_key": {
1223 "name": "rotation_key",
1224 "type": "text",
1225 "primaryKey": false,
1226 "notNull": false
1227 },
1228 "community_logo_url": {
1229 "name": "community_logo_url",
1230 "type": "text",
1231 "primaryKey": false,
1232 "notNull": false
1233 },
1234 "favicon_url": {
1235 "name": "favicon_url",
1236 "type": "text",
1237 "primaryKey": false,
1238 "notNull": false
1239 },
1240 "primary_color": {
1241 "name": "primary_color",
1242 "type": "text",
1243 "primaryKey": false,
1244 "notNull": false
1245 },
1246 "accent_color": {
1247 "name": "accent_color",
1248 "type": "text",
1249 "primaryKey": false,
1250 "notNull": false
1251 },
1252 "created_at": {
1253 "name": "created_at",
1254 "type": "timestamp with time zone",
1255 "primaryKey": false,
1256 "notNull": true,
1257 "default": "now()"
1258 },
1259 "updated_at": {
1260 "name": "updated_at",
1261 "type": "timestamp with time zone",
1262 "primaryKey": false,
1263 "notNull": true,
1264 "default": "now()"
1265 }
1266 },
1267 "indexes": {},
1268 "foreignKeys": {},
1269 "compositePrimaryKeys": {},
1270 "uniqueConstraints": {},
1271 "policies": {
1272 "tenant_isolation": {
1273 "name": "tenant_isolation",
1274 "as": "PERMISSIVE",
1275 "for": "ALL",
1276 "to": ["barazo_app"],
1277 "using": "community_did = current_setting('app.current_community_did', true)",
1278 "withCheck": "community_did = current_setting('app.current_community_did', true)"
1279 }
1280 },
1281 "checkConstraints": {},
1282 "isRLSEnabled": true
1283 },
1284 "public.categories": {
1285 "name": "categories",
1286 "schema": "",
1287 "columns": {
1288 "id": {
1289 "name": "id",
1290 "type": "text",
1291 "primaryKey": true,
1292 "notNull": true
1293 },
1294 "slug": {
1295 "name": "slug",
1296 "type": "text",
1297 "primaryKey": false,
1298 "notNull": true
1299 },
1300 "name": {
1301 "name": "name",
1302 "type": "text",
1303 "primaryKey": false,
1304 "notNull": true
1305 },
1306 "description": {
1307 "name": "description",
1308 "type": "text",
1309 "primaryKey": false,
1310 "notNull": false
1311 },
1312 "parent_id": {
1313 "name": "parent_id",
1314 "type": "text",
1315 "primaryKey": false,
1316 "notNull": false
1317 },
1318 "sort_order": {
1319 "name": "sort_order",
1320 "type": "integer",
1321 "primaryKey": false,
1322 "notNull": true,
1323 "default": 0
1324 },
1325 "community_did": {
1326 "name": "community_did",
1327 "type": "text",
1328 "primaryKey": false,
1329 "notNull": true
1330 },
1331 "maturity_rating": {
1332 "name": "maturity_rating",
1333 "type": "text",
1334 "primaryKey": false,
1335 "notNull": true,
1336 "default": "'safe'"
1337 },
1338 "created_at": {
1339 "name": "created_at",
1340 "type": "timestamp with time zone",
1341 "primaryKey": false,
1342 "notNull": true,
1343 "default": "now()"
1344 },
1345 "updated_at": {
1346 "name": "updated_at",
1347 "type": "timestamp with time zone",
1348 "primaryKey": false,
1349 "notNull": true,
1350 "default": "now()"
1351 }
1352 },
1353 "indexes": {
1354 "categories_slug_community_did_idx": {
1355 "name": "categories_slug_community_did_idx",
1356 "columns": [
1357 {
1358 "expression": "slug",
1359 "isExpression": false,
1360 "asc": true,
1361 "nulls": "last"
1362 },
1363 {
1364 "expression": "community_did",
1365 "isExpression": false,
1366 "asc": true,
1367 "nulls": "last"
1368 }
1369 ],
1370 "isUnique": true,
1371 "concurrently": false,
1372 "method": "btree",
1373 "with": {}
1374 },
1375 "categories_parent_id_idx": {
1376 "name": "categories_parent_id_idx",
1377 "columns": [
1378 {
1379 "expression": "parent_id",
1380 "isExpression": false,
1381 "asc": true,
1382 "nulls": "last"
1383 }
1384 ],
1385 "isUnique": false,
1386 "concurrently": false,
1387 "method": "btree",
1388 "with": {}
1389 },
1390 "categories_community_did_idx": {
1391 "name": "categories_community_did_idx",
1392 "columns": [
1393 {
1394 "expression": "community_did",
1395 "isExpression": false,
1396 "asc": true,
1397 "nulls": "last"
1398 }
1399 ],
1400 "isUnique": false,
1401 "concurrently": false,
1402 "method": "btree",
1403 "with": {}
1404 },
1405 "categories_maturity_rating_idx": {
1406 "name": "categories_maturity_rating_idx",
1407 "columns": [
1408 {
1409 "expression": "maturity_rating",
1410 "isExpression": false,
1411 "asc": true,
1412 "nulls": "last"
1413 }
1414 ],
1415 "isUnique": false,
1416 "concurrently": false,
1417 "method": "btree",
1418 "with": {}
1419 }
1420 },
1421 "foreignKeys": {
1422 "categories_parent_id_fk": {
1423 "name": "categories_parent_id_fk",
1424 "tableFrom": "categories",
1425 "tableTo": "categories",
1426 "columnsFrom": ["parent_id"],
1427 "columnsTo": ["id"],
1428 "onDelete": "set null",
1429 "onUpdate": "no action"
1430 }
1431 },
1432 "compositePrimaryKeys": {},
1433 "uniqueConstraints": {},
1434 "policies": {
1435 "tenant_isolation": {
1436 "name": "tenant_isolation",
1437 "as": "PERMISSIVE",
1438 "for": "ALL",
1439 "to": ["barazo_app"],
1440 "using": "community_did = current_setting('app.current_community_did', true)",
1441 "withCheck": "community_did = current_setting('app.current_community_did', true)"
1442 }
1443 },
1444 "checkConstraints": {},
1445 "isRLSEnabled": true
1446 },
1447 "public.moderation_actions": {
1448 "name": "moderation_actions",
1449 "schema": "",
1450 "columns": {
1451 "id": {
1452 "name": "id",
1453 "type": "serial",
1454 "primaryKey": true,
1455 "notNull": true
1456 },
1457 "action": {
1458 "name": "action",
1459 "type": "text",
1460 "primaryKey": false,
1461 "notNull": true
1462 },
1463 "target_uri": {
1464 "name": "target_uri",
1465 "type": "text",
1466 "primaryKey": false,
1467 "notNull": false
1468 },
1469 "target_did": {
1470 "name": "target_did",
1471 "type": "text",
1472 "primaryKey": false,
1473 "notNull": false
1474 },
1475 "moderator_did": {
1476 "name": "moderator_did",
1477 "type": "text",
1478 "primaryKey": false,
1479 "notNull": true
1480 },
1481 "community_did": {
1482 "name": "community_did",
1483 "type": "text",
1484 "primaryKey": false,
1485 "notNull": true
1486 },
1487 "reason": {
1488 "name": "reason",
1489 "type": "text",
1490 "primaryKey": false,
1491 "notNull": false
1492 },
1493 "created_at": {
1494 "name": "created_at",
1495 "type": "timestamp with time zone",
1496 "primaryKey": false,
1497 "notNull": true,
1498 "default": "now()"
1499 }
1500 },
1501 "indexes": {
1502 "mod_actions_moderator_did_idx": {
1503 "name": "mod_actions_moderator_did_idx",
1504 "columns": [
1505 {
1506 "expression": "moderator_did",
1507 "isExpression": false,
1508 "asc": true,
1509 "nulls": "last"
1510 }
1511 ],
1512 "isUnique": false,
1513 "concurrently": false,
1514 "method": "btree",
1515 "with": {}
1516 },
1517 "mod_actions_community_did_idx": {
1518 "name": "mod_actions_community_did_idx",
1519 "columns": [
1520 {
1521 "expression": "community_did",
1522 "isExpression": false,
1523 "asc": true,
1524 "nulls": "last"
1525 }
1526 ],
1527 "isUnique": false,
1528 "concurrently": false,
1529 "method": "btree",
1530 "with": {}
1531 },
1532 "mod_actions_created_at_idx": {
1533 "name": "mod_actions_created_at_idx",
1534 "columns": [
1535 {
1536 "expression": "created_at",
1537 "isExpression": false,
1538 "asc": true,
1539 "nulls": "last"
1540 }
1541 ],
1542 "isUnique": false,
1543 "concurrently": false,
1544 "method": "btree",
1545 "with": {}
1546 },
1547 "mod_actions_target_uri_idx": {
1548 "name": "mod_actions_target_uri_idx",
1549 "columns": [
1550 {
1551 "expression": "target_uri",
1552 "isExpression": false,
1553 "asc": true,
1554 "nulls": "last"
1555 }
1556 ],
1557 "isUnique": false,
1558 "concurrently": false,
1559 "method": "btree",
1560 "with": {}
1561 },
1562 "mod_actions_target_did_idx": {
1563 "name": "mod_actions_target_did_idx",
1564 "columns": [
1565 {
1566 "expression": "target_did",
1567 "isExpression": false,
1568 "asc": true,
1569 "nulls": "last"
1570 }
1571 ],
1572 "isUnique": false,
1573 "concurrently": false,
1574 "method": "btree",
1575 "with": {}
1576 }
1577 },
1578 "foreignKeys": {},
1579 "compositePrimaryKeys": {},
1580 "uniqueConstraints": {},
1581 "policies": {
1582 "tenant_isolation": {
1583 "name": "tenant_isolation",
1584 "as": "PERMISSIVE",
1585 "for": "ALL",
1586 "to": ["barazo_app"],
1587 "using": "community_did = current_setting('app.current_community_did', true)",
1588 "withCheck": "community_did = current_setting('app.current_community_did', true)"
1589 }
1590 },
1591 "checkConstraints": {},
1592 "isRLSEnabled": true
1593 },
1594 "public.reports": {
1595 "name": "reports",
1596 "schema": "",
1597 "columns": {
1598 "id": {
1599 "name": "id",
1600 "type": "serial",
1601 "primaryKey": true,
1602 "notNull": true
1603 },
1604 "reporter_did": {
1605 "name": "reporter_did",
1606 "type": "text",
1607 "primaryKey": false,
1608 "notNull": true
1609 },
1610 "target_uri": {
1611 "name": "target_uri",
1612 "type": "text",
1613 "primaryKey": false,
1614 "notNull": true
1615 },
1616 "target_did": {
1617 "name": "target_did",
1618 "type": "text",
1619 "primaryKey": false,
1620 "notNull": true
1621 },
1622 "reason_type": {
1623 "name": "reason_type",
1624 "type": "text",
1625 "primaryKey": false,
1626 "notNull": true
1627 },
1628 "description": {
1629 "name": "description",
1630 "type": "text",
1631 "primaryKey": false,
1632 "notNull": false
1633 },
1634 "community_did": {
1635 "name": "community_did",
1636 "type": "text",
1637 "primaryKey": false,
1638 "notNull": true
1639 },
1640 "status": {
1641 "name": "status",
1642 "type": "text",
1643 "primaryKey": false,
1644 "notNull": true,
1645 "default": "'pending'"
1646 },
1647 "resolution_type": {
1648 "name": "resolution_type",
1649 "type": "text",
1650 "primaryKey": false,
1651 "notNull": false
1652 },
1653 "resolved_by": {
1654 "name": "resolved_by",
1655 "type": "text",
1656 "primaryKey": false,
1657 "notNull": false
1658 },
1659 "resolved_at": {
1660 "name": "resolved_at",
1661 "type": "timestamp with time zone",
1662 "primaryKey": false,
1663 "notNull": false
1664 },
1665 "appeal_reason": {
1666 "name": "appeal_reason",
1667 "type": "text",
1668 "primaryKey": false,
1669 "notNull": false
1670 },
1671 "appealed_at": {
1672 "name": "appealed_at",
1673 "type": "timestamp with time zone",
1674 "primaryKey": false,
1675 "notNull": false
1676 },
1677 "appeal_status": {
1678 "name": "appeal_status",
1679 "type": "text",
1680 "primaryKey": false,
1681 "notNull": true,
1682 "default": "'none'"
1683 },
1684 "created_at": {
1685 "name": "created_at",
1686 "type": "timestamp with time zone",
1687 "primaryKey": false,
1688 "notNull": true,
1689 "default": "now()"
1690 }
1691 },
1692 "indexes": {
1693 "reports_reporter_did_idx": {
1694 "name": "reports_reporter_did_idx",
1695 "columns": [
1696 {
1697 "expression": "reporter_did",
1698 "isExpression": false,
1699 "asc": true,
1700 "nulls": "last"
1701 }
1702 ],
1703 "isUnique": false,
1704 "concurrently": false,
1705 "method": "btree",
1706 "with": {}
1707 },
1708 "reports_target_uri_idx": {
1709 "name": "reports_target_uri_idx",
1710 "columns": [
1711 {
1712 "expression": "target_uri",
1713 "isExpression": false,
1714 "asc": true,
1715 "nulls": "last"
1716 }
1717 ],
1718 "isUnique": false,
1719 "concurrently": false,
1720 "method": "btree",
1721 "with": {}
1722 },
1723 "reports_target_did_idx": {
1724 "name": "reports_target_did_idx",
1725 "columns": [
1726 {
1727 "expression": "target_did",
1728 "isExpression": false,
1729 "asc": true,
1730 "nulls": "last"
1731 }
1732 ],
1733 "isUnique": false,
1734 "concurrently": false,
1735 "method": "btree",
1736 "with": {}
1737 },
1738 "reports_community_did_idx": {
1739 "name": "reports_community_did_idx",
1740 "columns": [
1741 {
1742 "expression": "community_did",
1743 "isExpression": false,
1744 "asc": true,
1745 "nulls": "last"
1746 }
1747 ],
1748 "isUnique": false,
1749 "concurrently": false,
1750 "method": "btree",
1751 "with": {}
1752 },
1753 "reports_status_idx": {
1754 "name": "reports_status_idx",
1755 "columns": [
1756 {
1757 "expression": "status",
1758 "isExpression": false,
1759 "asc": true,
1760 "nulls": "last"
1761 }
1762 ],
1763 "isUnique": false,
1764 "concurrently": false,
1765 "method": "btree",
1766 "with": {}
1767 },
1768 "reports_created_at_idx": {
1769 "name": "reports_created_at_idx",
1770 "columns": [
1771 {
1772 "expression": "created_at",
1773 "isExpression": false,
1774 "asc": true,
1775 "nulls": "last"
1776 }
1777 ],
1778 "isUnique": false,
1779 "concurrently": false,
1780 "method": "btree",
1781 "with": {}
1782 },
1783 "reports_unique_reporter_target_idx": {
1784 "name": "reports_unique_reporter_target_idx",
1785 "columns": [
1786 {
1787 "expression": "reporter_did",
1788 "isExpression": false,
1789 "asc": true,
1790 "nulls": "last"
1791 },
1792 {
1793 "expression": "target_uri",
1794 "isExpression": false,
1795 "asc": true,
1796 "nulls": "last"
1797 },
1798 {
1799 "expression": "community_did",
1800 "isExpression": false,
1801 "asc": true,
1802 "nulls": "last"
1803 }
1804 ],
1805 "isUnique": true,
1806 "concurrently": false,
1807 "method": "btree",
1808 "with": {}
1809 }
1810 },
1811 "foreignKeys": {},
1812 "compositePrimaryKeys": {},
1813 "uniqueConstraints": {},
1814 "policies": {
1815 "tenant_isolation": {
1816 "name": "tenant_isolation",
1817 "as": "PERMISSIVE",
1818 "for": "ALL",
1819 "to": ["barazo_app"],
1820 "using": "community_did = current_setting('app.current_community_did', true)",
1821 "withCheck": "community_did = current_setting('app.current_community_did', true)"
1822 }
1823 },
1824 "checkConstraints": {},
1825 "isRLSEnabled": true
1826 },
1827 "public.notifications": {
1828 "name": "notifications",
1829 "schema": "",
1830 "columns": {
1831 "id": {
1832 "name": "id",
1833 "type": "serial",
1834 "primaryKey": true,
1835 "notNull": true
1836 },
1837 "recipient_did": {
1838 "name": "recipient_did",
1839 "type": "text",
1840 "primaryKey": false,
1841 "notNull": true
1842 },
1843 "type": {
1844 "name": "type",
1845 "type": "text",
1846 "primaryKey": false,
1847 "notNull": true
1848 },
1849 "subject_uri": {
1850 "name": "subject_uri",
1851 "type": "text",
1852 "primaryKey": false,
1853 "notNull": true
1854 },
1855 "actor_did": {
1856 "name": "actor_did",
1857 "type": "text",
1858 "primaryKey": false,
1859 "notNull": true
1860 },
1861 "community_did": {
1862 "name": "community_did",
1863 "type": "text",
1864 "primaryKey": false,
1865 "notNull": true
1866 },
1867 "read": {
1868 "name": "read",
1869 "type": "boolean",
1870 "primaryKey": false,
1871 "notNull": true,
1872 "default": false
1873 },
1874 "created_at": {
1875 "name": "created_at",
1876 "type": "timestamp with time zone",
1877 "primaryKey": false,
1878 "notNull": true,
1879 "default": "now()"
1880 }
1881 },
1882 "indexes": {
1883 "notifications_recipient_did_idx": {
1884 "name": "notifications_recipient_did_idx",
1885 "columns": [
1886 {
1887 "expression": "recipient_did",
1888 "isExpression": false,
1889 "asc": true,
1890 "nulls": "last"
1891 }
1892 ],
1893 "isUnique": false,
1894 "concurrently": false,
1895 "method": "btree",
1896 "with": {}
1897 },
1898 "notifications_recipient_read_idx": {
1899 "name": "notifications_recipient_read_idx",
1900 "columns": [
1901 {
1902 "expression": "recipient_did",
1903 "isExpression": false,
1904 "asc": true,
1905 "nulls": "last"
1906 },
1907 {
1908 "expression": "read",
1909 "isExpression": false,
1910 "asc": true,
1911 "nulls": "last"
1912 }
1913 ],
1914 "isUnique": false,
1915 "concurrently": false,
1916 "method": "btree",
1917 "with": {}
1918 },
1919 "notifications_created_at_idx": {
1920 "name": "notifications_created_at_idx",
1921 "columns": [
1922 {
1923 "expression": "created_at",
1924 "isExpression": false,
1925 "asc": true,
1926 "nulls": "last"
1927 }
1928 ],
1929 "isUnique": false,
1930 "concurrently": false,
1931 "method": "btree",
1932 "with": {}
1933 }
1934 },
1935 "foreignKeys": {},
1936 "compositePrimaryKeys": {},
1937 "uniqueConstraints": {},
1938 "policies": {
1939 "tenant_isolation": {
1940 "name": "tenant_isolation",
1941 "as": "PERMISSIVE",
1942 "for": "ALL",
1943 "to": ["barazo_app"],
1944 "using": "community_did = current_setting('app.current_community_did', true)",
1945 "withCheck": "community_did = current_setting('app.current_community_did', true)"
1946 }
1947 },
1948 "checkConstraints": {},
1949 "isRLSEnabled": true
1950 },
1951 "public.user_community_preferences": {
1952 "name": "user_community_preferences",
1953 "schema": "",
1954 "columns": {
1955 "did": {
1956 "name": "did",
1957 "type": "text",
1958 "primaryKey": false,
1959 "notNull": true
1960 },
1961 "community_did": {
1962 "name": "community_did",
1963 "type": "text",
1964 "primaryKey": false,
1965 "notNull": true
1966 },
1967 "maturity_override": {
1968 "name": "maturity_override",
1969 "type": "text",
1970 "primaryKey": false,
1971 "notNull": false
1972 },
1973 "muted_words": {
1974 "name": "muted_words",
1975 "type": "jsonb",
1976 "primaryKey": false,
1977 "notNull": false
1978 },
1979 "blocked_dids": {
1980 "name": "blocked_dids",
1981 "type": "jsonb",
1982 "primaryKey": false,
1983 "notNull": false
1984 },
1985 "muted_dids": {
1986 "name": "muted_dids",
1987 "type": "jsonb",
1988 "primaryKey": false,
1989 "notNull": false
1990 },
1991 "notification_prefs": {
1992 "name": "notification_prefs",
1993 "type": "jsonb",
1994 "primaryKey": false,
1995 "notNull": false
1996 },
1997 "updated_at": {
1998 "name": "updated_at",
1999 "type": "timestamp with time zone",
2000 "primaryKey": false,
2001 "notNull": true,
2002 "default": "now()"
2003 }
2004 },
2005 "indexes": {
2006 "user_community_prefs_did_idx": {
2007 "name": "user_community_prefs_did_idx",
2008 "columns": [
2009 {
2010 "expression": "did",
2011 "isExpression": false,
2012 "asc": true,
2013 "nulls": "last"
2014 }
2015 ],
2016 "isUnique": false,
2017 "concurrently": false,
2018 "method": "btree",
2019 "with": {}
2020 },
2021 "user_community_prefs_community_idx": {
2022 "name": "user_community_prefs_community_idx",
2023 "columns": [
2024 {
2025 "expression": "community_did",
2026 "isExpression": false,
2027 "asc": true,
2028 "nulls": "last"
2029 }
2030 ],
2031 "isUnique": false,
2032 "concurrently": false,
2033 "method": "btree",
2034 "with": {}
2035 }
2036 },
2037 "foreignKeys": {},
2038 "compositePrimaryKeys": {
2039 "user_community_preferences_did_community_did_pk": {
2040 "name": "user_community_preferences_did_community_did_pk",
2041 "columns": ["did", "community_did"]
2042 }
2043 },
2044 "uniqueConstraints": {},
2045 "policies": {
2046 "tenant_isolation": {
2047 "name": "tenant_isolation",
2048 "as": "PERMISSIVE",
2049 "for": "ALL",
2050 "to": ["barazo_app"],
2051 "using": "community_did = current_setting('app.current_community_did', true)",
2052 "withCheck": "community_did = current_setting('app.current_community_did', true)"
2053 }
2054 },
2055 "checkConstraints": {},
2056 "isRLSEnabled": true
2057 },
2058 "public.user_preferences": {
2059 "name": "user_preferences",
2060 "schema": "",
2061 "columns": {
2062 "did": {
2063 "name": "did",
2064 "type": "text",
2065 "primaryKey": true,
2066 "notNull": true
2067 },
2068 "maturity_level": {
2069 "name": "maturity_level",
2070 "type": "text",
2071 "primaryKey": false,
2072 "notNull": true,
2073 "default": "'sfw'"
2074 },
2075 "declared_age": {
2076 "name": "declared_age",
2077 "type": "integer",
2078 "primaryKey": false,
2079 "notNull": false
2080 },
2081 "muted_words": {
2082 "name": "muted_words",
2083 "type": "jsonb",
2084 "primaryKey": false,
2085 "notNull": true,
2086 "default": "'[]'::jsonb"
2087 },
2088 "blocked_dids": {
2089 "name": "blocked_dids",
2090 "type": "jsonb",
2091 "primaryKey": false,
2092 "notNull": true,
2093 "default": "'[]'::jsonb"
2094 },
2095 "muted_dids": {
2096 "name": "muted_dids",
2097 "type": "jsonb",
2098 "primaryKey": false,
2099 "notNull": true,
2100 "default": "'[]'::jsonb"
2101 },
2102 "cross_post_bluesky": {
2103 "name": "cross_post_bluesky",
2104 "type": "boolean",
2105 "primaryKey": false,
2106 "notNull": true,
2107 "default": false
2108 },
2109 "cross_post_frontpage": {
2110 "name": "cross_post_frontpage",
2111 "type": "boolean",
2112 "primaryKey": false,
2113 "notNull": true,
2114 "default": false
2115 },
2116 "cross_post_scopes_granted": {
2117 "name": "cross_post_scopes_granted",
2118 "type": "boolean",
2119 "primaryKey": false,
2120 "notNull": true,
2121 "default": false
2122 },
2123 "updated_at": {
2124 "name": "updated_at",
2125 "type": "timestamp with time zone",
2126 "primaryKey": false,
2127 "notNull": true,
2128 "default": "now()"
2129 }
2130 },
2131 "indexes": {},
2132 "foreignKeys": {},
2133 "compositePrimaryKeys": {},
2134 "uniqueConstraints": {},
2135 "policies": {},
2136 "checkConstraints": {},
2137 "isRLSEnabled": false
2138 },
2139 "public.cross_posts": {
2140 "name": "cross_posts",
2141 "schema": "",
2142 "columns": {
2143 "id": {
2144 "name": "id",
2145 "type": "text",
2146 "primaryKey": true,
2147 "notNull": true
2148 },
2149 "topic_uri": {
2150 "name": "topic_uri",
2151 "type": "text",
2152 "primaryKey": false,
2153 "notNull": true
2154 },
2155 "service": {
2156 "name": "service",
2157 "type": "text",
2158 "primaryKey": false,
2159 "notNull": true
2160 },
2161 "cross_post_uri": {
2162 "name": "cross_post_uri",
2163 "type": "text",
2164 "primaryKey": false,
2165 "notNull": true
2166 },
2167 "cross_post_cid": {
2168 "name": "cross_post_cid",
2169 "type": "text",
2170 "primaryKey": false,
2171 "notNull": true
2172 },
2173 "author_did": {
2174 "name": "author_did",
2175 "type": "text",
2176 "primaryKey": false,
2177 "notNull": true
2178 },
2179 "created_at": {
2180 "name": "created_at",
2181 "type": "timestamp with time zone",
2182 "primaryKey": false,
2183 "notNull": true,
2184 "default": "now()"
2185 }
2186 },
2187 "indexes": {
2188 "cross_posts_topic_uri_idx": {
2189 "name": "cross_posts_topic_uri_idx",
2190 "columns": [
2191 {
2192 "expression": "topic_uri",
2193 "isExpression": false,
2194 "asc": true,
2195 "nulls": "last"
2196 }
2197 ],
2198 "isUnique": false,
2199 "concurrently": false,
2200 "method": "btree",
2201 "with": {}
2202 },
2203 "cross_posts_author_did_idx": {
2204 "name": "cross_posts_author_did_idx",
2205 "columns": [
2206 {
2207 "expression": "author_did",
2208 "isExpression": false,
2209 "asc": true,
2210 "nulls": "last"
2211 }
2212 ],
2213 "isUnique": false,
2214 "concurrently": false,
2215 "method": "btree",
2216 "with": {}
2217 }
2218 },
2219 "foreignKeys": {},
2220 "compositePrimaryKeys": {},
2221 "uniqueConstraints": {},
2222 "policies": {},
2223 "checkConstraints": {},
2224 "isRLSEnabled": false
2225 },
2226 "public.community_onboarding_fields": {
2227 "name": "community_onboarding_fields",
2228 "schema": "",
2229 "columns": {
2230 "id": {
2231 "name": "id",
2232 "type": "text",
2233 "primaryKey": true,
2234 "notNull": true
2235 },
2236 "community_did": {
2237 "name": "community_did",
2238 "type": "text",
2239 "primaryKey": false,
2240 "notNull": true
2241 },
2242 "field_type": {
2243 "name": "field_type",
2244 "type": "text",
2245 "primaryKey": false,
2246 "notNull": true
2247 },
2248 "label": {
2249 "name": "label",
2250 "type": "text",
2251 "primaryKey": false,
2252 "notNull": true
2253 },
2254 "description": {
2255 "name": "description",
2256 "type": "text",
2257 "primaryKey": false,
2258 "notNull": false
2259 },
2260 "is_mandatory": {
2261 "name": "is_mandatory",
2262 "type": "boolean",
2263 "primaryKey": false,
2264 "notNull": true,
2265 "default": true
2266 },
2267 "sort_order": {
2268 "name": "sort_order",
2269 "type": "integer",
2270 "primaryKey": false,
2271 "notNull": true,
2272 "default": 0
2273 },
2274 "source": {
2275 "name": "source",
2276 "type": "text",
2277 "primaryKey": false,
2278 "notNull": true,
2279 "default": "'admin'"
2280 },
2281 "config": {
2282 "name": "config",
2283 "type": "jsonb",
2284 "primaryKey": false,
2285 "notNull": false
2286 },
2287 "created_at": {
2288 "name": "created_at",
2289 "type": "timestamp with time zone",
2290 "primaryKey": false,
2291 "notNull": true,
2292 "default": "now()"
2293 },
2294 "updated_at": {
2295 "name": "updated_at",
2296 "type": "timestamp with time zone",
2297 "primaryKey": false,
2298 "notNull": true,
2299 "default": "now()"
2300 }
2301 },
2302 "indexes": {
2303 "onboarding_fields_community_idx": {
2304 "name": "onboarding_fields_community_idx",
2305 "columns": [
2306 {
2307 "expression": "community_did",
2308 "isExpression": false,
2309 "asc": true,
2310 "nulls": "last"
2311 }
2312 ],
2313 "isUnique": false,
2314 "concurrently": false,
2315 "method": "btree",
2316 "with": {}
2317 }
2318 },
2319 "foreignKeys": {},
2320 "compositePrimaryKeys": {},
2321 "uniqueConstraints": {},
2322 "policies": {
2323 "tenant_isolation": {
2324 "name": "tenant_isolation",
2325 "as": "PERMISSIVE",
2326 "for": "ALL",
2327 "to": ["barazo_app"],
2328 "using": "community_did = current_setting('app.current_community_did', true)",
2329 "withCheck": "community_did = current_setting('app.current_community_did', true)"
2330 }
2331 },
2332 "checkConstraints": {},
2333 "isRLSEnabled": true
2334 },
2335 "public.user_onboarding_responses": {
2336 "name": "user_onboarding_responses",
2337 "schema": "",
2338 "columns": {
2339 "did": {
2340 "name": "did",
2341 "type": "text",
2342 "primaryKey": false,
2343 "notNull": true
2344 },
2345 "community_did": {
2346 "name": "community_did",
2347 "type": "text",
2348 "primaryKey": false,
2349 "notNull": true
2350 },
2351 "field_id": {
2352 "name": "field_id",
2353 "type": "text",
2354 "primaryKey": false,
2355 "notNull": true
2356 },
2357 "response": {
2358 "name": "response",
2359 "type": "jsonb",
2360 "primaryKey": false,
2361 "notNull": true
2362 },
2363 "completed_at": {
2364 "name": "completed_at",
2365 "type": "timestamp with time zone",
2366 "primaryKey": false,
2367 "notNull": true,
2368 "default": "now()"
2369 }
2370 },
2371 "indexes": {
2372 "onboarding_responses_did_community_idx": {
2373 "name": "onboarding_responses_did_community_idx",
2374 "columns": [
2375 {
2376 "expression": "did",
2377 "isExpression": false,
2378 "asc": true,
2379 "nulls": "last"
2380 },
2381 {
2382 "expression": "community_did",
2383 "isExpression": false,
2384 "asc": true,
2385 "nulls": "last"
2386 }
2387 ],
2388 "isUnique": false,
2389 "concurrently": false,
2390 "method": "btree",
2391 "with": {}
2392 }
2393 },
2394 "foreignKeys": {},
2395 "compositePrimaryKeys": {
2396 "user_onboarding_responses_did_community_did_field_id_pk": {
2397 "name": "user_onboarding_responses_did_community_did_field_id_pk",
2398 "columns": ["did", "community_did", "field_id"]
2399 }
2400 },
2401 "uniqueConstraints": {},
2402 "policies": {
2403 "tenant_isolation": {
2404 "name": "tenant_isolation",
2405 "as": "PERMISSIVE",
2406 "for": "ALL",
2407 "to": ["barazo_app"],
2408 "using": "community_did = current_setting('app.current_community_did', true)",
2409 "withCheck": "community_did = current_setting('app.current_community_did', true)"
2410 }
2411 },
2412 "checkConstraints": {},
2413 "isRLSEnabled": true
2414 },
2415 "public.moderation_queue": {
2416 "name": "moderation_queue",
2417 "schema": "",
2418 "columns": {
2419 "id": {
2420 "name": "id",
2421 "type": "serial",
2422 "primaryKey": true,
2423 "notNull": true
2424 },
2425 "content_uri": {
2426 "name": "content_uri",
2427 "type": "text",
2428 "primaryKey": false,
2429 "notNull": true
2430 },
2431 "content_type": {
2432 "name": "content_type",
2433 "type": "text",
2434 "primaryKey": false,
2435 "notNull": true
2436 },
2437 "author_did": {
2438 "name": "author_did",
2439 "type": "text",
2440 "primaryKey": false,
2441 "notNull": true
2442 },
2443 "community_did": {
2444 "name": "community_did",
2445 "type": "text",
2446 "primaryKey": false,
2447 "notNull": true
2448 },
2449 "queue_reason": {
2450 "name": "queue_reason",
2451 "type": "text",
2452 "primaryKey": false,
2453 "notNull": true
2454 },
2455 "matched_words": {
2456 "name": "matched_words",
2457 "type": "jsonb",
2458 "primaryKey": false,
2459 "notNull": false
2460 },
2461 "status": {
2462 "name": "status",
2463 "type": "text",
2464 "primaryKey": false,
2465 "notNull": true,
2466 "default": "'pending'"
2467 },
2468 "reviewed_by": {
2469 "name": "reviewed_by",
2470 "type": "text",
2471 "primaryKey": false,
2472 "notNull": false
2473 },
2474 "created_at": {
2475 "name": "created_at",
2476 "type": "timestamp with time zone",
2477 "primaryKey": false,
2478 "notNull": true,
2479 "default": "now()"
2480 },
2481 "reviewed_at": {
2482 "name": "reviewed_at",
2483 "type": "timestamp with time zone",
2484 "primaryKey": false,
2485 "notNull": false
2486 }
2487 },
2488 "indexes": {
2489 "mod_queue_author_did_idx": {
2490 "name": "mod_queue_author_did_idx",
2491 "columns": [
2492 {
2493 "expression": "author_did",
2494 "isExpression": false,
2495 "asc": true,
2496 "nulls": "last"
2497 }
2498 ],
2499 "isUnique": false,
2500 "concurrently": false,
2501 "method": "btree",
2502 "with": {}
2503 },
2504 "mod_queue_community_did_idx": {
2505 "name": "mod_queue_community_did_idx",
2506 "columns": [
2507 {
2508 "expression": "community_did",
2509 "isExpression": false,
2510 "asc": true,
2511 "nulls": "last"
2512 }
2513 ],
2514 "isUnique": false,
2515 "concurrently": false,
2516 "method": "btree",
2517 "with": {}
2518 },
2519 "mod_queue_status_idx": {
2520 "name": "mod_queue_status_idx",
2521 "columns": [
2522 {
2523 "expression": "status",
2524 "isExpression": false,
2525 "asc": true,
2526 "nulls": "last"
2527 }
2528 ],
2529 "isUnique": false,
2530 "concurrently": false,
2531 "method": "btree",
2532 "with": {}
2533 },
2534 "mod_queue_created_at_idx": {
2535 "name": "mod_queue_created_at_idx",
2536 "columns": [
2537 {
2538 "expression": "created_at",
2539 "isExpression": false,
2540 "asc": true,
2541 "nulls": "last"
2542 }
2543 ],
2544 "isUnique": false,
2545 "concurrently": false,
2546 "method": "btree",
2547 "with": {}
2548 },
2549 "mod_queue_content_uri_idx": {
2550 "name": "mod_queue_content_uri_idx",
2551 "columns": [
2552 {
2553 "expression": "content_uri",
2554 "isExpression": false,
2555 "asc": true,
2556 "nulls": "last"
2557 }
2558 ],
2559 "isUnique": false,
2560 "concurrently": false,
2561 "method": "btree",
2562 "with": {}
2563 }
2564 },
2565 "foreignKeys": {},
2566 "compositePrimaryKeys": {},
2567 "uniqueConstraints": {},
2568 "policies": {
2569 "tenant_isolation": {
2570 "name": "tenant_isolation",
2571 "as": "PERMISSIVE",
2572 "for": "ALL",
2573 "to": ["barazo_app"],
2574 "using": "community_did = current_setting('app.current_community_did', true)",
2575 "withCheck": "community_did = current_setting('app.current_community_did', true)"
2576 }
2577 },
2578 "checkConstraints": {},
2579 "isRLSEnabled": true
2580 },
2581 "public.account_trust": {
2582 "name": "account_trust",
2583 "schema": "",
2584 "columns": {
2585 "id": {
2586 "name": "id",
2587 "type": "serial",
2588 "primaryKey": true,
2589 "notNull": true
2590 },
2591 "did": {
2592 "name": "did",
2593 "type": "text",
2594 "primaryKey": false,
2595 "notNull": true
2596 },
2597 "community_did": {
2598 "name": "community_did",
2599 "type": "text",
2600 "primaryKey": false,
2601 "notNull": true
2602 },
2603 "approved_post_count": {
2604 "name": "approved_post_count",
2605 "type": "integer",
2606 "primaryKey": false,
2607 "notNull": true,
2608 "default": 0
2609 },
2610 "is_trusted": {
2611 "name": "is_trusted",
2612 "type": "boolean",
2613 "primaryKey": false,
2614 "notNull": true,
2615 "default": false
2616 },
2617 "trusted_at": {
2618 "name": "trusted_at",
2619 "type": "timestamp with time zone",
2620 "primaryKey": false,
2621 "notNull": false
2622 }
2623 },
2624 "indexes": {
2625 "account_trust_did_community_idx": {
2626 "name": "account_trust_did_community_idx",
2627 "columns": [
2628 {
2629 "expression": "did",
2630 "isExpression": false,
2631 "asc": true,
2632 "nulls": "last"
2633 },
2634 {
2635 "expression": "community_did",
2636 "isExpression": false,
2637 "asc": true,
2638 "nulls": "last"
2639 }
2640 ],
2641 "isUnique": true,
2642 "concurrently": false,
2643 "method": "btree",
2644 "with": {}
2645 },
2646 "account_trust_did_idx": {
2647 "name": "account_trust_did_idx",
2648 "columns": [
2649 {
2650 "expression": "did",
2651 "isExpression": false,
2652 "asc": true,
2653 "nulls": "last"
2654 }
2655 ],
2656 "isUnique": false,
2657 "concurrently": false,
2658 "method": "btree",
2659 "with": {}
2660 }
2661 },
2662 "foreignKeys": {},
2663 "compositePrimaryKeys": {},
2664 "uniqueConstraints": {},
2665 "policies": {
2666 "tenant_isolation": {
2667 "name": "tenant_isolation",
2668 "as": "PERMISSIVE",
2669 "for": "ALL",
2670 "to": ["barazo_app"],
2671 "using": "community_did = current_setting('app.current_community_did', true)",
2672 "withCheck": "community_did = current_setting('app.current_community_did', true)"
2673 }
2674 },
2675 "checkConstraints": {},
2676 "isRLSEnabled": true
2677 },
2678 "public.community_filters": {
2679 "name": "community_filters",
2680 "schema": "",
2681 "columns": {
2682 "community_did": {
2683 "name": "community_did",
2684 "type": "text",
2685 "primaryKey": true,
2686 "notNull": true
2687 },
2688 "status": {
2689 "name": "status",
2690 "type": "text",
2691 "primaryKey": false,
2692 "notNull": true,
2693 "default": "'active'"
2694 },
2695 "admin_did": {
2696 "name": "admin_did",
2697 "type": "text",
2698 "primaryKey": false,
2699 "notNull": false
2700 },
2701 "reason": {
2702 "name": "reason",
2703 "type": "text",
2704 "primaryKey": false,
2705 "notNull": false
2706 },
2707 "report_count": {
2708 "name": "report_count",
2709 "type": "integer",
2710 "primaryKey": false,
2711 "notNull": true,
2712 "default": 0
2713 },
2714 "last_reviewed_at": {
2715 "name": "last_reviewed_at",
2716 "type": "timestamp with time zone",
2717 "primaryKey": false,
2718 "notNull": false
2719 },
2720 "filtered_by": {
2721 "name": "filtered_by",
2722 "type": "text",
2723 "primaryKey": false,
2724 "notNull": false
2725 },
2726 "created_at": {
2727 "name": "created_at",
2728 "type": "timestamp with time zone",
2729 "primaryKey": false,
2730 "notNull": true,
2731 "default": "now()"
2732 },
2733 "updated_at": {
2734 "name": "updated_at",
2735 "type": "timestamp with time zone",
2736 "primaryKey": false,
2737 "notNull": true,
2738 "default": "now()"
2739 }
2740 },
2741 "indexes": {
2742 "community_filters_status_idx": {
2743 "name": "community_filters_status_idx",
2744 "columns": [
2745 {
2746 "expression": "status",
2747 "isExpression": false,
2748 "asc": true,
2749 "nulls": "last"
2750 }
2751 ],
2752 "isUnique": false,
2753 "concurrently": false,
2754 "method": "btree",
2755 "with": {}
2756 },
2757 "community_filters_admin_did_idx": {
2758 "name": "community_filters_admin_did_idx",
2759 "columns": [
2760 {
2761 "expression": "admin_did",
2762 "isExpression": false,
2763 "asc": true,
2764 "nulls": "last"
2765 }
2766 ],
2767 "isUnique": false,
2768 "concurrently": false,
2769 "method": "btree",
2770 "with": {}
2771 },
2772 "community_filters_updated_at_idx": {
2773 "name": "community_filters_updated_at_idx",
2774 "columns": [
2775 {
2776 "expression": "updated_at",
2777 "isExpression": false,
2778 "asc": true,
2779 "nulls": "last"
2780 }
2781 ],
2782 "isUnique": false,
2783 "concurrently": false,
2784 "method": "btree",
2785 "with": {}
2786 }
2787 },
2788 "foreignKeys": {},
2789 "compositePrimaryKeys": {},
2790 "uniqueConstraints": {},
2791 "policies": {
2792 "tenant_isolation": {
2793 "name": "tenant_isolation",
2794 "as": "PERMISSIVE",
2795 "for": "ALL",
2796 "to": ["barazo_app"],
2797 "using": "community_did = current_setting('app.current_community_did', true)",
2798 "withCheck": "community_did = current_setting('app.current_community_did', true)"
2799 }
2800 },
2801 "checkConstraints": {},
2802 "isRLSEnabled": true
2803 },
2804 "public.account_filters": {
2805 "name": "account_filters",
2806 "schema": "",
2807 "columns": {
2808 "id": {
2809 "name": "id",
2810 "type": "serial",
2811 "primaryKey": true,
2812 "notNull": true
2813 },
2814 "did": {
2815 "name": "did",
2816 "type": "text",
2817 "primaryKey": false,
2818 "notNull": true
2819 },
2820 "community_did": {
2821 "name": "community_did",
2822 "type": "text",
2823 "primaryKey": false,
2824 "notNull": true
2825 },
2826 "status": {
2827 "name": "status",
2828 "type": "text",
2829 "primaryKey": false,
2830 "notNull": true,
2831 "default": "'active'"
2832 },
2833 "reason": {
2834 "name": "reason",
2835 "type": "text",
2836 "primaryKey": false,
2837 "notNull": false
2838 },
2839 "report_count": {
2840 "name": "report_count",
2841 "type": "integer",
2842 "primaryKey": false,
2843 "notNull": true,
2844 "default": 0
2845 },
2846 "ban_count": {
2847 "name": "ban_count",
2848 "type": "integer",
2849 "primaryKey": false,
2850 "notNull": true,
2851 "default": 0
2852 },
2853 "last_reviewed_at": {
2854 "name": "last_reviewed_at",
2855 "type": "timestamp with time zone",
2856 "primaryKey": false,
2857 "notNull": false
2858 },
2859 "filtered_by": {
2860 "name": "filtered_by",
2861 "type": "text",
2862 "primaryKey": false,
2863 "notNull": false
2864 },
2865 "created_at": {
2866 "name": "created_at",
2867 "type": "timestamp with time zone",
2868 "primaryKey": false,
2869 "notNull": true,
2870 "default": "now()"
2871 },
2872 "updated_at": {
2873 "name": "updated_at",
2874 "type": "timestamp with time zone",
2875 "primaryKey": false,
2876 "notNull": true,
2877 "default": "now()"
2878 }
2879 },
2880 "indexes": {
2881 "account_filters_did_community_idx": {
2882 "name": "account_filters_did_community_idx",
2883 "columns": [
2884 {
2885 "expression": "did",
2886 "isExpression": false,
2887 "asc": true,
2888 "nulls": "last"
2889 },
2890 {
2891 "expression": "community_did",
2892 "isExpression": false,
2893 "asc": true,
2894 "nulls": "last"
2895 }
2896 ],
2897 "isUnique": true,
2898 "concurrently": false,
2899 "method": "btree",
2900 "with": {}
2901 },
2902 "account_filters_did_idx": {
2903 "name": "account_filters_did_idx",
2904 "columns": [
2905 {
2906 "expression": "did",
2907 "isExpression": false,
2908 "asc": true,
2909 "nulls": "last"
2910 }
2911 ],
2912 "isUnique": false,
2913 "concurrently": false,
2914 "method": "btree",
2915 "with": {}
2916 },
2917 "account_filters_community_did_idx": {
2918 "name": "account_filters_community_did_idx",
2919 "columns": [
2920 {
2921 "expression": "community_did",
2922 "isExpression": false,
2923 "asc": true,
2924 "nulls": "last"
2925 }
2926 ],
2927 "isUnique": false,
2928 "concurrently": false,
2929 "method": "btree",
2930 "with": {}
2931 },
2932 "account_filters_status_idx": {
2933 "name": "account_filters_status_idx",
2934 "columns": [
2935 {
2936 "expression": "status",
2937 "isExpression": false,
2938 "asc": true,
2939 "nulls": "last"
2940 }
2941 ],
2942 "isUnique": false,
2943 "concurrently": false,
2944 "method": "btree",
2945 "with": {}
2946 },
2947 "account_filters_updated_at_idx": {
2948 "name": "account_filters_updated_at_idx",
2949 "columns": [
2950 {
2951 "expression": "updated_at",
2952 "isExpression": false,
2953 "asc": true,
2954 "nulls": "last"
2955 }
2956 ],
2957 "isUnique": false,
2958 "concurrently": false,
2959 "method": "btree",
2960 "with": {}
2961 }
2962 },
2963 "foreignKeys": {},
2964 "compositePrimaryKeys": {},
2965 "uniqueConstraints": {},
2966 "policies": {
2967 "tenant_isolation": {
2968 "name": "tenant_isolation",
2969 "as": "PERMISSIVE",
2970 "for": "ALL",
2971 "to": ["barazo_app"],
2972 "using": "community_did = current_setting('app.current_community_did', true)",
2973 "withCheck": "community_did = current_setting('app.current_community_did', true)"
2974 }
2975 },
2976 "checkConstraints": {},
2977 "isRLSEnabled": true
2978 },
2979 "public.ozone_labels": {
2980 "name": "ozone_labels",
2981 "schema": "",
2982 "columns": {
2983 "id": {
2984 "name": "id",
2985 "type": "serial",
2986 "primaryKey": true,
2987 "notNull": true
2988 },
2989 "src": {
2990 "name": "src",
2991 "type": "text",
2992 "primaryKey": false,
2993 "notNull": true
2994 },
2995 "uri": {
2996 "name": "uri",
2997 "type": "text",
2998 "primaryKey": false,
2999 "notNull": true
3000 },
3001 "val": {
3002 "name": "val",
3003 "type": "text",
3004 "primaryKey": false,
3005 "notNull": true
3006 },
3007 "neg": {
3008 "name": "neg",
3009 "type": "boolean",
3010 "primaryKey": false,
3011 "notNull": true,
3012 "default": false
3013 },
3014 "cts": {
3015 "name": "cts",
3016 "type": "timestamp with time zone",
3017 "primaryKey": false,
3018 "notNull": true
3019 },
3020 "exp": {
3021 "name": "exp",
3022 "type": "timestamp with time zone",
3023 "primaryKey": false,
3024 "notNull": false
3025 },
3026 "indexed_at": {
3027 "name": "indexed_at",
3028 "type": "timestamp with time zone",
3029 "primaryKey": false,
3030 "notNull": true,
3031 "default": "now()"
3032 }
3033 },
3034 "indexes": {
3035 "ozone_labels_src_uri_val_idx": {
3036 "name": "ozone_labels_src_uri_val_idx",
3037 "columns": [
3038 {
3039 "expression": "src",
3040 "isExpression": false,
3041 "asc": true,
3042 "nulls": "last"
3043 },
3044 {
3045 "expression": "uri",
3046 "isExpression": false,
3047 "asc": true,
3048 "nulls": "last"
3049 },
3050 {
3051 "expression": "val",
3052 "isExpression": false,
3053 "asc": true,
3054 "nulls": "last"
3055 }
3056 ],
3057 "isUnique": true,
3058 "concurrently": false,
3059 "method": "btree",
3060 "with": {}
3061 },
3062 "ozone_labels_uri_idx": {
3063 "name": "ozone_labels_uri_idx",
3064 "columns": [
3065 {
3066 "expression": "uri",
3067 "isExpression": false,
3068 "asc": true,
3069 "nulls": "last"
3070 }
3071 ],
3072 "isUnique": false,
3073 "concurrently": false,
3074 "method": "btree",
3075 "with": {}
3076 },
3077 "ozone_labels_val_idx": {
3078 "name": "ozone_labels_val_idx",
3079 "columns": [
3080 {
3081 "expression": "val",
3082 "isExpression": false,
3083 "asc": true,
3084 "nulls": "last"
3085 }
3086 ],
3087 "isUnique": false,
3088 "concurrently": false,
3089 "method": "btree",
3090 "with": {}
3091 },
3092 "ozone_labels_indexed_at_idx": {
3093 "name": "ozone_labels_indexed_at_idx",
3094 "columns": [
3095 {
3096 "expression": "indexed_at",
3097 "isExpression": false,
3098 "asc": true,
3099 "nulls": "last"
3100 }
3101 ],
3102 "isUnique": false,
3103 "concurrently": false,
3104 "method": "btree",
3105 "with": {}
3106 }
3107 },
3108 "foreignKeys": {},
3109 "compositePrimaryKeys": {},
3110 "uniqueConstraints": {},
3111 "policies": {},
3112 "checkConstraints": {},
3113 "isRLSEnabled": false
3114 },
3115 "public.community_profiles": {
3116 "name": "community_profiles",
3117 "schema": "",
3118 "columns": {
3119 "did": {
3120 "name": "did",
3121 "type": "text",
3122 "primaryKey": false,
3123 "notNull": true
3124 },
3125 "community_did": {
3126 "name": "community_did",
3127 "type": "text",
3128 "primaryKey": false,
3129 "notNull": true
3130 },
3131 "display_name": {
3132 "name": "display_name",
3133 "type": "text",
3134 "primaryKey": false,
3135 "notNull": false
3136 },
3137 "avatar_url": {
3138 "name": "avatar_url",
3139 "type": "text",
3140 "primaryKey": false,
3141 "notNull": false
3142 },
3143 "banner_url": {
3144 "name": "banner_url",
3145 "type": "text",
3146 "primaryKey": false,
3147 "notNull": false
3148 },
3149 "bio": {
3150 "name": "bio",
3151 "type": "text",
3152 "primaryKey": false,
3153 "notNull": false
3154 },
3155 "updated_at": {
3156 "name": "updated_at",
3157 "type": "timestamp with time zone",
3158 "primaryKey": false,
3159 "notNull": true,
3160 "default": "now()"
3161 }
3162 },
3163 "indexes": {
3164 "community_profiles_did_idx": {
3165 "name": "community_profiles_did_idx",
3166 "columns": [
3167 {
3168 "expression": "did",
3169 "isExpression": false,
3170 "asc": true,
3171 "nulls": "last"
3172 }
3173 ],
3174 "isUnique": false,
3175 "concurrently": false,
3176 "method": "btree",
3177 "with": {}
3178 },
3179 "community_profiles_community_idx": {
3180 "name": "community_profiles_community_idx",
3181 "columns": [
3182 {
3183 "expression": "community_did",
3184 "isExpression": false,
3185 "asc": true,
3186 "nulls": "last"
3187 }
3188 ],
3189 "isUnique": false,
3190 "concurrently": false,
3191 "method": "btree",
3192 "with": {}
3193 }
3194 },
3195 "foreignKeys": {},
3196 "compositePrimaryKeys": {
3197 "community_profiles_did_community_did_pk": {
3198 "name": "community_profiles_did_community_did_pk",
3199 "columns": ["did", "community_did"]
3200 }
3201 },
3202 "uniqueConstraints": {},
3203 "policies": {
3204 "tenant_isolation": {
3205 "name": "tenant_isolation",
3206 "as": "PERMISSIVE",
3207 "for": "ALL",
3208 "to": ["barazo_app"],
3209 "using": "community_did = current_setting('app.current_community_did', true)",
3210 "withCheck": "community_did = current_setting('app.current_community_did', true)"
3211 }
3212 },
3213 "checkConstraints": {},
3214 "isRLSEnabled": true
3215 },
3216 "public.interaction_graph": {
3217 "name": "interaction_graph",
3218 "schema": "",
3219 "columns": {
3220 "source_did": {
3221 "name": "source_did",
3222 "type": "text",
3223 "primaryKey": false,
3224 "notNull": true
3225 },
3226 "target_did": {
3227 "name": "target_did",
3228 "type": "text",
3229 "primaryKey": false,
3230 "notNull": true
3231 },
3232 "community_id": {
3233 "name": "community_id",
3234 "type": "text",
3235 "primaryKey": false,
3236 "notNull": true
3237 },
3238 "interaction_type": {
3239 "name": "interaction_type",
3240 "type": "text",
3241 "primaryKey": false,
3242 "notNull": true
3243 },
3244 "weight": {
3245 "name": "weight",
3246 "type": "integer",
3247 "primaryKey": false,
3248 "notNull": true,
3249 "default": 1
3250 },
3251 "first_interaction_at": {
3252 "name": "first_interaction_at",
3253 "type": "timestamp with time zone",
3254 "primaryKey": false,
3255 "notNull": true,
3256 "default": "now()"
3257 },
3258 "last_interaction_at": {
3259 "name": "last_interaction_at",
3260 "type": "timestamp with time zone",
3261 "primaryKey": false,
3262 "notNull": true,
3263 "default": "now()"
3264 }
3265 },
3266 "indexes": {
3267 "interaction_graph_source_target_community_idx": {
3268 "name": "interaction_graph_source_target_community_idx",
3269 "columns": [
3270 {
3271 "expression": "source_did",
3272 "isExpression": false,
3273 "asc": true,
3274 "nulls": "last"
3275 },
3276 {
3277 "expression": "target_did",
3278 "isExpression": false,
3279 "asc": true,
3280 "nulls": "last"
3281 },
3282 {
3283 "expression": "community_id",
3284 "isExpression": false,
3285 "asc": true,
3286 "nulls": "last"
3287 }
3288 ],
3289 "isUnique": false,
3290 "concurrently": false,
3291 "method": "btree",
3292 "with": {}
3293 }
3294 },
3295 "foreignKeys": {},
3296 "compositePrimaryKeys": {
3297 "interaction_graph_source_did_target_did_community_id_interaction_type_pk": {
3298 "name": "interaction_graph_source_did_target_did_community_id_interaction_type_pk",
3299 "columns": ["source_did", "target_did", "community_id", "interaction_type"]
3300 }
3301 },
3302 "uniqueConstraints": {},
3303 "policies": {},
3304 "checkConstraints": {},
3305 "isRLSEnabled": false
3306 },
3307 "public.trust_seeds": {
3308 "name": "trust_seeds",
3309 "schema": "",
3310 "columns": {
3311 "id": {
3312 "name": "id",
3313 "type": "serial",
3314 "primaryKey": true,
3315 "notNull": true
3316 },
3317 "did": {
3318 "name": "did",
3319 "type": "text",
3320 "primaryKey": false,
3321 "notNull": true
3322 },
3323 "community_id": {
3324 "name": "community_id",
3325 "type": "text",
3326 "primaryKey": false,
3327 "notNull": true,
3328 "default": "''"
3329 },
3330 "added_by": {
3331 "name": "added_by",
3332 "type": "text",
3333 "primaryKey": false,
3334 "notNull": true
3335 },
3336 "reason": {
3337 "name": "reason",
3338 "type": "text",
3339 "primaryKey": false,
3340 "notNull": false
3341 },
3342 "created_at": {
3343 "name": "created_at",
3344 "type": "timestamp with time zone",
3345 "primaryKey": false,
3346 "notNull": true,
3347 "default": "now()"
3348 }
3349 },
3350 "indexes": {
3351 "trust_seeds_did_community_idx": {
3352 "name": "trust_seeds_did_community_idx",
3353 "columns": [
3354 {
3355 "expression": "did",
3356 "isExpression": false,
3357 "asc": true,
3358 "nulls": "last"
3359 },
3360 {
3361 "expression": "community_id",
3362 "isExpression": false,
3363 "asc": true,
3364 "nulls": "last"
3365 }
3366 ],
3367 "isUnique": true,
3368 "concurrently": false,
3369 "method": "btree",
3370 "with": {}
3371 }
3372 },
3373 "foreignKeys": {},
3374 "compositePrimaryKeys": {},
3375 "uniqueConstraints": {},
3376 "policies": {},
3377 "checkConstraints": {},
3378 "isRLSEnabled": false
3379 },
3380 "public.trust_scores": {
3381 "name": "trust_scores",
3382 "schema": "",
3383 "columns": {
3384 "did": {
3385 "name": "did",
3386 "type": "text",
3387 "primaryKey": false,
3388 "notNull": true
3389 },
3390 "community_id": {
3391 "name": "community_id",
3392 "type": "text",
3393 "primaryKey": false,
3394 "notNull": true,
3395 "default": "''"
3396 },
3397 "score": {
3398 "name": "score",
3399 "type": "real",
3400 "primaryKey": false,
3401 "notNull": true
3402 },
3403 "computed_at": {
3404 "name": "computed_at",
3405 "type": "timestamp with time zone",
3406 "primaryKey": false,
3407 "notNull": true,
3408 "default": "now()"
3409 }
3410 },
3411 "indexes": {
3412 "trust_scores_did_community_idx": {
3413 "name": "trust_scores_did_community_idx",
3414 "columns": [
3415 {
3416 "expression": "did",
3417 "isExpression": false,
3418 "asc": true,
3419 "nulls": "last"
3420 },
3421 {
3422 "expression": "community_id",
3423 "isExpression": false,
3424 "asc": true,
3425 "nulls": "last"
3426 }
3427 ],
3428 "isUnique": false,
3429 "concurrently": false,
3430 "method": "btree",
3431 "with": {}
3432 }
3433 },
3434 "foreignKeys": {},
3435 "compositePrimaryKeys": {
3436 "trust_scores_did_community_id_pk": {
3437 "name": "trust_scores_did_community_id_pk",
3438 "columns": ["did", "community_id"]
3439 }
3440 },
3441 "uniqueConstraints": {},
3442 "policies": {},
3443 "checkConstraints": {},
3444 "isRLSEnabled": false
3445 },
3446 "public.sybil_clusters": {
3447 "name": "sybil_clusters",
3448 "schema": "",
3449 "columns": {
3450 "id": {
3451 "name": "id",
3452 "type": "serial",
3453 "primaryKey": true,
3454 "notNull": true
3455 },
3456 "cluster_hash": {
3457 "name": "cluster_hash",
3458 "type": "text",
3459 "primaryKey": false,
3460 "notNull": true
3461 },
3462 "internal_edge_count": {
3463 "name": "internal_edge_count",
3464 "type": "integer",
3465 "primaryKey": false,
3466 "notNull": true
3467 },
3468 "external_edge_count": {
3469 "name": "external_edge_count",
3470 "type": "integer",
3471 "primaryKey": false,
3472 "notNull": true
3473 },
3474 "member_count": {
3475 "name": "member_count",
3476 "type": "integer",
3477 "primaryKey": false,
3478 "notNull": true
3479 },
3480 "status": {
3481 "name": "status",
3482 "type": "text",
3483 "primaryKey": false,
3484 "notNull": true,
3485 "default": "'flagged'"
3486 },
3487 "reviewed_by": {
3488 "name": "reviewed_by",
3489 "type": "text",
3490 "primaryKey": false,
3491 "notNull": false
3492 },
3493 "reviewed_at": {
3494 "name": "reviewed_at",
3495 "type": "timestamp with time zone",
3496 "primaryKey": false,
3497 "notNull": false
3498 },
3499 "detected_at": {
3500 "name": "detected_at",
3501 "type": "timestamp with time zone",
3502 "primaryKey": false,
3503 "notNull": true,
3504 "default": "now()"
3505 },
3506 "updated_at": {
3507 "name": "updated_at",
3508 "type": "timestamp with time zone",
3509 "primaryKey": false,
3510 "notNull": true,
3511 "default": "now()"
3512 }
3513 },
3514 "indexes": {
3515 "sybil_clusters_hash_idx": {
3516 "name": "sybil_clusters_hash_idx",
3517 "columns": [
3518 {
3519 "expression": "cluster_hash",
3520 "isExpression": false,
3521 "asc": true,
3522 "nulls": "last"
3523 }
3524 ],
3525 "isUnique": true,
3526 "concurrently": false,
3527 "method": "btree",
3528 "with": {}
3529 }
3530 },
3531 "foreignKeys": {},
3532 "compositePrimaryKeys": {},
3533 "uniqueConstraints": {},
3534 "policies": {},
3535 "checkConstraints": {},
3536 "isRLSEnabled": false
3537 },
3538 "public.sybil_cluster_members": {
3539 "name": "sybil_cluster_members",
3540 "schema": "",
3541 "columns": {
3542 "cluster_id": {
3543 "name": "cluster_id",
3544 "type": "integer",
3545 "primaryKey": false,
3546 "notNull": true
3547 },
3548 "did": {
3549 "name": "did",
3550 "type": "text",
3551 "primaryKey": false,
3552 "notNull": true
3553 },
3554 "role_in_cluster": {
3555 "name": "role_in_cluster",
3556 "type": "text",
3557 "primaryKey": false,
3558 "notNull": true
3559 },
3560 "joined_at": {
3561 "name": "joined_at",
3562 "type": "timestamp with time zone",
3563 "primaryKey": false,
3564 "notNull": true,
3565 "default": "now()"
3566 }
3567 },
3568 "indexes": {},
3569 "foreignKeys": {
3570 "sybil_cluster_members_cluster_id_sybil_clusters_id_fk": {
3571 "name": "sybil_cluster_members_cluster_id_sybil_clusters_id_fk",
3572 "tableFrom": "sybil_cluster_members",
3573 "tableTo": "sybil_clusters",
3574 "columnsFrom": ["cluster_id"],
3575 "columnsTo": ["id"],
3576 "onDelete": "no action",
3577 "onUpdate": "no action"
3578 }
3579 },
3580 "compositePrimaryKeys": {
3581 "sybil_cluster_members_cluster_id_did_pk": {
3582 "name": "sybil_cluster_members_cluster_id_did_pk",
3583 "columns": ["cluster_id", "did"]
3584 }
3585 },
3586 "uniqueConstraints": {},
3587 "policies": {},
3588 "checkConstraints": {},
3589 "isRLSEnabled": false
3590 },
3591 "public.behavioral_flags": {
3592 "name": "behavioral_flags",
3593 "schema": "",
3594 "columns": {
3595 "id": {
3596 "name": "id",
3597 "type": "serial",
3598 "primaryKey": true,
3599 "notNull": true
3600 },
3601 "flag_type": {
3602 "name": "flag_type",
3603 "type": "text",
3604 "primaryKey": false,
3605 "notNull": true
3606 },
3607 "affected_dids": {
3608 "name": "affected_dids",
3609 "type": "jsonb",
3610 "primaryKey": false,
3611 "notNull": true
3612 },
3613 "details": {
3614 "name": "details",
3615 "type": "text",
3616 "primaryKey": false,
3617 "notNull": true
3618 },
3619 "community_did": {
3620 "name": "community_did",
3621 "type": "text",
3622 "primaryKey": false,
3623 "notNull": false
3624 },
3625 "status": {
3626 "name": "status",
3627 "type": "text",
3628 "primaryKey": false,
3629 "notNull": true,
3630 "default": "'pending'"
3631 },
3632 "detected_at": {
3633 "name": "detected_at",
3634 "type": "timestamp with time zone",
3635 "primaryKey": false,
3636 "notNull": true,
3637 "default": "now()"
3638 }
3639 },
3640 "indexes": {
3641 "behavioral_flags_flag_type_idx": {
3642 "name": "behavioral_flags_flag_type_idx",
3643 "columns": [
3644 {
3645 "expression": "flag_type",
3646 "isExpression": false,
3647 "asc": true,
3648 "nulls": "last"
3649 }
3650 ],
3651 "isUnique": false,
3652 "concurrently": false,
3653 "method": "btree",
3654 "with": {}
3655 },
3656 "behavioral_flags_status_idx": {
3657 "name": "behavioral_flags_status_idx",
3658 "columns": [
3659 {
3660 "expression": "status",
3661 "isExpression": false,
3662 "asc": true,
3663 "nulls": "last"
3664 }
3665 ],
3666 "isUnique": false,
3667 "concurrently": false,
3668 "method": "btree",
3669 "with": {}
3670 },
3671 "behavioral_flags_detected_at_idx": {
3672 "name": "behavioral_flags_detected_at_idx",
3673 "columns": [
3674 {
3675 "expression": "detected_at",
3676 "isExpression": false,
3677 "asc": true,
3678 "nulls": "last"
3679 }
3680 ],
3681 "isUnique": false,
3682 "concurrently": false,
3683 "method": "btree",
3684 "with": {}
3685 }
3686 },
3687 "foreignKeys": {},
3688 "compositePrimaryKeys": {},
3689 "uniqueConstraints": {},
3690 "policies": {},
3691 "checkConstraints": {},
3692 "isRLSEnabled": false
3693 },
3694 "public.pds_trust_factors": {
3695 "name": "pds_trust_factors",
3696 "schema": "",
3697 "columns": {
3698 "id": {
3699 "name": "id",
3700 "type": "serial",
3701 "primaryKey": true,
3702 "notNull": true
3703 },
3704 "pds_host": {
3705 "name": "pds_host",
3706 "type": "text",
3707 "primaryKey": false,
3708 "notNull": true
3709 },
3710 "trust_factor": {
3711 "name": "trust_factor",
3712 "type": "real",
3713 "primaryKey": false,
3714 "notNull": true
3715 },
3716 "is_default": {
3717 "name": "is_default",
3718 "type": "boolean",
3719 "primaryKey": false,
3720 "notNull": true,
3721 "default": false
3722 },
3723 "updated_at": {
3724 "name": "updated_at",
3725 "type": "timestamp with time zone",
3726 "primaryKey": false,
3727 "notNull": true,
3728 "default": "now()"
3729 }
3730 },
3731 "indexes": {
3732 "pds_trust_factors_pds_host_idx": {
3733 "name": "pds_trust_factors_pds_host_idx",
3734 "columns": [
3735 {
3736 "expression": "pds_host",
3737 "isExpression": false,
3738 "asc": true,
3739 "nulls": "last"
3740 }
3741 ],
3742 "isUnique": true,
3743 "concurrently": false,
3744 "method": "btree",
3745 "with": {}
3746 }
3747 },
3748 "foreignKeys": {},
3749 "compositePrimaryKeys": {},
3750 "uniqueConstraints": {},
3751 "policies": {},
3752 "checkConstraints": {},
3753 "isRLSEnabled": false
3754 },
3755 "public.pages": {
3756 "name": "pages",
3757 "schema": "",
3758 "columns": {
3759 "id": {
3760 "name": "id",
3761 "type": "text",
3762 "primaryKey": true,
3763 "notNull": true
3764 },
3765 "slug": {
3766 "name": "slug",
3767 "type": "text",
3768 "primaryKey": false,
3769 "notNull": true
3770 },
3771 "title": {
3772 "name": "title",
3773 "type": "text",
3774 "primaryKey": false,
3775 "notNull": true
3776 },
3777 "content": {
3778 "name": "content",
3779 "type": "text",
3780 "primaryKey": false,
3781 "notNull": true
3782 },
3783 "status": {
3784 "name": "status",
3785 "type": "text",
3786 "primaryKey": false,
3787 "notNull": true,
3788 "default": "'draft'"
3789 },
3790 "meta_description": {
3791 "name": "meta_description",
3792 "type": "text",
3793 "primaryKey": false,
3794 "notNull": false
3795 },
3796 "parent_id": {
3797 "name": "parent_id",
3798 "type": "text",
3799 "primaryKey": false,
3800 "notNull": false
3801 },
3802 "sort_order": {
3803 "name": "sort_order",
3804 "type": "integer",
3805 "primaryKey": false,
3806 "notNull": true,
3807 "default": 0
3808 },
3809 "community_did": {
3810 "name": "community_did",
3811 "type": "text",
3812 "primaryKey": false,
3813 "notNull": true
3814 },
3815 "created_at": {
3816 "name": "created_at",
3817 "type": "timestamp with time zone",
3818 "primaryKey": false,
3819 "notNull": true,
3820 "default": "now()"
3821 },
3822 "updated_at": {
3823 "name": "updated_at",
3824 "type": "timestamp with time zone",
3825 "primaryKey": false,
3826 "notNull": true,
3827 "default": "now()"
3828 }
3829 },
3830 "indexes": {
3831 "pages_slug_community_did_idx": {
3832 "name": "pages_slug_community_did_idx",
3833 "columns": [
3834 {
3835 "expression": "slug",
3836 "isExpression": false,
3837 "asc": true,
3838 "nulls": "last"
3839 },
3840 {
3841 "expression": "community_did",
3842 "isExpression": false,
3843 "asc": true,
3844 "nulls": "last"
3845 }
3846 ],
3847 "isUnique": true,
3848 "concurrently": false,
3849 "method": "btree",
3850 "with": {}
3851 },
3852 "pages_community_did_idx": {
3853 "name": "pages_community_did_idx",
3854 "columns": [
3855 {
3856 "expression": "community_did",
3857 "isExpression": false,
3858 "asc": true,
3859 "nulls": "last"
3860 }
3861 ],
3862 "isUnique": false,
3863 "concurrently": false,
3864 "method": "btree",
3865 "with": {}
3866 },
3867 "pages_parent_id_idx": {
3868 "name": "pages_parent_id_idx",
3869 "columns": [
3870 {
3871 "expression": "parent_id",
3872 "isExpression": false,
3873 "asc": true,
3874 "nulls": "last"
3875 }
3876 ],
3877 "isUnique": false,
3878 "concurrently": false,
3879 "method": "btree",
3880 "with": {}
3881 },
3882 "pages_status_community_did_idx": {
3883 "name": "pages_status_community_did_idx",
3884 "columns": [
3885 {
3886 "expression": "status",
3887 "isExpression": false,
3888 "asc": true,
3889 "nulls": "last"
3890 },
3891 {
3892 "expression": "community_did",
3893 "isExpression": false,
3894 "asc": true,
3895 "nulls": "last"
3896 }
3897 ],
3898 "isUnique": false,
3899 "concurrently": false,
3900 "method": "btree",
3901 "with": {}
3902 }
3903 },
3904 "foreignKeys": {
3905 "pages_parent_id_fk": {
3906 "name": "pages_parent_id_fk",
3907 "tableFrom": "pages",
3908 "tableTo": "pages",
3909 "columnsFrom": ["parent_id"],
3910 "columnsTo": ["id"],
3911 "onDelete": "set null",
3912 "onUpdate": "no action"
3913 }
3914 },
3915 "compositePrimaryKeys": {},
3916 "uniqueConstraints": {},
3917 "policies": {
3918 "tenant_isolation": {
3919 "name": "tenant_isolation",
3920 "as": "PERMISSIVE",
3921 "for": "ALL",
3922 "to": ["barazo_app"],
3923 "using": "community_did = current_setting('app.current_community_did', true)",
3924 "withCheck": "community_did = current_setting('app.current_community_did', true)"
3925 }
3926 },
3927 "checkConstraints": {},
3928 "isRLSEnabled": true
3929 }
3930 },
3931 "enums": {},
3932 "schemas": {},
3933 "sequences": {},
3934 "roles": {
3935 "barazo_app": {
3936 "name": "barazo_app",
3937 "createDb": false,
3938 "createRole": false,
3939 "inherit": true
3940 }
3941 },
3942 "policies": {},
3943 "views": {},
3944 "_meta": {
3945 "columns": {},
3946 "schemas": {},
3947 "tables": {}
3948 }
3949}