]> Untitled Git - lemmy.git/blob - crates/db_schema/src/schema.rs
17a0f99f8e59228d05122a8026fc26ee07bc9f2e
[lemmy.git] / crates / db_schema / src / schema.rs
1 // @generated automatically by Diesel CLI.
2
3 pub mod sql_types {
4     #[derive(diesel::sql_types::SqlType)]
5     #[diesel(postgres_type(name = "listing_type_enum"))]
6     pub struct ListingTypeEnum;
7
8     #[derive(diesel::sql_types::SqlType)]
9     #[diesel(postgres_type(name = "registration_mode_enum"))]
10     pub struct RegistrationModeEnum;
11
12     #[derive(diesel::sql_types::SqlType)]
13     #[diesel(postgres_type(name = "sort_type_enum"))]
14     pub struct SortTypeEnum;
15 }
16
17 diesel::table! {
18     admin_purge_comment (id) {
19         id -> Int4,
20         admin_person_id -> Int4,
21         post_id -> Int4,
22         reason -> Nullable<Text>,
23         when_ -> Timestamp,
24     }
25 }
26
27 diesel::table! {
28     admin_purge_community (id) {
29         id -> Int4,
30         admin_person_id -> Int4,
31         reason -> Nullable<Text>,
32         when_ -> Timestamp,
33     }
34 }
35
36 diesel::table! {
37     admin_purge_person (id) {
38         id -> Int4,
39         admin_person_id -> Int4,
40         reason -> Nullable<Text>,
41         when_ -> Timestamp,
42     }
43 }
44
45 diesel::table! {
46     admin_purge_post (id) {
47         id -> Int4,
48         admin_person_id -> Int4,
49         community_id -> Int4,
50         reason -> Nullable<Text>,
51         when_ -> Timestamp,
52     }
53 }
54
55 diesel::table! {
56     captcha_answer (id) {
57         id -> Int4,
58         uuid -> Uuid,
59         answer -> Text,
60         published -> Timestamp,
61     }
62 }
63
64 diesel::table! {
65     use diesel::sql_types::*;
66     use diesel_ltree::sql_types::Ltree;
67
68     comment (id) {
69         id -> Int4,
70         creator_id -> Int4,
71         post_id -> Int4,
72         content -> Text,
73         removed -> Bool,
74         published -> Timestamp,
75         updated -> Nullable<Timestamp>,
76         deleted -> Bool,
77         #[max_length = 255]
78         ap_id -> Varchar,
79         local -> Bool,
80         path -> Ltree,
81         distinguished -> Bool,
82         language_id -> Int4,
83     }
84 }
85
86 diesel::table! {
87     comment_aggregates (id) {
88         id -> Int4,
89         comment_id -> Int4,
90         score -> Int8,
91         upvotes -> Int8,
92         downvotes -> Int8,
93         published -> Timestamp,
94         child_count -> Int4,
95         hot_rank -> Int4,
96     }
97 }
98
99 diesel::table! {
100     comment_like (id) {
101         id -> Int4,
102         person_id -> Int4,
103         comment_id -> Int4,
104         post_id -> Int4,
105         score -> Int2,
106         published -> Timestamp,
107     }
108 }
109
110 diesel::table! {
111     comment_reply (id) {
112         id -> Int4,
113         recipient_id -> Int4,
114         comment_id -> Int4,
115         read -> Bool,
116         published -> Timestamp,
117     }
118 }
119
120 diesel::table! {
121     comment_report (id) {
122         id -> Int4,
123         creator_id -> Int4,
124         comment_id -> Int4,
125         original_comment_text -> Text,
126         reason -> Text,
127         resolved -> Bool,
128         resolver_id -> Nullable<Int4>,
129         published -> Timestamp,
130         updated -> Nullable<Timestamp>,
131     }
132 }
133
134 diesel::table! {
135     comment_saved (id) {
136         id -> Int4,
137         comment_id -> Int4,
138         person_id -> Int4,
139         published -> Timestamp,
140     }
141 }
142
143 diesel::table! {
144     community (id) {
145         id -> Int4,
146         #[max_length = 255]
147         name -> Varchar,
148         #[max_length = 255]
149         title -> Varchar,
150         description -> Nullable<Text>,
151         removed -> Bool,
152         published -> Timestamp,
153         updated -> Nullable<Timestamp>,
154         deleted -> Bool,
155         nsfw -> Bool,
156         #[max_length = 255]
157         actor_id -> Varchar,
158         local -> Bool,
159         private_key -> Nullable<Text>,
160         public_key -> Text,
161         last_refreshed_at -> Timestamp,
162         icon -> Nullable<Text>,
163         banner -> Nullable<Text>,
164         #[max_length = 255]
165         followers_url -> Varchar,
166         #[max_length = 255]
167         inbox_url -> Varchar,
168         #[max_length = 255]
169         shared_inbox_url -> Nullable<Varchar>,
170         hidden -> Bool,
171         posting_restricted_to_mods -> Bool,
172         instance_id -> Int4,
173         #[max_length = 255]
174         moderators_url -> Nullable<Varchar>,
175         #[max_length = 255]
176         featured_url -> Nullable<Varchar>,
177     }
178 }
179
180 diesel::table! {
181     community_aggregates (id) {
182         id -> Int4,
183         community_id -> Int4,
184         subscribers -> Int8,
185         posts -> Int8,
186         comments -> Int8,
187         published -> Timestamp,
188         users_active_day -> Int8,
189         users_active_week -> Int8,
190         users_active_month -> Int8,
191         users_active_half_year -> Int8,
192         hot_rank -> Int4,
193     }
194 }
195
196 diesel::table! {
197     community_block (id) {
198         id -> Int4,
199         person_id -> Int4,
200         community_id -> Int4,
201         published -> Timestamp,
202     }
203 }
204
205 diesel::table! {
206     community_follower (id) {
207         id -> Int4,
208         community_id -> Int4,
209         person_id -> Int4,
210         published -> Timestamp,
211         pending -> Bool,
212     }
213 }
214
215 diesel::table! {
216     community_language (id) {
217         id -> Int4,
218         community_id -> Int4,
219         language_id -> Int4,
220     }
221 }
222
223 diesel::table! {
224     community_moderator (id) {
225         id -> Int4,
226         community_id -> Int4,
227         person_id -> Int4,
228         published -> Timestamp,
229     }
230 }
231
232 diesel::table! {
233     community_person_ban (id) {
234         id -> Int4,
235         community_id -> Int4,
236         person_id -> Int4,
237         published -> Timestamp,
238         expires -> Nullable<Timestamp>,
239     }
240 }
241
242 diesel::table! {
243     custom_emoji (id) {
244         id -> Int4,
245         local_site_id -> Int4,
246         #[max_length = 128]
247         shortcode -> Varchar,
248         image_url -> Text,
249         alt_text -> Text,
250         category -> Text,
251         published -> Timestamp,
252         updated -> Nullable<Timestamp>,
253     }
254 }
255
256 diesel::table! {
257     custom_emoji_keyword (id) {
258         id -> Int4,
259         custom_emoji_id -> Int4,
260         #[max_length = 128]
261         keyword -> Varchar,
262     }
263 }
264
265 diesel::table! {
266     email_verification (id) {
267         id -> Int4,
268         local_user_id -> Int4,
269         email -> Text,
270         verification_token -> Text,
271         published -> Timestamp,
272     }
273 }
274
275 diesel::table! {
276     federation_allowlist (id) {
277         id -> Int4,
278         instance_id -> Int4,
279         published -> Timestamp,
280         updated -> Nullable<Timestamp>,
281     }
282 }
283
284 diesel::table! {
285     federation_blocklist (id) {
286         id -> Int4,
287         instance_id -> Int4,
288         published -> Timestamp,
289         updated -> Nullable<Timestamp>,
290     }
291 }
292
293 diesel::table! {
294     instance (id) {
295         id -> Int4,
296         #[max_length = 255]
297         domain -> Varchar,
298         published -> Timestamp,
299         updated -> Nullable<Timestamp>,
300         #[max_length = 255]
301         software -> Nullable<Varchar>,
302         #[max_length = 255]
303         version -> Nullable<Varchar>,
304     }
305 }
306
307 diesel::table! {
308     language (id) {
309         id -> Int4,
310         #[max_length = 3]
311         code -> Varchar,
312         name -> Text,
313     }
314 }
315
316 diesel::table! {
317     use diesel::sql_types::*;
318     use super::sql_types::ListingTypeEnum;
319     use super::sql_types::RegistrationModeEnum;
320
321     local_site (id) {
322         id -> Int4,
323         site_id -> Int4,
324         site_setup -> Bool,
325         enable_downvotes -> Bool,
326         enable_nsfw -> Bool,
327         community_creation_admin_only -> Bool,
328         require_email_verification -> Bool,
329         application_question -> Nullable<Text>,
330         private_instance -> Bool,
331         default_theme -> Text,
332         default_post_listing_type -> ListingTypeEnum,
333         legal_information -> Nullable<Text>,
334         hide_modlog_mod_names -> Bool,
335         application_email_admins -> Bool,
336         slur_filter_regex -> Nullable<Text>,
337         actor_name_max_length -> Int4,
338         federation_enabled -> Bool,
339         captcha_enabled -> Bool,
340         #[max_length = 255]
341         captcha_difficulty -> Varchar,
342         published -> Timestamp,
343         updated -> Nullable<Timestamp>,
344         registration_mode -> RegistrationModeEnum,
345         reports_email_admins -> Bool,
346     }
347 }
348
349 diesel::table! {
350     local_site_rate_limit (id) {
351         id -> Int4,
352         local_site_id -> Int4,
353         message -> Int4,
354         message_per_second -> Int4,
355         post -> Int4,
356         post_per_second -> Int4,
357         register -> Int4,
358         register_per_second -> Int4,
359         image -> Int4,
360         image_per_second -> Int4,
361         comment -> Int4,
362         comment_per_second -> Int4,
363         search -> Int4,
364         search_per_second -> Int4,
365         published -> Timestamp,
366         updated -> Nullable<Timestamp>,
367     }
368 }
369
370 diesel::table! {
371     use diesel::sql_types::*;
372     use super::sql_types::SortTypeEnum;
373     use super::sql_types::ListingTypeEnum;
374
375     local_user (id) {
376         id -> Int4,
377         person_id -> Int4,
378         password_encrypted -> Text,
379         email -> Nullable<Text>,
380         show_nsfw -> Bool,
381         theme -> Text,
382         default_sort_type -> SortTypeEnum,
383         default_listing_type -> ListingTypeEnum,
384         #[max_length = 20]
385         interface_language -> Varchar,
386         show_avatars -> Bool,
387         send_notifications_to_email -> Bool,
388         validator_time -> Timestamp,
389         show_scores -> Bool,
390         show_bot_accounts -> Bool,
391         show_read_posts -> Bool,
392         show_new_post_notifs -> Bool,
393         email_verified -> Bool,
394         accepted_application -> Bool,
395         totp_2fa_secret -> Nullable<Text>,
396         totp_2fa_url -> Nullable<Text>,
397         open_links_in_new_tab -> Bool,
398         infinite_scroll_enabled -> Bool,
399     }
400 }
401
402 diesel::table! {
403     local_user_language (id) {
404         id -> Int4,
405         local_user_id -> Int4,
406         language_id -> Int4,
407     }
408 }
409
410 diesel::table! {
411     mod_add (id) {
412         id -> Int4,
413         mod_person_id -> Int4,
414         other_person_id -> Int4,
415         removed -> Bool,
416         when_ -> Timestamp,
417     }
418 }
419
420 diesel::table! {
421     mod_add_community (id) {
422         id -> Int4,
423         mod_person_id -> Int4,
424         other_person_id -> Int4,
425         community_id -> Int4,
426         removed -> Bool,
427         when_ -> Timestamp,
428     }
429 }
430
431 diesel::table! {
432     mod_ban (id) {
433         id -> Int4,
434         mod_person_id -> Int4,
435         other_person_id -> Int4,
436         reason -> Nullable<Text>,
437         banned -> Bool,
438         expires -> Nullable<Timestamp>,
439         when_ -> Timestamp,
440     }
441 }
442
443 diesel::table! {
444     mod_ban_from_community (id) {
445         id -> Int4,
446         mod_person_id -> Int4,
447         other_person_id -> Int4,
448         community_id -> Int4,
449         reason -> Nullable<Text>,
450         banned -> Bool,
451         expires -> Nullable<Timestamp>,
452         when_ -> Timestamp,
453     }
454 }
455
456 diesel::table! {
457     mod_feature_post (id) {
458         id -> Int4,
459         mod_person_id -> Int4,
460         post_id -> Int4,
461         featured -> Bool,
462         when_ -> Timestamp,
463         is_featured_community -> Bool,
464     }
465 }
466
467 diesel::table! {
468     mod_hide_community (id) {
469         id -> Int4,
470         community_id -> Int4,
471         mod_person_id -> Int4,
472         when_ -> Timestamp,
473         reason -> Nullable<Text>,
474         hidden -> Bool,
475     }
476 }
477
478 diesel::table! {
479     mod_lock_post (id) {
480         id -> Int4,
481         mod_person_id -> Int4,
482         post_id -> Int4,
483         locked -> Bool,
484         when_ -> Timestamp,
485     }
486 }
487
488 diesel::table! {
489     mod_remove_comment (id) {
490         id -> Int4,
491         mod_person_id -> Int4,
492         comment_id -> Int4,
493         reason -> Nullable<Text>,
494         removed -> Bool,
495         when_ -> Timestamp,
496     }
497 }
498
499 diesel::table! {
500     mod_remove_community (id) {
501         id -> Int4,
502         mod_person_id -> Int4,
503         community_id -> Int4,
504         reason -> Nullable<Text>,
505         removed -> Bool,
506         expires -> Nullable<Timestamp>,
507         when_ -> Timestamp,
508     }
509 }
510
511 diesel::table! {
512     mod_remove_post (id) {
513         id -> Int4,
514         mod_person_id -> Int4,
515         post_id -> Int4,
516         reason -> Nullable<Text>,
517         removed -> Bool,
518         when_ -> Timestamp,
519     }
520 }
521
522 diesel::table! {
523     mod_transfer_community (id) {
524         id -> Int4,
525         mod_person_id -> Int4,
526         other_person_id -> Int4,
527         community_id -> Int4,
528         when_ -> Timestamp,
529     }
530 }
531
532 diesel::table! {
533     password_reset_request (id) {
534         id -> Int4,
535         token_encrypted -> Text,
536         published -> Timestamp,
537         local_user_id -> Int4,
538     }
539 }
540
541 diesel::table! {
542     person (id) {
543         id -> Int4,
544         #[max_length = 255]
545         name -> Varchar,
546         #[max_length = 255]
547         display_name -> Nullable<Varchar>,
548         avatar -> Nullable<Text>,
549         banned -> Bool,
550         published -> Timestamp,
551         updated -> Nullable<Timestamp>,
552         #[max_length = 255]
553         actor_id -> Varchar,
554         bio -> Nullable<Text>,
555         local -> Bool,
556         private_key -> Nullable<Text>,
557         public_key -> Text,
558         last_refreshed_at -> Timestamp,
559         banner -> Nullable<Text>,
560         deleted -> Bool,
561         #[max_length = 255]
562         inbox_url -> Varchar,
563         #[max_length = 255]
564         shared_inbox_url -> Nullable<Varchar>,
565         matrix_user_id -> Nullable<Text>,
566         admin -> Bool,
567         bot_account -> Bool,
568         ban_expires -> Nullable<Timestamp>,
569         instance_id -> Int4,
570     }
571 }
572
573 diesel::table! {
574     person_aggregates (id) {
575         id -> Int4,
576         person_id -> Int4,
577         post_count -> Int8,
578         post_score -> Int8,
579         comment_count -> Int8,
580         comment_score -> Int8,
581     }
582 }
583
584 diesel::table! {
585     person_ban (id) {
586         id -> Int4,
587         person_id -> Int4,
588         published -> Timestamp,
589     }
590 }
591
592 diesel::table! {
593     person_block (id) {
594         id -> Int4,
595         person_id -> Int4,
596         target_id -> Int4,
597         published -> Timestamp,
598     }
599 }
600
601 diesel::table! {
602     person_follower (id) {
603         id -> Int4,
604         person_id -> Int4,
605         follower_id -> Int4,
606         published -> Timestamp,
607         pending -> Bool,
608     }
609 }
610
611 diesel::table! {
612     person_mention (id) {
613         id -> Int4,
614         recipient_id -> Int4,
615         comment_id -> Int4,
616         read -> Bool,
617         published -> Timestamp,
618     }
619 }
620
621 diesel::table! {
622     person_post_aggregates (id) {
623         id -> Int4,
624         person_id -> Int4,
625         post_id -> Int4,
626         read_comments -> Int8,
627         published -> Timestamp,
628     }
629 }
630
631 diesel::table! {
632     post (id) {
633         id -> Int4,
634         #[max_length = 200]
635         name -> Varchar,
636         #[max_length = 512]
637         url -> Nullable<Varchar>,
638         body -> Nullable<Text>,
639         creator_id -> Int4,
640         community_id -> Int4,
641         removed -> Bool,
642         locked -> Bool,
643         published -> Timestamp,
644         updated -> Nullable<Timestamp>,
645         deleted -> Bool,
646         nsfw -> Bool,
647         embed_title -> Nullable<Text>,
648         embed_description -> Nullable<Text>,
649         thumbnail_url -> Nullable<Text>,
650         #[max_length = 255]
651         ap_id -> Varchar,
652         local -> Bool,
653         embed_video_url -> Nullable<Text>,
654         language_id -> Int4,
655         featured_community -> Bool,
656         featured_local -> Bool,
657     }
658 }
659
660 diesel::table! {
661     post_aggregates (id) {
662         id -> Int4,
663         post_id -> Int4,
664         comments -> Int8,
665         score -> Int8,
666         upvotes -> Int8,
667         downvotes -> Int8,
668         published -> Timestamp,
669         newest_comment_time_necro -> Timestamp,
670         newest_comment_time -> Timestamp,
671         featured_community -> Bool,
672         featured_local -> Bool,
673         hot_rank -> Int4,
674         hot_rank_active -> Int4,
675         community_id -> Int4,
676         creator_id -> Int4,
677     }
678 }
679
680 diesel::table! {
681     post_like (id) {
682         id -> Int4,
683         post_id -> Int4,
684         person_id -> Int4,
685         score -> Int2,
686         published -> Timestamp,
687     }
688 }
689
690 diesel::table! {
691     post_read (id) {
692         id -> Int4,
693         post_id -> Int4,
694         person_id -> Int4,
695         published -> Timestamp,
696     }
697 }
698
699 diesel::table! {
700     post_report (id) {
701         id -> Int4,
702         creator_id -> Int4,
703         post_id -> Int4,
704         #[max_length = 200]
705         original_post_name -> Varchar,
706         original_post_url -> Nullable<Text>,
707         original_post_body -> Nullable<Text>,
708         reason -> Text,
709         resolved -> Bool,
710         resolver_id -> Nullable<Int4>,
711         published -> Timestamp,
712         updated -> Nullable<Timestamp>,
713     }
714 }
715
716 diesel::table! {
717     post_saved (id) {
718         id -> Int4,
719         post_id -> Int4,
720         person_id -> Int4,
721         published -> Timestamp,
722     }
723 }
724
725 diesel::table! {
726     private_message (id) {
727         id -> Int4,
728         creator_id -> Int4,
729         recipient_id -> Int4,
730         content -> Text,
731         deleted -> Bool,
732         read -> Bool,
733         published -> Timestamp,
734         updated -> Nullable<Timestamp>,
735         #[max_length = 255]
736         ap_id -> Varchar,
737         local -> Bool,
738     }
739 }
740
741 diesel::table! {
742     private_message_report (id) {
743         id -> Int4,
744         creator_id -> Int4,
745         private_message_id -> Int4,
746         original_pm_text -> Text,
747         reason -> Text,
748         resolved -> Bool,
749         resolver_id -> Nullable<Int4>,
750         published -> Timestamp,
751         updated -> Nullable<Timestamp>,
752     }
753 }
754
755 diesel::table! {
756     received_activity (id) {
757         id -> Int8,
758         ap_id -> Text,
759         published -> Timestamp,
760     }
761 }
762
763 diesel::table! {
764     registration_application (id) {
765         id -> Int4,
766         local_user_id -> Int4,
767         answer -> Text,
768         admin_id -> Nullable<Int4>,
769         deny_reason -> Nullable<Text>,
770         published -> Timestamp,
771     }
772 }
773
774 diesel::table! {
775     secret (id) {
776         id -> Int4,
777         jwt_secret -> Varchar,
778     }
779 }
780
781 diesel::table! {
782     sent_activity (id) {
783         id -> Int8,
784         ap_id -> Text,
785         data -> Json,
786         sensitive -> Bool,
787         published -> Timestamp,
788     }
789 }
790
791 diesel::table! {
792     site (id) {
793         id -> Int4,
794         #[max_length = 20]
795         name -> Varchar,
796         sidebar -> Nullable<Text>,
797         published -> Timestamp,
798         updated -> Nullable<Timestamp>,
799         icon -> Nullable<Text>,
800         banner -> Nullable<Text>,
801         #[max_length = 150]
802         description -> Nullable<Varchar>,
803         #[max_length = 255]
804         actor_id -> Varchar,
805         last_refreshed_at -> Timestamp,
806         #[max_length = 255]
807         inbox_url -> Varchar,
808         private_key -> Nullable<Text>,
809         public_key -> Text,
810         instance_id -> Int4,
811     }
812 }
813
814 diesel::table! {
815     site_aggregates (id) {
816         id -> Int4,
817         site_id -> Int4,
818         users -> Int8,
819         posts -> Int8,
820         comments -> Int8,
821         communities -> Int8,
822         users_active_day -> Int8,
823         users_active_week -> Int8,
824         users_active_month -> Int8,
825         users_active_half_year -> Int8,
826     }
827 }
828
829 diesel::table! {
830     site_language (id) {
831         id -> Int4,
832         site_id -> Int4,
833         language_id -> Int4,
834     }
835 }
836
837 diesel::table! {
838     tagline (id) {
839         id -> Int4,
840         local_site_id -> Int4,
841         content -> Text,
842         published -> Timestamp,
843         updated -> Nullable<Timestamp>,
844     }
845 }
846
847 diesel::joinable!(admin_purge_comment -> person (admin_person_id));
848 diesel::joinable!(admin_purge_comment -> post (post_id));
849 diesel::joinable!(admin_purge_community -> person (admin_person_id));
850 diesel::joinable!(admin_purge_person -> person (admin_person_id));
851 diesel::joinable!(admin_purge_post -> community (community_id));
852 diesel::joinable!(admin_purge_post -> person (admin_person_id));
853 diesel::joinable!(comment -> language (language_id));
854 diesel::joinable!(comment -> person (creator_id));
855 diesel::joinable!(comment -> post (post_id));
856 diesel::joinable!(comment_aggregates -> comment (comment_id));
857 diesel::joinable!(comment_like -> comment (comment_id));
858 diesel::joinable!(comment_like -> person (person_id));
859 diesel::joinable!(comment_like -> post (post_id));
860 diesel::joinable!(comment_reply -> comment (comment_id));
861 diesel::joinable!(comment_reply -> person (recipient_id));
862 diesel::joinable!(comment_report -> comment (comment_id));
863 diesel::joinable!(comment_saved -> comment (comment_id));
864 diesel::joinable!(comment_saved -> person (person_id));
865 diesel::joinable!(community -> instance (instance_id));
866 diesel::joinable!(community_aggregates -> community (community_id));
867 diesel::joinable!(community_block -> community (community_id));
868 diesel::joinable!(community_block -> person (person_id));
869 diesel::joinable!(community_follower -> community (community_id));
870 diesel::joinable!(community_follower -> person (person_id));
871 diesel::joinable!(community_language -> community (community_id));
872 diesel::joinable!(community_language -> language (language_id));
873 diesel::joinable!(community_moderator -> community (community_id));
874 diesel::joinable!(community_moderator -> person (person_id));
875 diesel::joinable!(community_person_ban -> community (community_id));
876 diesel::joinable!(community_person_ban -> person (person_id));
877 diesel::joinable!(custom_emoji -> local_site (local_site_id));
878 diesel::joinable!(custom_emoji_keyword -> custom_emoji (custom_emoji_id));
879 diesel::joinable!(email_verification -> local_user (local_user_id));
880 diesel::joinable!(federation_allowlist -> instance (instance_id));
881 diesel::joinable!(federation_blocklist -> instance (instance_id));
882 diesel::joinable!(local_site -> site (site_id));
883 diesel::joinable!(local_site_rate_limit -> local_site (local_site_id));
884 diesel::joinable!(local_user -> person (person_id));
885 diesel::joinable!(local_user_language -> language (language_id));
886 diesel::joinable!(local_user_language -> local_user (local_user_id));
887 diesel::joinable!(mod_add_community -> community (community_id));
888 diesel::joinable!(mod_ban_from_community -> community (community_id));
889 diesel::joinable!(mod_feature_post -> person (mod_person_id));
890 diesel::joinable!(mod_feature_post -> post (post_id));
891 diesel::joinable!(mod_hide_community -> community (community_id));
892 diesel::joinable!(mod_hide_community -> person (mod_person_id));
893 diesel::joinable!(mod_lock_post -> person (mod_person_id));
894 diesel::joinable!(mod_lock_post -> post (post_id));
895 diesel::joinable!(mod_remove_comment -> comment (comment_id));
896 diesel::joinable!(mod_remove_comment -> person (mod_person_id));
897 diesel::joinable!(mod_remove_community -> community (community_id));
898 diesel::joinable!(mod_remove_community -> person (mod_person_id));
899 diesel::joinable!(mod_remove_post -> person (mod_person_id));
900 diesel::joinable!(mod_remove_post -> post (post_id));
901 diesel::joinable!(mod_transfer_community -> community (community_id));
902 diesel::joinable!(password_reset_request -> local_user (local_user_id));
903 diesel::joinable!(person -> instance (instance_id));
904 diesel::joinable!(person_aggregates -> person (person_id));
905 diesel::joinable!(person_ban -> person (person_id));
906 diesel::joinable!(person_mention -> comment (comment_id));
907 diesel::joinable!(person_mention -> person (recipient_id));
908 diesel::joinable!(person_post_aggregates -> person (person_id));
909 diesel::joinable!(person_post_aggregates -> post (post_id));
910 diesel::joinable!(post -> community (community_id));
911 diesel::joinable!(post -> language (language_id));
912 diesel::joinable!(post -> person (creator_id));
913 diesel::joinable!(post_aggregates -> community (community_id));
914 diesel::joinable!(post_aggregates -> person (creator_id));
915 diesel::joinable!(post_aggregates -> post (post_id));
916 diesel::joinable!(post_like -> person (person_id));
917 diesel::joinable!(post_like -> post (post_id));
918 diesel::joinable!(post_read -> person (person_id));
919 diesel::joinable!(post_read -> post (post_id));
920 diesel::joinable!(post_report -> post (post_id));
921 diesel::joinable!(post_saved -> person (person_id));
922 diesel::joinable!(post_saved -> post (post_id));
923 diesel::joinable!(private_message_report -> private_message (private_message_id));
924 diesel::joinable!(registration_application -> local_user (local_user_id));
925 diesel::joinable!(registration_application -> person (admin_id));
926 diesel::joinable!(site -> instance (instance_id));
927 diesel::joinable!(site_aggregates -> site (site_id));
928 diesel::joinable!(site_language -> language (language_id));
929 diesel::joinable!(site_language -> site (site_id));
930 diesel::joinable!(tagline -> local_site (local_site_id));
931
932 diesel::allow_tables_to_appear_in_same_query!(
933     admin_purge_comment,
934     admin_purge_community,
935     admin_purge_person,
936     admin_purge_post,
937     captcha_answer,
938     comment,
939     comment_aggregates,
940     comment_like,
941     comment_reply,
942     comment_report,
943     comment_saved,
944     community,
945     community_aggregates,
946     community_block,
947     community_follower,
948     community_language,
949     community_moderator,
950     community_person_ban,
951     custom_emoji,
952     custom_emoji_keyword,
953     email_verification,
954     federation_allowlist,
955     federation_blocklist,
956     instance,
957     language,
958     local_site,
959     local_site_rate_limit,
960     local_user,
961     local_user_language,
962     mod_add,
963     mod_add_community,
964     mod_ban,
965     mod_ban_from_community,
966     mod_feature_post,
967     mod_hide_community,
968     mod_lock_post,
969     mod_remove_comment,
970     mod_remove_community,
971     mod_remove_post,
972     mod_transfer_community,
973     password_reset_request,
974     person,
975     person_aggregates,
976     person_ban,
977     person_block,
978     person_follower,
979     person_mention,
980     person_post_aggregates,
981     post,
982     post_aggregates,
983     post_like,
984     post_read,
985     post_report,
986     post_saved,
987     private_message,
988     private_message_report,
989     received_activity,
990     registration_application,
991     secret,
992     sent_activity,
993     site,
994     site_aggregates,
995     site_language,
996     tagline,
997 );