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_sticky_post (id) {
278 mod_person_id -> Int4,
280 stickied -> Nullable<Bool>,
286 password_reset_request (id) {
288 token_encrypted -> Text,
289 published -> Timestamp,
290 local_user_id -> Int4,
298 display_name -> Nullable<Varchar>,
299 avatar -> Nullable<Varchar>,
301 published -> Timestamp,
302 updated -> Nullable<Timestamp>,
304 bio -> Nullable<Text>,
306 private_key -> Nullable<Text>,
308 last_refreshed_at -> Timestamp,
309 banner -> Nullable<Varchar>,
311 inbox_url -> Varchar,
312 shared_inbox_url -> Nullable<Varchar>,
313 matrix_user_id -> Nullable<Text>,
316 ban_expires -> Nullable<Timestamp>,
322 person_aggregates (id) {
327 comment_count -> Int8,
328 comment_score -> Int8,
336 published -> Timestamp,
341 person_mention (id) {
343 recipient_id -> Int4,
346 published -> Timestamp,
353 recipient_id -> Int4,
356 published -> Timestamp,
364 url -> Nullable<Varchar>,
365 body -> Nullable<Text>,
367 community_id -> Int4,
370 published -> Timestamp,
371 updated -> Nullable<Timestamp>,
375 embed_title -> Nullable<Text>,
376 embed_description -> Nullable<Text>,
377 embed_video_url -> Nullable<Text>,
378 thumbnail_url -> Nullable<Text>,
386 person_post_aggregates (id) {
390 read_comments -> Int8,
391 published -> Timestamp,
396 post_aggregates (id) {
404 published -> Timestamp,
405 newest_comment_time_necro -> Timestamp,
406 newest_comment_time -> Timestamp,
416 published -> Timestamp,
425 published -> Timestamp,
434 original_post_name -> Varchar,
435 original_post_url -> Nullable<Text>,
436 original_post_body -> Nullable<Text>,
439 resolver_id -> Nullable<Int4>,
440 published -> Timestamp,
441 updated -> Nullable<Timestamp>,
450 published -> Timestamp,
455 private_message (id) {
458 recipient_id -> Int4,
462 published -> Timestamp,
463 updated -> Nullable<Timestamp>,
470 private_message_report (id) {
473 private_message_id -> Int4,
474 original_pm_text -> Text,
477 resolver_id -> Nullable<Int4>,
478 published -> Timestamp,
479 updated -> Nullable<Timestamp>,
487 sidebar -> Nullable<Text>,
488 published -> Timestamp,
489 updated -> Nullable<Timestamp>,
490 icon -> Nullable<Varchar>,
491 banner -> Nullable<Varchar>,
492 description -> Nullable<Text>,
494 last_refreshed_at -> Timestamp,
496 private_key -> Nullable<Text>,
503 site_aggregates (id) {
510 users_active_day -> Int8,
511 users_active_week -> Int8,
512 users_active_month -> Int8,
513 users_active_half_year -> Int8,
522 published -> Timestamp,
527 community_block (id) {
530 community_id -> Int4,
531 published -> Timestamp,
538 jwt_secret -> Varchar,
543 admin_purge_comment (id) {
545 admin_person_id -> Int4,
547 reason -> Nullable<Text>,
553 email_verification (id) {
555 local_user_id -> Int4,
557 verification_token -> Varchar,
558 published -> Timestamp,
563 admin_purge_community (id) {
565 admin_person_id -> Int4,
566 reason -> Nullable<Text>,
572 admin_purge_person (id) {
574 admin_person_id -> Int4,
575 reason -> Nullable<Text>,
581 admin_purge_post (id) {
583 admin_person_id -> Int4,
584 community_id -> Int4,
585 reason -> Nullable<Text>,
591 registration_application (id) {
593 local_user_id -> Int4,
595 admin_id -> Nullable<Int4>,
596 deny_reason -> Nullable<Text>,
597 published -> Timestamp,
602 mod_hide_community (id) {
604 community_id -> Int4,
605 mod_person_id -> Int4,
606 reason -> Nullable<Text>,
607 hidden -> Nullable<Bool>,
621 local_user_language(id) {
623 local_user_id -> Int4,
637 community_language(id) {
639 community_id -> Int4,
648 published -> Timestamp,
649 updated -> Nullable<Timestamp>,
654 federation_allowlist(id) {
657 published -> Timestamp,
658 updated -> Nullable<Timestamp>,
663 federation_blocklist(id) {
666 published -> Timestamp,
667 updated -> Nullable<Timestamp>,
676 enable_downvotes -> Bool,
677 open_registration -> Bool,
679 community_creation_admin_only -> Bool,
680 require_email_verification -> Bool,
681 require_application -> Bool,
682 application_question -> Nullable<Text>,
683 private_instance -> Bool,
684 default_theme -> Text,
685 default_post_listing_type -> Text,
686 legal_information -> Nullable<Text>,
687 hide_modlog_mod_names -> Bool,
688 application_email_admins -> Bool,
689 slur_filter_regex -> Nullable<Text>,
690 actor_name_max_length -> Int4,
691 federation_enabled -> Bool,
692 federation_debug -> Bool,
693 federation_worker_count -> Int4,
694 captcha_enabled -> Bool,
695 captcha_difficulty -> Text,
696 published -> Timestamp,
697 updated -> Nullable<Timestamp>,
702 local_site_rate_limit(id) {
704 local_site_id -> Int4,
706 message_per_second-> Int4,
708 post_per_second -> Int4,
710 register_per_second -> Int4,
712 image_per_second -> Int4,
714 comment_per_second -> Int4,
716 search_per_second -> Int4,
717 published -> Timestamp,
718 updated -> Nullable<Timestamp>,
725 local_site_id -> Int4,
727 published -> Timestamp,
728 updated -> Nullable<Timestamp>,
733 person_follower (id) {
737 published -> Timestamp,
742 joinable!(person_block -> person (person_id));
744 joinable!(comment -> person (creator_id));
745 joinable!(comment -> post (post_id));
746 joinable!(comment_aggregates -> comment (comment_id));
747 joinable!(comment_like -> comment (comment_id));
748 joinable!(comment_like -> person (person_id));
749 joinable!(comment_like -> post (post_id));
750 joinable!(comment_report -> comment (comment_id));
751 joinable!(comment_saved -> comment (comment_id));
752 joinable!(comment_saved -> person (person_id));
753 joinable!(community_aggregates -> community (community_id));
754 joinable!(community_block -> community (community_id));
755 joinable!(community_block -> person (person_id));
756 joinable!(community_follower -> community (community_id));
757 joinable!(community_follower -> person (person_id));
758 joinable!(community_moderator -> community (community_id));
759 joinable!(community_moderator -> person (person_id));
760 joinable!(community_person_ban -> community (community_id));
761 joinable!(community_person_ban -> person (person_id));
762 joinable!(local_user -> person (person_id));
763 joinable!(mod_add_community -> community (community_id));
764 joinable!(mod_transfer_community -> community (community_id));
765 joinable!(mod_ban_from_community -> community (community_id));
766 joinable!(mod_lock_post -> person (mod_person_id));
767 joinable!(mod_lock_post -> post (post_id));
768 joinable!(mod_remove_comment -> comment (comment_id));
769 joinable!(mod_remove_comment -> person (mod_person_id));
770 joinable!(mod_remove_community -> community (community_id));
771 joinable!(mod_remove_community -> person (mod_person_id));
772 joinable!(mod_remove_post -> person (mod_person_id));
773 joinable!(mod_remove_post -> post (post_id));
774 joinable!(mod_sticky_post -> person (mod_person_id));
775 joinable!(mod_sticky_post -> post (post_id));
776 joinable!(password_reset_request -> local_user (local_user_id));
777 joinable!(person_aggregates -> person (person_id));
778 joinable!(person_ban -> person (person_id));
779 joinable!(person_mention -> comment (comment_id));
780 joinable!(person_mention -> person (recipient_id));
781 joinable!(comment_reply -> comment (comment_id));
782 joinable!(comment_reply -> person (recipient_id));
783 joinable!(post -> community (community_id));
784 joinable!(post -> person (creator_id));
785 joinable!(person_post_aggregates -> post (post_id));
786 joinable!(person_post_aggregates -> person (person_id));
787 joinable!(post_aggregates -> post (post_id));
788 joinable!(post_like -> person (person_id));
789 joinable!(post_like -> post (post_id));
790 joinable!(post_read -> person (person_id));
791 joinable!(post_read -> post (post_id));
792 joinable!(post_report -> post (post_id));
793 joinable!(post_saved -> person (person_id));
794 joinable!(post_saved -> post (post_id));
795 joinable!(site_aggregates -> site (site_id));
796 joinable!(email_verification -> local_user (local_user_id));
797 joinable!(registration_application -> local_user (local_user_id));
798 joinable!(registration_application -> person (admin_id));
799 joinable!(mod_hide_community -> person (mod_person_id));
800 joinable!(mod_hide_community -> community (community_id));
801 joinable!(post -> language (language_id));
802 joinable!(comment -> language (language_id));
803 joinable!(local_user_language -> language (language_id));
804 joinable!(local_user_language -> local_user (local_user_id));
805 joinable!(private_message_report -> private_message (private_message_id));
806 joinable!(site_language -> language (language_id));
807 joinable!(site_language -> site (site_id));
808 joinable!(community_language -> language (language_id));
809 joinable!(community_language -> community (community_id));
810 joinable!(person_follower -> person (follower_id));
812 joinable!(admin_purge_comment -> person (admin_person_id));
813 joinable!(admin_purge_comment -> post (post_id));
814 joinable!(admin_purge_community -> person (admin_person_id));
815 joinable!(admin_purge_person -> person (admin_person_id));
816 joinable!(admin_purge_post -> community (community_id));
817 joinable!(admin_purge_post -> person (admin_person_id));
819 joinable!(site -> instance (instance_id));
820 joinable!(person -> instance (instance_id));
821 joinable!(community -> instance (instance_id));
822 joinable!(federation_allowlist -> instance (instance_id));
823 joinable!(federation_blocklist -> instance (instance_id));
824 joinable!(local_site -> site (site_id));
825 joinable!(local_site_rate_limit -> local_site (local_site_id));
826 joinable!(tagline -> local_site (local_site_id));
828 allow_tables_to_appear_in_same_query!(
837 community_aggregates,
840 community_person_ban,
844 mod_transfer_community,
846 mod_ban_from_community,
849 mod_remove_community,
853 password_reset_request,
859 person_post_aggregates,
868 private_message_report,
872 admin_purge_community,
876 registration_application,
883 federation_allowlist,
884 federation_blocklist,
886 local_site_rate_limit,