6 published -> Timestamp,
7 updated -> Nullable<Timestamp>,
9 sensitive -> Nullable<Bool>,
18 parent_id -> Nullable<Int4>,
22 published -> Timestamp,
23 updated -> Nullable<Timestamp>,
31 comment_aggregates (id) {
37 published -> Timestamp,
48 published -> Timestamp,
57 original_comment_text -> Text,
60 resolver_id -> Nullable<Int4>,
61 published -> Timestamp,
62 updated -> Nullable<Timestamp>,
71 published -> Timestamp,
80 description -> Nullable<Text>,
82 published -> Timestamp,
83 updated -> Nullable<Timestamp>,
88 private_key -> Nullable<Text>,
90 last_refreshed_at -> Timestamp,
91 icon -> Nullable<Varchar>,
92 banner -> Nullable<Varchar>,
93 followers_url -> Varchar,
95 shared_inbox_url -> Nullable<Varchar>,
100 community_aggregates (id) {
102 community_id -> Int4,
106 published -> Timestamp,
107 users_active_day -> Int8,
108 users_active_week -> Int8,
109 users_active_month -> Int8,
110 users_active_half_year -> Int8,
115 community_follower (id) {
117 community_id -> Int4,
119 published -> Timestamp,
120 pending -> Nullable<Bool>,
125 community_moderator (id) {
127 community_id -> Int4,
129 published -> Timestamp,
134 community_person_ban (id) {
136 community_id -> Int4,
138 published -> Timestamp,
139 expires -> Nullable<Timestamp>,
147 password_encrypted -> Text,
148 email -> Nullable<Text>,
151 default_sort_type -> Int2,
152 default_listing_type -> Int2,
154 show_avatars -> Bool,
155 send_notifications_to_email -> Bool,
156 validator_time -> Timestamp,
157 show_bot_accounts -> Bool,
159 show_read_posts -> Bool,
160 show_new_post_notifs -> Bool,
161 email_verified -> Bool,
162 accepted_application -> Bool,
169 mod_person_id -> Int4,
170 other_person_id -> Int4,
171 removed -> Nullable<Bool>,
177 mod_add_community (id) {
179 mod_person_id -> Int4,
180 other_person_id -> Int4,
181 community_id -> Int4,
182 removed -> Nullable<Bool>,
188 mod_transfer_community (id) {
190 mod_person_id -> Int4,
191 other_person_id -> Int4,
192 community_id -> Int4,
193 removed -> Nullable<Bool>,
201 mod_person_id -> Int4,
202 other_person_id -> Int4,
203 reason -> Nullable<Text>,
204 banned -> Nullable<Bool>,
205 expires -> Nullable<Timestamp>,
211 mod_ban_from_community (id) {
213 mod_person_id -> Int4,
214 other_person_id -> Int4,
215 community_id -> Int4,
216 reason -> Nullable<Text>,
217 banned -> Nullable<Bool>,
218 expires -> Nullable<Timestamp>,
226 mod_person_id -> Int4,
228 locked -> Nullable<Bool>,
234 mod_remove_comment (id) {
236 mod_person_id -> Int4,
238 reason -> Nullable<Text>,
239 removed -> Nullable<Bool>,
245 mod_remove_community (id) {
247 mod_person_id -> Int4,
248 community_id -> Int4,
249 reason -> Nullable<Text>,
250 removed -> Nullable<Bool>,
251 expires -> Nullable<Timestamp>,
257 mod_remove_post (id) {
259 mod_person_id -> Int4,
261 reason -> Nullable<Text>,
262 removed -> Nullable<Bool>,
268 mod_sticky_post (id) {
270 mod_person_id -> Int4,
272 stickied -> Nullable<Bool>,
278 password_reset_request (id) {
280 token_encrypted -> Text,
281 published -> Timestamp,
282 local_user_id -> Int4,
290 display_name -> Nullable<Varchar>,
291 avatar -> Nullable<Varchar>,
293 published -> Timestamp,
294 updated -> Nullable<Timestamp>,
296 bio -> Nullable<Text>,
298 private_key -> Nullable<Text>,
300 last_refreshed_at -> Timestamp,
301 banner -> Nullable<Varchar>,
303 inbox_url -> Varchar,
304 shared_inbox_url -> Nullable<Varchar>,
305 matrix_user_id -> Nullable<Text>,
308 ban_expires -> Nullable<Timestamp>,
313 person_aggregates (id) {
318 comment_count -> Int8,
319 comment_score -> Int8,
327 published -> Timestamp,
332 person_mention (id) {
334 recipient_id -> Int4,
337 published -> Timestamp,
345 url -> Nullable<Varchar>,
346 body -> Nullable<Text>,
348 community_id -> Int4,
351 published -> Timestamp,
352 updated -> Nullable<Timestamp>,
356 embed_title -> Nullable<Text>,
357 embed_description -> Nullable<Text>,
358 embed_html -> Nullable<Text>,
359 thumbnail_url -> Nullable<Text>,
366 post_aggregates (id) {
374 published -> Timestamp,
375 newest_comment_time_necro -> Timestamp,
376 newest_comment_time -> Timestamp,
386 published -> Timestamp,
395 published -> Timestamp,
404 original_post_name -> Varchar,
405 original_post_url -> Nullable<Text>,
406 original_post_body -> Nullable<Text>,
409 resolver_id -> Nullable<Int4>,
410 published -> Timestamp,
411 updated -> Nullable<Timestamp>,
420 published -> Timestamp,
425 private_message (id) {
428 recipient_id -> Int4,
432 published -> Timestamp,
433 updated -> Nullable<Timestamp>,
443 sidebar -> Nullable<Text>,
444 published -> Timestamp,
445 updated -> Nullable<Timestamp>,
446 enable_downvotes -> Bool,
447 open_registration -> Bool,
449 icon -> Nullable<Varchar>,
450 banner -> Nullable<Varchar>,
451 description -> Nullable<Text>,
452 community_creation_admin_only -> Bool,
453 require_email_verification -> Bool,
454 require_application -> Bool,
455 application_question -> Nullable<Text>,
456 private_instance -> Bool,
461 site_aggregates (id) {
468 users_active_day -> Int8,
469 users_active_week -> Int8,
470 users_active_month -> Int8,
471 users_active_half_year -> Int8,
480 published -> Timestamp,
485 community_block (id) {
488 community_id -> Int4,
489 published -> Timestamp,
493 // These are necessary since diesel doesn't have self joins / aliases
495 comment_alias_1 (id) {
499 parent_id -> Nullable<Int4>,
503 published -> Timestamp,
504 updated -> Nullable<Timestamp>,
512 person_alias_1 (id) {
515 display_name -> Nullable<Varchar>,
516 avatar -> Nullable<Varchar>,
518 published -> Timestamp,
519 updated -> Nullable<Timestamp>,
521 bio -> Nullable<Text>,
523 private_key -> Nullable<Text>,
525 last_refreshed_at -> Timestamp,
526 banner -> Nullable<Varchar>,
528 inbox_url -> Varchar,
529 shared_inbox_url -> Nullable<Varchar>,
530 matrix_user_id -> Nullable<Text>,
533 ban_expires -> Nullable<Timestamp>,
538 person_alias_2 (id) {
541 display_name -> Nullable<Varchar>,
542 avatar -> Nullable<Varchar>,
544 published -> Timestamp,
545 updated -> Nullable<Timestamp>,
547 bio -> Nullable<Text>,
549 private_key -> Nullable<Text>,
551 last_refreshed_at -> Timestamp,
552 banner -> Nullable<Varchar>,
554 inbox_url -> Varchar,
555 shared_inbox_url -> Nullable<Varchar>,
556 matrix_user_id -> Nullable<Text>,
559 ban_expires -> Nullable<Timestamp>,
566 jwt_secret -> Varchar,
571 email_verification (id) {
573 local_user_id -> Int4,
575 verification_token -> Varchar,
576 published -> Timestamp,
581 registration_application (id) {
583 local_user_id -> Int4,
585 admin_id -> Nullable<Int4>,
586 deny_reason -> Nullable<Text>,
587 published -> Timestamp,
591 joinable!(comment_alias_1 -> person_alias_1 (creator_id));
592 joinable!(comment -> comment_alias_1 (parent_id));
593 joinable!(person_mention -> person_alias_1 (recipient_id));
594 joinable!(post -> person_alias_1 (creator_id));
595 joinable!(comment -> person_alias_1 (creator_id));
597 joinable!(post_report -> person_alias_2 (resolver_id));
598 joinable!(comment_report -> person_alias_2 (resolver_id));
600 joinable!(person_block -> person (person_id));
601 joinable!(person_block -> person_alias_1 (target_id));
603 joinable!(comment -> person (creator_id));
604 joinable!(comment -> post (post_id));
605 joinable!(comment_aggregates -> comment (comment_id));
606 joinable!(comment_like -> comment (comment_id));
607 joinable!(comment_like -> person (person_id));
608 joinable!(comment_like -> post (post_id));
609 joinable!(comment_report -> comment (comment_id));
610 joinable!(comment_saved -> comment (comment_id));
611 joinable!(comment_saved -> person (person_id));
612 joinable!(community_aggregates -> community (community_id));
613 joinable!(community_block -> community (community_id));
614 joinable!(community_block -> person (person_id));
615 joinable!(community_follower -> community (community_id));
616 joinable!(community_follower -> person (person_id));
617 joinable!(community_moderator -> community (community_id));
618 joinable!(community_moderator -> person (person_id));
619 joinable!(community_person_ban -> community (community_id));
620 joinable!(community_person_ban -> person (person_id));
621 joinable!(local_user -> person (person_id));
622 joinable!(mod_add_community -> community (community_id));
623 joinable!(mod_transfer_community -> community (community_id));
624 joinable!(mod_ban_from_community -> community (community_id));
625 joinable!(mod_lock_post -> person (mod_person_id));
626 joinable!(mod_lock_post -> post (post_id));
627 joinable!(mod_remove_comment -> comment (comment_id));
628 joinable!(mod_remove_comment -> person (mod_person_id));
629 joinable!(mod_remove_community -> community (community_id));
630 joinable!(mod_remove_community -> person (mod_person_id));
631 joinable!(mod_remove_post -> person (mod_person_id));
632 joinable!(mod_remove_post -> post (post_id));
633 joinable!(mod_sticky_post -> person (mod_person_id));
634 joinable!(mod_sticky_post -> post (post_id));
635 joinable!(password_reset_request -> local_user (local_user_id));
636 joinable!(person_aggregates -> person (person_id));
637 joinable!(person_ban -> person (person_id));
638 joinable!(person_mention -> comment (comment_id));
639 joinable!(person_mention -> person (recipient_id));
640 joinable!(post -> community (community_id));
641 joinable!(post -> person (creator_id));
642 joinable!(post_aggregates -> post (post_id));
643 joinable!(post_like -> person (person_id));
644 joinable!(post_like -> post (post_id));
645 joinable!(post_read -> person (person_id));
646 joinable!(post_read -> post (post_id));
647 joinable!(post_report -> post (post_id));
648 joinable!(post_saved -> person (person_id));
649 joinable!(post_saved -> post (post_id));
650 joinable!(site_aggregates -> site (site_id));
651 joinable!(email_verification -> local_user (local_user_id));
652 joinable!(registration_application -> local_user (local_user_id));
653 joinable!(registration_application -> person (admin_id));
655 allow_tables_to_appear_in_same_query!(
664 community_aggregates,
667 community_person_ban,
671 mod_transfer_community,
673 mod_ban_from_community,
676 mod_remove_community,
679 password_reset_request,
698 registration_application