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