8 published -> Timestamp,
9 updated -> Nullable<Timestamp>,
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 published -> Timestamp,
98 description -> Nullable<Text>,
102 published -> Timestamp,
103 updated -> Nullable<Timestamp>,
108 private_key -> Nullable<Text>,
109 public_key -> Nullable<Text>,
110 last_refreshed_at -> Timestamp,
111 icon -> Nullable<Text>,
112 banner -> Nullable<Text>,
117 community_aggregates_fast (id) {
119 name -> Nullable<Varchar>,
120 title -> Nullable<Varchar>,
121 icon -> Nullable<Text>,
122 banner -> Nullable<Text>,
123 description -> Nullable<Text>,
124 category_id -> Nullable<Int4>,
125 creator_id -> Nullable<Int4>,
126 removed -> Nullable<Bool>,
127 published -> Nullable<Timestamp>,
128 updated -> Nullable<Timestamp>,
129 deleted -> Nullable<Bool>,
130 nsfw -> Nullable<Bool>,
131 actor_id -> Nullable<Varchar>,
132 local -> Nullable<Bool>,
133 last_refreshed_at -> Nullable<Timestamp>,
134 creator_actor_id -> Nullable<Varchar>,
135 creator_local -> Nullable<Bool>,
136 creator_name -> Nullable<Varchar>,
137 creator_preferred_username -> Nullable<Varchar>,
138 creator_avatar -> Nullable<Text>,
139 category_name -> Nullable<Varchar>,
140 number_of_subscribers -> Nullable<Int8>,
141 number_of_posts -> Nullable<Int8>,
142 number_of_comments -> Nullable<Int8>,
143 hot_rank -> Nullable<Int4>,
148 community_follower (id) {
150 community_id -> Int4,
152 published -> Timestamp,
157 community_moderator (id) {
159 community_id -> Int4,
161 published -> Timestamp,
166 community_user_ban (id) {
168 community_id -> Int4,
170 published -> Timestamp,
178 other_user_id -> Int4,
179 removed -> Nullable<Bool>,
185 mod_add_community (id) {
188 other_user_id -> Int4,
189 community_id -> Int4,
190 removed -> Nullable<Bool>,
199 other_user_id -> Int4,
200 reason -> Nullable<Text>,
201 banned -> Nullable<Bool>,
202 expires -> Nullable<Timestamp>,
208 mod_ban_from_community (id) {
211 other_user_id -> Int4,
212 community_id -> Int4,
213 reason -> Nullable<Text>,
214 banned -> Nullable<Bool>,
215 expires -> Nullable<Timestamp>,
225 locked -> Nullable<Bool>,
231 mod_remove_comment (id) {
235 reason -> Nullable<Text>,
236 removed -> Nullable<Bool>,
242 mod_remove_community (id) {
245 community_id -> Int4,
246 reason -> Nullable<Text>,
247 removed -> Nullable<Bool>,
248 expires -> Nullable<Timestamp>,
254 mod_remove_post (id) {
258 reason -> Nullable<Text>,
259 removed -> Nullable<Bool>,
265 mod_sticky_post (id) {
269 stickied -> Nullable<Bool>,
275 password_reset_request (id) {
278 token_encrypted -> Text,
279 published -> Timestamp,
287 url -> Nullable<Text>,
288 body -> Nullable<Text>,
290 community_id -> Int4,
293 published -> Timestamp,
294 updated -> Nullable<Timestamp>,
298 embed_title -> Nullable<Text>,
299 embed_description -> Nullable<Text>,
300 embed_html -> Nullable<Text>,
301 thumbnail_url -> Nullable<Text>,
308 post_aggregates_fast (id) {
310 name -> Nullable<Varchar>,
311 url -> Nullable<Text>,
312 body -> Nullable<Text>,
313 creator_id -> Nullable<Int4>,
314 community_id -> Nullable<Int4>,
315 removed -> Nullable<Bool>,
316 locked -> Nullable<Bool>,
317 published -> Nullable<Timestamp>,
318 updated -> Nullable<Timestamp>,
319 deleted -> Nullable<Bool>,
320 nsfw -> Nullable<Bool>,
321 stickied -> Nullable<Bool>,
322 embed_title -> Nullable<Text>,
323 embed_description -> Nullable<Text>,
324 embed_html -> Nullable<Text>,
325 thumbnail_url -> Nullable<Text>,
326 ap_id -> Nullable<Varchar>,
327 local -> Nullable<Bool>,
328 creator_actor_id -> Nullable<Varchar>,
329 creator_local -> Nullable<Bool>,
330 creator_name -> Nullable<Varchar>,
331 creator_preferred_username -> Nullable<Varchar>,
332 creator_published -> Nullable<Timestamp>,
333 creator_avatar -> Nullable<Text>,
334 banned -> Nullable<Bool>,
335 banned_from_community -> Nullable<Bool>,
336 community_actor_id -> Nullable<Varchar>,
337 community_local -> Nullable<Bool>,
338 community_name -> Nullable<Varchar>,
339 community_icon -> Nullable<Text>,
340 community_removed -> Nullable<Bool>,
341 community_deleted -> Nullable<Bool>,
342 community_nsfw -> Nullable<Bool>,
343 number_of_comments -> Nullable<Int8>,
344 score -> Nullable<Int8>,
345 upvotes -> Nullable<Int8>,
346 downvotes -> Nullable<Int8>,
347 hot_rank -> Nullable<Int4>,
348 hot_rank_active -> Nullable<Int4>,
349 newest_activity_time -> Nullable<Timestamp>,
359 published -> Timestamp,
368 published -> Timestamp,
377 published -> Timestamp,
382 private_message (id) {
385 recipient_id -> Int4,
389 published -> Timestamp,
390 updated -> Nullable<Timestamp>,
400 description -> Nullable<Text>,
402 published -> Timestamp,
403 updated -> Nullable<Timestamp>,
404 enable_downvotes -> Bool,
405 open_registration -> Bool,
407 icon -> Nullable<Text>,
408 banner -> Nullable<Text>,
416 preferred_username -> Nullable<Varchar>,
417 password_encrypted -> Text,
418 email -> Nullable<Text>,
419 avatar -> Nullable<Text>,
422 published -> Timestamp,
423 updated -> Nullable<Timestamp>,
426 default_sort_type -> Int2,
427 default_listing_type -> Int2,
429 show_avatars -> Bool,
430 send_notifications_to_email -> Bool,
431 matrix_user_id -> Nullable<Text>,
433 bio -> Nullable<Text>,
435 private_key -> Nullable<Text>,
436 public_key -> Nullable<Text>,
437 last_refreshed_at -> Timestamp,
438 banner -> Nullable<Text>,
446 published -> Timestamp,
453 actor_id -> Nullable<Varchar>,
454 name -> Nullable<Varchar>,
455 preferred_username -> Nullable<Varchar>,
456 avatar -> Nullable<Text>,
457 banner -> Nullable<Text>,
458 email -> Nullable<Text>,
459 matrix_user_id -> Nullable<Text>,
460 bio -> Nullable<Text>,
461 local -> Nullable<Bool>,
462 admin -> Nullable<Bool>,
463 banned -> Nullable<Bool>,
464 show_avatars -> Nullable<Bool>,
465 send_notifications_to_email -> Nullable<Bool>,
466 published -> Nullable<Timestamp>,
467 number_of_posts -> Nullable<Int8>,
468 post_score -> Nullable<Int8>,
469 number_of_comments -> Nullable<Int8>,
470 comment_score -> Nullable<Int8>,
477 recipient_id -> Int4,
480 published -> Timestamp,
484 joinable!(activity -> user_ (user_id));
485 joinable!(comment -> post (post_id));
486 joinable!(comment -> user_ (creator_id));
487 joinable!(comment_like -> comment (comment_id));
488 joinable!(comment_like -> post (post_id));
489 joinable!(comment_like -> user_ (user_id));
490 joinable!(comment_saved -> comment (comment_id));
491 joinable!(comment_saved -> user_ (user_id));
492 joinable!(community -> category (category_id));
493 joinable!(community -> user_ (creator_id));
494 joinable!(community_follower -> community (community_id));
495 joinable!(community_follower -> user_ (user_id));
496 joinable!(community_moderator -> community (community_id));
497 joinable!(community_moderator -> user_ (user_id));
498 joinable!(community_user_ban -> community (community_id));
499 joinable!(community_user_ban -> user_ (user_id));
500 joinable!(mod_add_community -> community (community_id));
501 joinable!(mod_ban_from_community -> community (community_id));
502 joinable!(mod_lock_post -> post (post_id));
503 joinable!(mod_lock_post -> user_ (mod_user_id));
504 joinable!(mod_remove_comment -> comment (comment_id));
505 joinable!(mod_remove_comment -> user_ (mod_user_id));
506 joinable!(mod_remove_community -> community (community_id));
507 joinable!(mod_remove_community -> user_ (mod_user_id));
508 joinable!(mod_remove_post -> post (post_id));
509 joinable!(mod_remove_post -> user_ (mod_user_id));
510 joinable!(mod_sticky_post -> post (post_id));
511 joinable!(mod_sticky_post -> user_ (mod_user_id));
512 joinable!(password_reset_request -> user_ (user_id));
513 joinable!(post -> community (community_id));
514 joinable!(post -> user_ (creator_id));
515 joinable!(post_like -> post (post_id));
516 joinable!(post_like -> user_ (user_id));
517 joinable!(post_read -> post (post_id));
518 joinable!(post_read -> user_ (user_id));
519 joinable!(post_saved -> post (post_id));
520 joinable!(post_saved -> user_ (user_id));
521 joinable!(site -> user_ (creator_id));
522 joinable!(user_ban -> user_ (user_id));
523 joinable!(user_mention -> comment (comment_id));
524 joinable!(user_mention -> user_ (recipient_id));
526 allow_tables_to_appear_in_same_query!(
530 comment_aggregates_fast,
534 community_aggregates_fast,
541 mod_ban_from_community,
544 mod_remove_community,
547 password_reset_request,
549 post_aggregates_fast,