6 published -> Timestamp,
7 updated -> Nullable<Timestamp>,
9 sensitive -> Nullable<Bool>,
14 use diesel_ltree::sql_types::Ltree;
15 use diesel::sql_types::*;
23 published -> Timestamp,
24 updated -> Nullable<Timestamp>,
29 distinguished -> Bool,
35 comment_aggregates (id) {
41 published -> Timestamp,
53 published -> Timestamp,
62 original_comment_text -> Text,
65 resolver_id -> Nullable<Int4>,
66 published -> Timestamp,
67 updated -> Nullable<Timestamp>,
76 published -> Timestamp,
85 description -> Nullable<Text>,
87 published -> Timestamp,
88 updated -> Nullable<Timestamp>,
93 private_key -> Nullable<Text>,
95 last_refreshed_at -> Timestamp,
96 icon -> Nullable<Varchar>,
97 banner -> Nullable<Varchar>,
98 followers_url -> Varchar,
100 shared_inbox_url -> Nullable<Varchar>,
102 posting_restricted_to_mods -> Bool,
108 community_aggregates (id) {
110 community_id -> Int4,
114 published -> Timestamp,
115 users_active_day -> Int8,
116 users_active_week -> Int8,
117 users_active_month -> Int8,
118 users_active_half_year -> Int8,
123 community_follower (id) {
125 community_id -> Int4,
127 published -> Timestamp,
133 community_moderator (id) {
135 community_id -> Int4,
137 published -> Timestamp,
142 community_person_ban (id) {
144 community_id -> Int4,
146 published -> Timestamp,
147 expires -> Nullable<Timestamp>,
155 password_encrypted -> Text,
156 email -> Nullable<Text>,
159 default_sort_type -> Int2,
160 default_listing_type -> Int2,
161 interface_language -> Varchar,
162 show_avatars -> Bool,
163 send_notifications_to_email -> Bool,
164 validator_time -> Timestamp,
165 show_bot_accounts -> Bool,
167 show_read_posts -> Bool,
168 show_new_post_notifs -> Bool,
169 email_verified -> Bool,
170 accepted_application -> Bool,
177 mod_person_id -> Int4,
178 other_person_id -> Int4,
179 removed -> Nullable<Bool>,
185 mod_add_community (id) {
187 mod_person_id -> Int4,
188 other_person_id -> Int4,
189 community_id -> Int4,
190 removed -> Nullable<Bool>,
196 mod_transfer_community (id) {
198 mod_person_id -> Int4,
199 other_person_id -> Int4,
200 community_id -> Int4,
201 removed -> Nullable<Bool>,
209 mod_person_id -> Int4,
210 other_person_id -> Int4,
211 reason -> Nullable<Text>,
212 banned -> Nullable<Bool>,
213 expires -> Nullable<Timestamp>,
219 mod_ban_from_community (id) {
221 mod_person_id -> Int4,
222 other_person_id -> Int4,
223 community_id -> Int4,
224 reason -> Nullable<Text>,
225 banned -> Nullable<Bool>,
226 expires -> Nullable<Timestamp>,
234 mod_person_id -> Int4,
236 locked -> Nullable<Bool>,
242 mod_remove_comment (id) {
244 mod_person_id -> Int4,
246 reason -> Nullable<Text>,
247 removed -> Nullable<Bool>,
253 mod_remove_community (id) {
255 mod_person_id -> Int4,
256 community_id -> Int4,
257 reason -> Nullable<Text>,
258 removed -> Nullable<Bool>,
259 expires -> Nullable<Timestamp>,
265 mod_remove_post (id) {
267 mod_person_id -> Int4,
269 reason -> Nullable<Text>,
270 removed -> Nullable<Bool>,
276 mod_feature_post (id) {
278 mod_person_id -> Int4,
282 is_featured_community -> Bool,
287 password_reset_request (id) {
289 token_encrypted -> Text,
290 published -> Timestamp,
291 local_user_id -> Int4,
299 display_name -> Nullable<Varchar>,
300 avatar -> Nullable<Varchar>,
302 published -> Timestamp,
303 updated -> Nullable<Timestamp>,
305 bio -> Nullable<Text>,
307 private_key -> Nullable<Text>,
309 last_refreshed_at -> Timestamp,
310 banner -> Nullable<Varchar>,
312 inbox_url -> Varchar,
313 shared_inbox_url -> Nullable<Varchar>,
314 matrix_user_id -> Nullable<Text>,
317 ban_expires -> Nullable<Timestamp>,
323 person_aggregates (id) {
328 comment_count -> Int8,
329 comment_score -> Int8,
337 published -> Timestamp,
342 person_mention (id) {
344 recipient_id -> Int4,
347 published -> Timestamp,
354 recipient_id -> Int4,
357 published -> Timestamp,
365 url -> Nullable<Varchar>,
366 body -> Nullable<Text>,
368 community_id -> Int4,
371 published -> Timestamp,
372 updated -> Nullable<Timestamp>,
375 embed_title -> Nullable<Text>,
376 embed_description -> Nullable<Text>,
377 embed_video_url -> Nullable<Text>,
378 thumbnail_url -> Nullable<Text>,
382 featured_community -> Bool,
383 featured_local -> Bool,
388 person_post_aggregates (id) {
392 read_comments -> Int8,
393 published -> Timestamp,
398 post_aggregates (id) {
405 published -> Timestamp,
406 newest_comment_time_necro -> Timestamp,
407 newest_comment_time -> Timestamp,
408 featured_community -> Bool,
409 featured_local -> Bool,
419 published -> Timestamp,
428 published -> Timestamp,
437 original_post_name -> Varchar,
438 original_post_url -> Nullable<Text>,
439 original_post_body -> Nullable<Text>,
442 resolver_id -> Nullable<Int4>,
443 published -> Timestamp,
444 updated -> Nullable<Timestamp>,
453 published -> Timestamp,
458 private_message (id) {
461 recipient_id -> Int4,
465 published -> Timestamp,
466 updated -> Nullable<Timestamp>,
473 private_message_report (id) {
476 private_message_id -> Int4,
477 original_pm_text -> Text,
480 resolver_id -> Nullable<Int4>,
481 published -> Timestamp,
482 updated -> Nullable<Timestamp>,
490 sidebar -> Nullable<Text>,
491 published -> Timestamp,
492 updated -> Nullable<Timestamp>,
493 icon -> Nullable<Varchar>,
494 banner -> Nullable<Varchar>,
495 description -> Nullable<Text>,
497 last_refreshed_at -> Timestamp,
499 private_key -> Nullable<Text>,
506 site_aggregates (id) {
513 users_active_day -> Int8,
514 users_active_week -> Int8,
515 users_active_month -> Int8,
516 users_active_half_year -> Int8,
525 published -> Timestamp,
530 community_block (id) {
533 community_id -> Int4,
534 published -> Timestamp,
541 jwt_secret -> Varchar,
546 admin_purge_comment (id) {
548 admin_person_id -> Int4,
550 reason -> Nullable<Text>,
556 email_verification (id) {
558 local_user_id -> Int4,
560 verification_token -> Varchar,
561 published -> Timestamp,
566 admin_purge_community (id) {
568 admin_person_id -> Int4,
569 reason -> Nullable<Text>,
575 admin_purge_person (id) {
577 admin_person_id -> Int4,
578 reason -> Nullable<Text>,
584 admin_purge_post (id) {
586 admin_person_id -> Int4,
587 community_id -> Int4,
588 reason -> Nullable<Text>,
594 registration_application (id) {
596 local_user_id -> Int4,
598 admin_id -> Nullable<Int4>,
599 deny_reason -> Nullable<Text>,
600 published -> Timestamp,
605 mod_hide_community (id) {
607 community_id -> Int4,
608 mod_person_id -> Int4,
609 reason -> Nullable<Text>,
610 hidden -> Nullable<Bool>,
624 local_user_language(id) {
626 local_user_id -> Int4,
640 community_language(id) {
642 community_id -> Int4,
651 software -> Nullable<Text>,
652 version -> Nullable<Text>,
653 published -> Timestamp,
654 updated -> Nullable<Timestamp>,
659 federation_allowlist(id) {
662 published -> Timestamp,
663 updated -> Nullable<Timestamp>,
668 federation_blocklist(id) {
671 published -> Timestamp,
672 updated -> Nullable<Timestamp>,
677 use crate::source::local_site::RegistrationModeType;
678 use diesel::sql_types::*;
684 enable_downvotes -> Bool,
686 community_creation_admin_only -> Bool,
687 require_email_verification -> Bool,
688 application_question -> Nullable<Text>,
689 private_instance -> Bool,
690 default_theme -> Text,
691 default_post_listing_type -> Text,
692 legal_information -> Nullable<Text>,
693 hide_modlog_mod_names -> Bool,
694 application_email_admins -> Bool,
695 slur_filter_regex -> Nullable<Text>,
696 actor_name_max_length -> Int4,
697 federation_enabled -> Bool,
698 federation_debug -> Bool,
699 federation_worker_count -> Int4,
700 captcha_enabled -> Bool,
701 captcha_difficulty -> Text,
702 registration_mode -> RegistrationModeType,
703 reports_email_admins -> Bool,
704 published -> Timestamp,
705 updated -> Nullable<Timestamp>,
710 local_site_rate_limit(id) {
712 local_site_id -> Int4,
714 message_per_second-> Int4,
716 post_per_second -> Int4,
718 register_per_second -> Int4,
720 image_per_second -> Int4,
722 comment_per_second -> Int4,
724 search_per_second -> Int4,
725 published -> Timestamp,
726 updated -> Nullable<Timestamp>,
733 local_site_id -> Int4,
735 published -> Timestamp,
736 updated -> Nullable<Timestamp>,
741 person_follower (id) {
745 published -> Timestamp,
750 joinable!(person_block -> person (person_id));
752 joinable!(comment -> person (creator_id));
753 joinable!(comment -> post (post_id));
754 joinable!(comment_aggregates -> comment (comment_id));
755 joinable!(comment_like -> comment (comment_id));
756 joinable!(comment_like -> person (person_id));
757 joinable!(comment_like -> post (post_id));
758 joinable!(comment_report -> comment (comment_id));
759 joinable!(comment_saved -> comment (comment_id));
760 joinable!(comment_saved -> person (person_id));
761 joinable!(community_aggregates -> community (community_id));
762 joinable!(community_block -> community (community_id));
763 joinable!(community_block -> person (person_id));
764 joinable!(community_follower -> community (community_id));
765 joinable!(community_follower -> person (person_id));
766 joinable!(community_moderator -> community (community_id));
767 joinable!(community_moderator -> person (person_id));
768 joinable!(community_person_ban -> community (community_id));
769 joinable!(community_person_ban -> person (person_id));
770 joinable!(local_user -> person (person_id));
771 joinable!(mod_add_community -> community (community_id));
772 joinable!(mod_transfer_community -> community (community_id));
773 joinable!(mod_ban_from_community -> community (community_id));
774 joinable!(mod_lock_post -> person (mod_person_id));
775 joinable!(mod_lock_post -> post (post_id));
776 joinable!(mod_remove_comment -> comment (comment_id));
777 joinable!(mod_remove_comment -> person (mod_person_id));
778 joinable!(mod_remove_community -> community (community_id));
779 joinable!(mod_remove_community -> person (mod_person_id));
780 joinable!(mod_remove_post -> person (mod_person_id));
781 joinable!(mod_remove_post -> post (post_id));
782 joinable!(mod_feature_post -> person (mod_person_id));
783 joinable!(mod_feature_post -> post (post_id));
784 joinable!(password_reset_request -> local_user (local_user_id));
785 joinable!(person_aggregates -> person (person_id));
786 joinable!(person_ban -> person (person_id));
787 joinable!(person_mention -> comment (comment_id));
788 joinable!(person_mention -> person (recipient_id));
789 joinable!(comment_reply -> comment (comment_id));
790 joinable!(comment_reply -> person (recipient_id));
791 joinable!(post -> community (community_id));
792 joinable!(post -> person (creator_id));
793 joinable!(person_post_aggregates -> post (post_id));
794 joinable!(person_post_aggregates -> person (person_id));
795 joinable!(post_aggregates -> post (post_id));
796 joinable!(post_like -> person (person_id));
797 joinable!(post_like -> post (post_id));
798 joinable!(post_read -> person (person_id));
799 joinable!(post_read -> post (post_id));
800 joinable!(post_report -> post (post_id));
801 joinable!(post_saved -> person (person_id));
802 joinable!(post_saved -> post (post_id));
803 joinable!(site_aggregates -> site (site_id));
804 joinable!(email_verification -> local_user (local_user_id));
805 joinable!(registration_application -> local_user (local_user_id));
806 joinable!(registration_application -> person (admin_id));
807 joinable!(mod_hide_community -> person (mod_person_id));
808 joinable!(mod_hide_community -> community (community_id));
809 joinable!(post -> language (language_id));
810 joinable!(comment -> language (language_id));
811 joinable!(local_user_language -> language (language_id));
812 joinable!(local_user_language -> local_user (local_user_id));
813 joinable!(private_message_report -> private_message (private_message_id));
814 joinable!(site_language -> language (language_id));
815 joinable!(site_language -> site (site_id));
816 joinable!(community_language -> language (language_id));
817 joinable!(community_language -> community (community_id));
818 joinable!(person_follower -> person (follower_id));
820 joinable!(admin_purge_comment -> person (admin_person_id));
821 joinable!(admin_purge_comment -> post (post_id));
822 joinable!(admin_purge_community -> person (admin_person_id));
823 joinable!(admin_purge_person -> person (admin_person_id));
824 joinable!(admin_purge_post -> community (community_id));
825 joinable!(admin_purge_post -> person (admin_person_id));
827 joinable!(site -> instance (instance_id));
828 joinable!(person -> instance (instance_id));
829 joinable!(community -> instance (instance_id));
830 joinable!(federation_allowlist -> instance (instance_id));
831 joinable!(federation_blocklist -> instance (instance_id));
832 joinable!(local_site -> site (site_id));
833 joinable!(local_site_rate_limit -> local_site (local_site_id));
834 joinable!(tagline -> local_site (local_site_id));
836 allow_tables_to_appear_in_same_query!(
845 community_aggregates,
848 community_person_ban,
852 mod_transfer_community,
854 mod_ban_from_community,
857 mod_remove_community,
861 password_reset_request,
867 person_post_aggregates,
876 private_message_report,
880 admin_purge_community,
884 registration_application,
891 federation_allowlist,
892 federation_blocklist,
894 local_site_rate_limit,