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_fast (id) {
40 creator_id -> Nullable<Int4>,
41 post_id -> Nullable<Int4>,
42 parent_id -> Nullable<Int4>,
43 content -> Nullable<Text>,
44 removed -> Nullable<Bool>,
45 read -> Nullable<Bool>,
46 published -> Nullable<Timestamp>,
47 updated -> Nullable<Timestamp>,
48 deleted -> Nullable<Bool>,
49 ap_id -> Nullable<Varchar>,
50 local -> Nullable<Bool>,
51 post_name -> Nullable<Varchar>,
52 community_id -> Nullable<Int4>,
53 community_actor_id -> Nullable<Varchar>,
54 community_local -> Nullable<Bool>,
55 community_name -> Nullable<Varchar>,
56 community_icon -> Nullable<Text>,
57 banned -> Nullable<Bool>,
58 banned_from_community -> Nullable<Bool>,
59 creator_actor_id -> Nullable<Varchar>,
60 creator_local -> Nullable<Bool>,
61 creator_name -> Nullable<Varchar>,
62 creator_preferred_username -> Nullable<Varchar>,
63 creator_published -> Nullable<Timestamp>,
64 creator_avatar -> Nullable<Text>,
65 score -> Nullable<Int8>,
66 upvotes -> Nullable<Int8>,
67 downvotes -> Nullable<Int8>,
68 hot_rank -> Nullable<Int4>,
69 hot_rank_active -> Nullable<Int4>,
80 published -> Timestamp,
89 original_comment_text -> Text,
92 resolver_id -> Nullable<Int4>,
93 published -> Timestamp,
94 updated -> Nullable<Timestamp>,
103 published -> Timestamp,
112 description -> Nullable<Text>,
116 published -> Timestamp,
117 updated -> Nullable<Timestamp>,
122 private_key -> Nullable<Text>,
123 public_key -> Nullable<Text>,
124 last_refreshed_at -> Timestamp,
125 icon -> Nullable<Text>,
126 banner -> Nullable<Text>,
131 community_aggregates (id) {
133 community_id -> Int4,
141 community_aggregates_fast (id) {
143 name -> Nullable<Varchar>,
144 title -> Nullable<Varchar>,
145 icon -> Nullable<Text>,
146 banner -> Nullable<Text>,
147 description -> Nullable<Text>,
148 category_id -> Nullable<Int4>,
149 creator_id -> Nullable<Int4>,
150 removed -> Nullable<Bool>,
151 published -> Nullable<Timestamp>,
152 updated -> Nullable<Timestamp>,
153 deleted -> Nullable<Bool>,
154 nsfw -> Nullable<Bool>,
155 actor_id -> Nullable<Varchar>,
156 local -> Nullable<Bool>,
157 last_refreshed_at -> Nullable<Timestamp>,
158 creator_actor_id -> Nullable<Varchar>,
159 creator_local -> Nullable<Bool>,
160 creator_name -> Nullable<Varchar>,
161 creator_preferred_username -> Nullable<Varchar>,
162 creator_avatar -> Nullable<Text>,
163 category_name -> Nullable<Varchar>,
164 number_of_subscribers -> Nullable<Int8>,
165 number_of_posts -> Nullable<Int8>,
166 number_of_comments -> Nullable<Int8>,
167 hot_rank -> Nullable<Int4>,
172 community_follower (id) {
174 community_id -> Int4,
176 published -> Timestamp,
177 pending -> Nullable<Bool>,
182 community_moderator (id) {
184 community_id -> Int4,
186 published -> Timestamp,
191 community_user_ban (id) {
193 community_id -> Int4,
195 published -> Timestamp,
203 other_user_id -> Int4,
204 removed -> Nullable<Bool>,
210 mod_add_community (id) {
213 other_user_id -> Int4,
214 community_id -> Int4,
215 removed -> Nullable<Bool>,
224 other_user_id -> Int4,
225 reason -> Nullable<Text>,
226 banned -> Nullable<Bool>,
227 expires -> Nullable<Timestamp>,
233 mod_ban_from_community (id) {
236 other_user_id -> Int4,
237 community_id -> Int4,
238 reason -> Nullable<Text>,
239 banned -> Nullable<Bool>,
240 expires -> Nullable<Timestamp>,
250 locked -> Nullable<Bool>,
256 mod_remove_comment (id) {
260 reason -> Nullable<Text>,
261 removed -> Nullable<Bool>,
267 mod_remove_community (id) {
270 community_id -> Int4,
271 reason -> Nullable<Text>,
272 removed -> Nullable<Bool>,
273 expires -> Nullable<Timestamp>,
279 mod_remove_post (id) {
283 reason -> Nullable<Text>,
284 removed -> Nullable<Bool>,
290 mod_sticky_post (id) {
294 stickied -> Nullable<Bool>,
300 password_reset_request (id) {
303 token_encrypted -> Text,
304 published -> Timestamp,
312 url -> Nullable<Text>,
313 body -> Nullable<Text>,
315 community_id -> Int4,
318 published -> Timestamp,
319 updated -> Nullable<Timestamp>,
323 embed_title -> Nullable<Text>,
324 embed_description -> Nullable<Text>,
325 embed_html -> Nullable<Text>,
326 thumbnail_url -> Nullable<Text>,
333 post_aggregates (id) {
340 newest_comment_time -> Timestamp,
345 post_aggregates_fast (id) {
347 name -> Nullable<Varchar>,
348 url -> Nullable<Text>,
349 body -> Nullable<Text>,
350 creator_id -> Nullable<Int4>,
351 community_id -> Nullable<Int4>,
352 removed -> Nullable<Bool>,
353 locked -> Nullable<Bool>,
354 published -> Nullable<Timestamp>,
355 updated -> Nullable<Timestamp>,
356 deleted -> Nullable<Bool>,
357 nsfw -> Nullable<Bool>,
358 stickied -> Nullable<Bool>,
359 embed_title -> Nullable<Text>,
360 embed_description -> Nullable<Text>,
361 embed_html -> Nullable<Text>,
362 thumbnail_url -> Nullable<Text>,
363 ap_id -> Nullable<Varchar>,
364 local -> Nullable<Bool>,
365 creator_actor_id -> Nullable<Varchar>,
366 creator_local -> Nullable<Bool>,
367 creator_name -> Nullable<Varchar>,
368 creator_preferred_username -> Nullable<Varchar>,
369 creator_published -> Nullable<Timestamp>,
370 creator_avatar -> Nullable<Text>,
371 banned -> Nullable<Bool>,
372 banned_from_community -> Nullable<Bool>,
373 community_actor_id -> Nullable<Varchar>,
374 community_local -> Nullable<Bool>,
375 community_name -> Nullable<Varchar>,
376 community_icon -> Nullable<Text>,
377 community_removed -> Nullable<Bool>,
378 community_deleted -> Nullable<Bool>,
379 community_nsfw -> Nullable<Bool>,
380 number_of_comments -> Nullable<Int8>,
381 score -> Nullable<Int8>,
382 upvotes -> Nullable<Int8>,
383 downvotes -> Nullable<Int8>,
384 hot_rank -> Nullable<Int4>,
385 hot_rank_active -> Nullable<Int4>,
386 newest_activity_time -> Nullable<Timestamp>,
396 published -> Timestamp,
405 published -> Timestamp,
414 original_post_name -> Varchar,
415 original_post_url -> Nullable<Text>,
416 original_post_body -> Nullable<Text>,
419 resolver_id -> Nullable<Int4>,
420 published -> Timestamp,
421 updated -> Nullable<Timestamp>,
430 published -> Timestamp,
435 private_message (id) {
438 recipient_id -> Int4,
442 published -> Timestamp,
443 updated -> Nullable<Timestamp>,
453 description -> Nullable<Text>,
455 published -> Timestamp,
456 updated -> Nullable<Timestamp>,
457 enable_downvotes -> Bool,
458 open_registration -> Bool,
460 icon -> Nullable<Text>,
461 banner -> Nullable<Text>,
466 site_aggregates (id) {
479 preferred_username -> Nullable<Varchar>,
480 password_encrypted -> Text,
481 email -> Nullable<Text>,
482 avatar -> Nullable<Text>,
485 published -> Timestamp,
486 updated -> Nullable<Timestamp>,
489 default_sort_type -> Int2,
490 default_listing_type -> Int2,
492 show_avatars -> Bool,
493 send_notifications_to_email -> Bool,
494 matrix_user_id -> Nullable<Text>,
496 bio -> Nullable<Text>,
498 private_key -> Nullable<Text>,
499 public_key -> Nullable<Text>,
500 last_refreshed_at -> Timestamp,
501 banner -> Nullable<Text>,
507 user_aggregates (id) {
512 comment_count -> Int8,
513 comment_score -> Int8,
521 published -> Timestamp,
528 actor_id -> Nullable<Varchar>,
529 name -> Nullable<Varchar>,
530 preferred_username -> Nullable<Varchar>,
531 avatar -> Nullable<Text>,
532 banner -> Nullable<Text>,
533 email -> Nullable<Text>,
534 matrix_user_id -> Nullable<Text>,
535 bio -> Nullable<Text>,
536 local -> Nullable<Bool>,
537 admin -> Nullable<Bool>,
538 banned -> Nullable<Bool>,
539 show_avatars -> Nullable<Bool>,
540 send_notifications_to_email -> Nullable<Bool>,
541 published -> Nullable<Timestamp>,
542 number_of_posts -> Nullable<Int8>,
543 post_score -> Nullable<Int8>,
544 number_of_comments -> Nullable<Int8>,
545 comment_score -> Nullable<Int8>,
552 recipient_id -> Int4,
555 published -> Timestamp,
559 joinable!(comment -> post (post_id));
560 joinable!(comment -> user_ (creator_id));
561 joinable!(comment_like -> comment (comment_id));
562 joinable!(comment_like -> post (post_id));
563 joinable!(comment_like -> user_ (user_id));
564 joinable!(comment_report -> comment (comment_id));
565 joinable!(comment_saved -> comment (comment_id));
566 joinable!(comment_saved -> user_ (user_id));
567 joinable!(community -> category (category_id));
568 joinable!(community -> user_ (creator_id));
569 joinable!(community_aggregates -> community (community_id));
570 joinable!(community_follower -> community (community_id));
571 joinable!(community_follower -> user_ (user_id));
572 joinable!(community_moderator -> community (community_id));
573 joinable!(community_moderator -> user_ (user_id));
574 joinable!(community_user_ban -> community (community_id));
575 joinable!(community_user_ban -> user_ (user_id));
576 joinable!(mod_add_community -> community (community_id));
577 joinable!(mod_ban_from_community -> community (community_id));
578 joinable!(mod_lock_post -> post (post_id));
579 joinable!(mod_lock_post -> user_ (mod_user_id));
580 joinable!(mod_remove_comment -> comment (comment_id));
581 joinable!(mod_remove_comment -> user_ (mod_user_id));
582 joinable!(mod_remove_community -> community (community_id));
583 joinable!(mod_remove_community -> user_ (mod_user_id));
584 joinable!(mod_remove_post -> post (post_id));
585 joinable!(mod_remove_post -> user_ (mod_user_id));
586 joinable!(mod_sticky_post -> post (post_id));
587 joinable!(mod_sticky_post -> user_ (mod_user_id));
588 joinable!(password_reset_request -> user_ (user_id));
589 joinable!(post -> community (community_id));
590 joinable!(post -> user_ (creator_id));
591 joinable!(post_aggregates -> post (post_id));
592 joinable!(post_like -> post (post_id));
593 joinable!(post_like -> user_ (user_id));
594 joinable!(post_read -> post (post_id));
595 joinable!(post_read -> user_ (user_id));
596 joinable!(post_report -> post (post_id));
597 joinable!(post_saved -> post (post_id));
598 joinable!(post_saved -> user_ (user_id));
599 joinable!(site -> user_ (creator_id));
600 joinable!(user_aggregates -> user_ (user_id));
601 joinable!(user_ban -> user_ (user_id));
602 joinable!(user_mention -> comment (comment_id));
603 joinable!(user_mention -> user_ (recipient_id));
605 allow_tables_to_appear_in_same_query!(
609 comment_aggregates_fast,
614 community_aggregates,
615 community_aggregates_fast,
622 mod_ban_from_community,
625 mod_remove_community,
628 password_reset_request,
631 post_aggregates_fast,