6 published -> Timestamp,
7 updated -> Nullable<Timestamp>,
8 ap_id -> Nullable<Text>,
9 sensitive -> Nullable<Bool>,
25 parent_id -> Nullable<Int4>,
29 published -> Timestamp,
30 updated -> Nullable<Timestamp>,
38 comment_aggregates (id) {
54 published -> Timestamp,
63 original_comment_text -> Text,
66 resolver_id -> Nullable<Int4>,
67 published -> Timestamp,
68 updated -> Nullable<Timestamp>,
77 published -> Timestamp,
86 description -> Nullable<Text>,
90 published -> Timestamp,
91 updated -> Nullable<Timestamp>,
96 private_key -> Nullable<Text>,
97 public_key -> Nullable<Text>,
98 last_refreshed_at -> Timestamp,
99 icon -> Nullable<Text>,
100 banner -> Nullable<Text>,
105 community_aggregates (id) {
107 community_id -> Int4,
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_user_ban (id) {
136 community_id -> Int4,
138 published -> Timestamp,
146 other_user_id -> Int4,
147 removed -> Nullable<Bool>,
153 mod_add_community (id) {
156 other_user_id -> Int4,
157 community_id -> Int4,
158 removed -> Nullable<Bool>,
167 other_user_id -> Int4,
168 reason -> Nullable<Text>,
169 banned -> Nullable<Bool>,
170 expires -> Nullable<Timestamp>,
176 mod_ban_from_community (id) {
179 other_user_id -> Int4,
180 community_id -> Int4,
181 reason -> Nullable<Text>,
182 banned -> Nullable<Bool>,
183 expires -> Nullable<Timestamp>,
193 locked -> Nullable<Bool>,
199 mod_remove_comment (id) {
203 reason -> Nullable<Text>,
204 removed -> Nullable<Bool>,
210 mod_remove_community (id) {
213 community_id -> Int4,
214 reason -> Nullable<Text>,
215 removed -> Nullable<Bool>,
216 expires -> Nullable<Timestamp>,
222 mod_remove_post (id) {
226 reason -> Nullable<Text>,
227 removed -> Nullable<Bool>,
233 mod_sticky_post (id) {
237 stickied -> Nullable<Bool>,
243 password_reset_request (id) {
246 token_encrypted -> Text,
247 published -> Timestamp,
255 url -> Nullable<Text>,
256 body -> Nullable<Text>,
258 community_id -> Int4,
261 published -> Timestamp,
262 updated -> Nullable<Timestamp>,
266 embed_title -> Nullable<Text>,
267 embed_description -> Nullable<Text>,
268 embed_html -> Nullable<Text>,
269 thumbnail_url -> Nullable<Text>,
276 post_aggregates (id) {
283 newest_comment_time -> Timestamp,
293 published -> Timestamp,
302 published -> Timestamp,
311 original_post_name -> Varchar,
312 original_post_url -> Nullable<Text>,
313 original_post_body -> Nullable<Text>,
316 resolver_id -> Nullable<Int4>,
317 published -> Timestamp,
318 updated -> Nullable<Timestamp>,
327 published -> Timestamp,
332 private_message (id) {
335 recipient_id -> Int4,
339 published -> Timestamp,
340 updated -> Nullable<Timestamp>,
350 description -> Nullable<Text>,
352 published -> Timestamp,
353 updated -> Nullable<Timestamp>,
354 enable_downvotes -> Bool,
355 open_registration -> Bool,
357 icon -> Nullable<Text>,
358 banner -> Nullable<Text>,
363 site_aggregates (id) {
376 preferred_username -> Nullable<Varchar>,
377 password_encrypted -> Text,
378 email -> Nullable<Text>,
379 avatar -> Nullable<Text>,
382 published -> Timestamp,
383 updated -> Nullable<Timestamp>,
386 default_sort_type -> Int2,
387 default_listing_type -> Int2,
389 show_avatars -> Bool,
390 send_notifications_to_email -> Bool,
391 matrix_user_id -> Nullable<Text>,
393 bio -> Nullable<Text>,
395 private_key -> Nullable<Text>,
396 public_key -> Nullable<Text>,
397 last_refreshed_at -> Timestamp,
398 banner -> Nullable<Text>,
404 user_aggregates (id) {
409 comment_count -> Int8,
410 comment_score -> Int8,
418 published -> Timestamp,
425 recipient_id -> Int4,
428 published -> Timestamp,
432 // These are necessary since diesel doesn't have self joins / aliases
434 comment_alias_1 (id) {
438 parent_id -> Nullable<Int4>,
442 published -> Timestamp,
443 updated -> Nullable<Timestamp>,
454 preferred_username -> Nullable<Varchar>,
455 password_encrypted -> Text,
456 email -> Nullable<Text>,
457 avatar -> Nullable<Text>,
460 published -> Timestamp,
461 updated -> Nullable<Timestamp>,
464 default_sort_type -> Int2,
465 default_listing_type -> Int2,
467 show_avatars -> Bool,
468 send_notifications_to_email -> Bool,
469 matrix_user_id -> Nullable<Text>,
471 bio -> Nullable<Text>,
473 private_key -> Nullable<Text>,
474 public_key -> Nullable<Text>,
475 last_refreshed_at -> Timestamp,
476 banner -> Nullable<Text>,
485 preferred_username -> Nullable<Varchar>,
486 password_encrypted -> Text,
487 email -> Nullable<Text>,
488 avatar -> Nullable<Text>,
491 published -> Timestamp,
492 updated -> Nullable<Timestamp>,
495 default_sort_type -> Int2,
496 default_listing_type -> Int2,
498 show_avatars -> Bool,
499 send_notifications_to_email -> Bool,
500 matrix_user_id -> Nullable<Text>,
502 bio -> Nullable<Text>,
504 private_key -> Nullable<Text>,
505 public_key -> Nullable<Text>,
506 last_refreshed_at -> Timestamp,
507 banner -> Nullable<Text>,
512 joinable!(comment_alias_1 -> user_alias_1 (creator_id));
513 joinable!(comment -> comment_alias_1 (parent_id));
514 joinable!(user_mention -> user_alias_1 (recipient_id));
515 joinable!(post -> user_alias_1 (creator_id));
516 joinable!(comment -> user_alias_1 (creator_id));
518 joinable!(post_report -> user_alias_2 (resolver_id));
519 joinable!(comment_report -> user_alias_2 (resolver_id));
521 joinable!(comment -> post (post_id));
522 joinable!(comment -> user_ (creator_id));
523 joinable!(comment_aggregates -> comment (comment_id));
524 joinable!(comment_like -> comment (comment_id));
525 joinable!(comment_like -> post (post_id));
526 joinable!(comment_like -> user_ (user_id));
527 joinable!(comment_report -> comment (comment_id));
528 joinable!(comment_saved -> comment (comment_id));
529 joinable!(comment_saved -> user_ (user_id));
530 joinable!(community -> category (category_id));
531 joinable!(community -> user_ (creator_id));
532 joinable!(community_aggregates -> community (community_id));
533 joinable!(community_follower -> community (community_id));
534 joinable!(community_follower -> user_ (user_id));
535 joinable!(community_moderator -> community (community_id));
536 joinable!(community_moderator -> user_ (user_id));
537 joinable!(community_user_ban -> community (community_id));
538 joinable!(community_user_ban -> user_ (user_id));
539 joinable!(mod_add_community -> community (community_id));
540 joinable!(mod_ban_from_community -> community (community_id));
541 joinable!(mod_lock_post -> post (post_id));
542 joinable!(mod_lock_post -> user_ (mod_user_id));
543 joinable!(mod_remove_comment -> comment (comment_id));
544 joinable!(mod_remove_comment -> user_ (mod_user_id));
545 joinable!(mod_remove_community -> community (community_id));
546 joinable!(mod_remove_community -> user_ (mod_user_id));
547 joinable!(mod_remove_post -> post (post_id));
548 joinable!(mod_remove_post -> user_ (mod_user_id));
549 joinable!(mod_sticky_post -> post (post_id));
550 joinable!(mod_sticky_post -> user_ (mod_user_id));
551 joinable!(password_reset_request -> user_ (user_id));
552 joinable!(post -> community (community_id));
553 joinable!(post -> user_ (creator_id));
554 joinable!(post_aggregates -> post (post_id));
555 joinable!(post_like -> post (post_id));
556 joinable!(post_like -> user_ (user_id));
557 joinable!(post_read -> post (post_id));
558 joinable!(post_read -> user_ (user_id));
559 joinable!(post_report -> post (post_id));
560 joinable!(post_saved -> post (post_id));
561 joinable!(post_saved -> user_ (user_id));
562 joinable!(site -> user_ (creator_id));
563 joinable!(user_aggregates -> user_ (user_id));
564 joinable!(user_ban -> user_ (user_id));
565 joinable!(user_mention -> comment (comment_id));
566 joinable!(user_mention -> user_ (recipient_id));
568 allow_tables_to_appear_in_same_query!(
577 community_aggregates,
584 mod_ban_from_community,
587 mod_remove_community,
590 password_reset_request,