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