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_fast (id) {
335 name -> Nullable<Varchar>,
336 url -> Nullable<Text>,
337 body -> Nullable<Text>,
338 creator_id -> Nullable<Int4>,
339 community_id -> Nullable<Int4>,
340 removed -> Nullable<Bool>,
341 locked -> Nullable<Bool>,
342 published -> Nullable<Timestamp>,
343 updated -> Nullable<Timestamp>,
344 deleted -> Nullable<Bool>,
345 nsfw -> Nullable<Bool>,
346 stickied -> Nullable<Bool>,
347 embed_title -> Nullable<Text>,
348 embed_description -> Nullable<Text>,
349 embed_html -> Nullable<Text>,
350 thumbnail_url -> Nullable<Text>,
351 ap_id -> Nullable<Varchar>,
352 local -> Nullable<Bool>,
353 creator_actor_id -> Nullable<Varchar>,
354 creator_local -> Nullable<Bool>,
355 creator_name -> Nullable<Varchar>,
356 creator_preferred_username -> Nullable<Varchar>,
357 creator_published -> Nullable<Timestamp>,
358 creator_avatar -> Nullable<Text>,
359 banned -> Nullable<Bool>,
360 banned_from_community -> Nullable<Bool>,
361 community_actor_id -> Nullable<Varchar>,
362 community_local -> Nullable<Bool>,
363 community_name -> Nullable<Varchar>,
364 community_icon -> Nullable<Text>,
365 community_removed -> Nullable<Bool>,
366 community_deleted -> Nullable<Bool>,
367 community_nsfw -> Nullable<Bool>,
368 number_of_comments -> Nullable<Int8>,
369 score -> Nullable<Int8>,
370 upvotes -> Nullable<Int8>,
371 downvotes -> Nullable<Int8>,
372 hot_rank -> Nullable<Int4>,
373 hot_rank_active -> Nullable<Int4>,
374 newest_activity_time -> Nullable<Timestamp>,
384 published -> Timestamp,
393 published -> Timestamp,
402 original_post_name -> Varchar,
403 original_post_url -> Nullable<Text>,
404 original_post_body -> Nullable<Text>,
407 resolver_id -> Nullable<Int4>,
408 published -> Timestamp,
409 updated -> Nullable<Timestamp>,
418 published -> Timestamp,
423 private_message (id) {
426 recipient_id -> Int4,
430 published -> Timestamp,
431 updated -> Nullable<Timestamp>,
441 description -> Nullable<Text>,
443 published -> Timestamp,
444 updated -> Nullable<Timestamp>,
445 enable_downvotes -> Bool,
446 open_registration -> Bool,
448 icon -> Nullable<Text>,
449 banner -> Nullable<Text>,
454 site_aggregates (id) {
467 preferred_username -> Nullable<Varchar>,
468 password_encrypted -> Text,
469 email -> Nullable<Text>,
470 avatar -> Nullable<Text>,
473 published -> Timestamp,
474 updated -> Nullable<Timestamp>,
477 default_sort_type -> Int2,
478 default_listing_type -> Int2,
480 show_avatars -> Bool,
481 send_notifications_to_email -> Bool,
482 matrix_user_id -> Nullable<Text>,
484 bio -> Nullable<Text>,
486 private_key -> Nullable<Text>,
487 public_key -> Nullable<Text>,
488 last_refreshed_at -> Timestamp,
489 banner -> Nullable<Text>,
495 user_aggregates (id) {
500 comment_count -> Int8,
501 comment_score -> Int8,
509 published -> Timestamp,
516 actor_id -> Nullable<Varchar>,
517 name -> Nullable<Varchar>,
518 preferred_username -> Nullable<Varchar>,
519 avatar -> Nullable<Text>,
520 banner -> Nullable<Text>,
521 email -> Nullable<Text>,
522 matrix_user_id -> Nullable<Text>,
523 bio -> Nullable<Text>,
524 local -> Nullable<Bool>,
525 admin -> Nullable<Bool>,
526 banned -> Nullable<Bool>,
527 show_avatars -> Nullable<Bool>,
528 send_notifications_to_email -> Nullable<Bool>,
529 published -> Nullable<Timestamp>,
530 number_of_posts -> Nullable<Int8>,
531 post_score -> Nullable<Int8>,
532 number_of_comments -> Nullable<Int8>,
533 comment_score -> Nullable<Int8>,
540 recipient_id -> Int4,
543 published -> Timestamp,
547 joinable!(comment -> post (post_id));
548 joinable!(comment -> user_ (creator_id));
549 joinable!(comment_like -> comment (comment_id));
550 joinable!(comment_like -> post (post_id));
551 joinable!(comment_like -> user_ (user_id));
552 joinable!(comment_report -> comment (comment_id));
553 joinable!(comment_saved -> comment (comment_id));
554 joinable!(comment_saved -> user_ (user_id));
555 joinable!(community -> category (category_id));
556 joinable!(community -> user_ (creator_id));
557 joinable!(community_aggregates -> community (community_id));
558 joinable!(community_follower -> community (community_id));
559 joinable!(community_follower -> user_ (user_id));
560 joinable!(community_moderator -> community (community_id));
561 joinable!(community_moderator -> user_ (user_id));
562 joinable!(community_user_ban -> community (community_id));
563 joinable!(community_user_ban -> user_ (user_id));
564 joinable!(mod_add_community -> community (community_id));
565 joinable!(mod_ban_from_community -> community (community_id));
566 joinable!(mod_lock_post -> post (post_id));
567 joinable!(mod_lock_post -> user_ (mod_user_id));
568 joinable!(mod_remove_comment -> comment (comment_id));
569 joinable!(mod_remove_comment -> user_ (mod_user_id));
570 joinable!(mod_remove_community -> community (community_id));
571 joinable!(mod_remove_community -> user_ (mod_user_id));
572 joinable!(mod_remove_post -> post (post_id));
573 joinable!(mod_remove_post -> user_ (mod_user_id));
574 joinable!(mod_sticky_post -> post (post_id));
575 joinable!(mod_sticky_post -> user_ (mod_user_id));
576 joinable!(password_reset_request -> user_ (user_id));
577 joinable!(post -> community (community_id));
578 joinable!(post -> user_ (creator_id));
579 joinable!(post_like -> post (post_id));
580 joinable!(post_like -> user_ (user_id));
581 joinable!(post_read -> post (post_id));
582 joinable!(post_read -> user_ (user_id));
583 joinable!(post_report -> post (post_id));
584 joinable!(post_saved -> post (post_id));
585 joinable!(post_saved -> user_ (user_id));
586 joinable!(site -> user_ (creator_id));
587 joinable!(user_aggregates -> user_ (user_id));
588 joinable!(user_ban -> user_ (user_id));
589 joinable!(user_mention -> comment (comment_id));
590 joinable!(user_mention -> user_ (recipient_id));
592 allow_tables_to_appear_in_same_query!(
596 comment_aggregates_fast,
601 community_aggregates,
602 community_aggregates_fast,
609 mod_ban_from_community,
612 mod_remove_community,
615 password_reset_request,
617 post_aggregates_fast,