7 published -> Timestamp,
8 updated -> Nullable<Timestamp>,
24 parent_id -> Nullable<Int4>,
28 published -> Timestamp,
29 updated -> Nullable<Timestamp>,
37 comment_aggregates_fast (id) {
39 creator_id -> Nullable<Int4>,
40 post_id -> Nullable<Int4>,
41 parent_id -> Nullable<Int4>,
42 content -> Nullable<Text>,
43 removed -> Nullable<Bool>,
44 read -> Nullable<Bool>,
45 published -> Nullable<Timestamp>,
46 updated -> Nullable<Timestamp>,
47 deleted -> Nullable<Bool>,
48 ap_id -> Nullable<Varchar>,
49 local -> Nullable<Bool>,
50 post_name -> Nullable<Varchar>,
51 community_id -> Nullable<Int4>,
52 community_actor_id -> Nullable<Varchar>,
53 community_local -> Nullable<Bool>,
54 community_name -> Nullable<Varchar>,
55 community_icon -> Nullable<Text>,
56 banned -> Nullable<Bool>,
57 banned_from_community -> Nullable<Bool>,
58 creator_actor_id -> Nullable<Varchar>,
59 creator_local -> Nullable<Bool>,
60 creator_name -> Nullable<Varchar>,
61 creator_preferred_username -> Nullable<Varchar>,
62 creator_published -> Nullable<Timestamp>,
63 creator_avatar -> Nullable<Text>,
64 score -> Nullable<Int8>,
65 upvotes -> Nullable<Int8>,
66 downvotes -> Nullable<Int8>,
67 hot_rank -> Nullable<Int4>,
68 hot_rank_active -> Nullable<Int4>,
79 published -> Timestamp,
88 published -> Timestamp,
97 description -> Nullable<Text>,
101 published -> Timestamp,
102 updated -> Nullable<Timestamp>,
107 private_key -> Nullable<Text>,
108 public_key -> Nullable<Text>,
109 last_refreshed_at -> Timestamp,
110 icon -> Nullable<Text>,
111 banner -> Nullable<Text>,
116 community_aggregates_fast (id) {
118 name -> Nullable<Varchar>,
119 title -> Nullable<Varchar>,
120 icon -> Nullable<Text>,
121 banner -> Nullable<Text>,
122 description -> Nullable<Text>,
123 category_id -> Nullable<Int4>,
124 creator_id -> Nullable<Int4>,
125 removed -> Nullable<Bool>,
126 published -> Nullable<Timestamp>,
127 updated -> Nullable<Timestamp>,
128 deleted -> Nullable<Bool>,
129 nsfw -> Nullable<Bool>,
130 actor_id -> Nullable<Varchar>,
131 local -> Nullable<Bool>,
132 last_refreshed_at -> Nullable<Timestamp>,
133 creator_actor_id -> Nullable<Varchar>,
134 creator_local -> Nullable<Bool>,
135 creator_name -> Nullable<Varchar>,
136 creator_preferred_username -> Nullable<Varchar>,
137 creator_avatar -> Nullable<Text>,
138 category_name -> Nullable<Varchar>,
139 number_of_subscribers -> Nullable<Int8>,
140 number_of_posts -> Nullable<Int8>,
141 number_of_comments -> Nullable<Int8>,
142 hot_rank -> Nullable<Int4>,
147 community_follower (id) {
149 community_id -> Int4,
151 published -> Timestamp,
156 community_moderator (id) {
158 community_id -> Int4,
160 published -> Timestamp,
165 community_user_ban (id) {
167 community_id -> Int4,
169 published -> Timestamp,
177 other_user_id -> Int4,
178 removed -> Nullable<Bool>,
184 mod_add_community (id) {
187 other_user_id -> Int4,
188 community_id -> Int4,
189 removed -> Nullable<Bool>,
198 other_user_id -> Int4,
199 reason -> Nullable<Text>,
200 banned -> Nullable<Bool>,
201 expires -> Nullable<Timestamp>,
207 mod_ban_from_community (id) {
210 other_user_id -> Int4,
211 community_id -> Int4,
212 reason -> Nullable<Text>,
213 banned -> Nullable<Bool>,
214 expires -> Nullable<Timestamp>,
224 locked -> Nullable<Bool>,
230 mod_remove_comment (id) {
234 reason -> Nullable<Text>,
235 removed -> Nullable<Bool>,
241 mod_remove_community (id) {
244 community_id -> Int4,
245 reason -> Nullable<Text>,
246 removed -> Nullable<Bool>,
247 expires -> Nullable<Timestamp>,
253 mod_remove_post (id) {
257 reason -> Nullable<Text>,
258 removed -> Nullable<Bool>,
264 mod_sticky_post (id) {
268 stickied -> Nullable<Bool>,
274 password_reset_request (id) {
277 token_encrypted -> Text,
278 published -> Timestamp,
286 url -> Nullable<Text>,
287 body -> Nullable<Text>,
289 community_id -> Int4,
292 published -> Timestamp,
293 updated -> Nullable<Timestamp>,
297 embed_title -> Nullable<Text>,
298 embed_description -> Nullable<Text>,
299 embed_html -> Nullable<Text>,
300 thumbnail_url -> Nullable<Text>,
307 post_aggregates_fast (id) {
309 name -> Nullable<Varchar>,
310 url -> Nullable<Text>,
311 body -> Nullable<Text>,
312 creator_id -> Nullable<Int4>,
313 community_id -> Nullable<Int4>,
314 removed -> Nullable<Bool>,
315 locked -> Nullable<Bool>,
316 published -> Nullable<Timestamp>,
317 updated -> Nullable<Timestamp>,
318 deleted -> Nullable<Bool>,
319 nsfw -> Nullable<Bool>,
320 stickied -> Nullable<Bool>,
321 embed_title -> Nullable<Text>,
322 embed_description -> Nullable<Text>,
323 embed_html -> Nullable<Text>,
324 thumbnail_url -> Nullable<Text>,
325 ap_id -> Nullable<Varchar>,
326 local -> Nullable<Bool>,
327 creator_actor_id -> Nullable<Varchar>,
328 creator_local -> Nullable<Bool>,
329 creator_name -> Nullable<Varchar>,
330 creator_preferred_username -> Nullable<Varchar>,
331 creator_published -> Nullable<Timestamp>,
332 creator_avatar -> Nullable<Text>,
333 banned -> Nullable<Bool>,
334 banned_from_community -> Nullable<Bool>,
335 community_actor_id -> Nullable<Varchar>,
336 community_local -> Nullable<Bool>,
337 community_name -> Nullable<Varchar>,
338 community_icon -> Nullable<Text>,
339 community_removed -> Nullable<Bool>,
340 community_deleted -> Nullable<Bool>,
341 community_nsfw -> Nullable<Bool>,
342 number_of_comments -> Nullable<Int8>,
343 score -> Nullable<Int8>,
344 upvotes -> Nullable<Int8>,
345 downvotes -> Nullable<Int8>,
346 hot_rank -> Nullable<Int4>,
347 hot_rank_active -> Nullable<Int4>,
348 newest_activity_time -> Nullable<Timestamp>,
358 published -> Timestamp,
367 published -> Timestamp,
376 published -> Timestamp,
381 private_message (id) {
384 recipient_id -> Int4,
388 published -> Timestamp,
389 updated -> Nullable<Timestamp>,
399 description -> Nullable<Text>,
401 published -> Timestamp,
402 updated -> Nullable<Timestamp>,
403 enable_downvotes -> Bool,
404 open_registration -> Bool,
406 icon -> Nullable<Text>,
407 banner -> Nullable<Text>,
415 preferred_username -> Nullable<Varchar>,
416 password_encrypted -> Text,
417 email -> Nullable<Text>,
418 avatar -> Nullable<Text>,
421 published -> Timestamp,
422 updated -> Nullable<Timestamp>,
425 default_sort_type -> Int2,
426 default_listing_type -> Int2,
428 show_avatars -> Bool,
429 send_notifications_to_email -> Bool,
430 matrix_user_id -> Nullable<Text>,
432 bio -> Nullable<Text>,
434 private_key -> Nullable<Text>,
435 public_key -> Nullable<Text>,
436 last_refreshed_at -> Timestamp,
437 banner -> Nullable<Text>,
445 published -> Timestamp,
452 actor_id -> Nullable<Varchar>,
453 name -> Nullable<Varchar>,
454 preferred_username -> Nullable<Varchar>,
455 avatar -> Nullable<Text>,
456 banner -> Nullable<Text>,
457 email -> Nullable<Text>,
458 matrix_user_id -> Nullable<Text>,
459 bio -> Nullable<Text>,
460 local -> Nullable<Bool>,
461 admin -> Nullable<Bool>,
462 banned -> Nullable<Bool>,
463 show_avatars -> Nullable<Bool>,
464 send_notifications_to_email -> Nullable<Bool>,
465 published -> Nullable<Timestamp>,
466 number_of_posts -> Nullable<Int8>,
467 post_score -> Nullable<Int8>,
468 number_of_comments -> Nullable<Int8>,
469 comment_score -> Nullable<Int8>,
476 recipient_id -> Int4,
479 published -> Timestamp,
483 joinable!(activity -> user_ (user_id));
484 joinable!(comment -> post (post_id));
485 joinable!(comment -> user_ (creator_id));
486 joinable!(comment_like -> comment (comment_id));
487 joinable!(comment_like -> post (post_id));
488 joinable!(comment_like -> user_ (user_id));
489 joinable!(comment_saved -> comment (comment_id));
490 joinable!(comment_saved -> user_ (user_id));
491 joinable!(community -> category (category_id));
492 joinable!(community -> user_ (creator_id));
493 joinable!(community_follower -> community (community_id));
494 joinable!(community_follower -> user_ (user_id));
495 joinable!(community_moderator -> community (community_id));
496 joinable!(community_moderator -> user_ (user_id));
497 joinable!(community_user_ban -> community (community_id));
498 joinable!(community_user_ban -> user_ (user_id));
499 joinable!(mod_add_community -> community (community_id));
500 joinable!(mod_ban_from_community -> community (community_id));
501 joinable!(mod_lock_post -> post (post_id));
502 joinable!(mod_lock_post -> user_ (mod_user_id));
503 joinable!(mod_remove_comment -> comment (comment_id));
504 joinable!(mod_remove_comment -> user_ (mod_user_id));
505 joinable!(mod_remove_community -> community (community_id));
506 joinable!(mod_remove_community -> user_ (mod_user_id));
507 joinable!(mod_remove_post -> post (post_id));
508 joinable!(mod_remove_post -> user_ (mod_user_id));
509 joinable!(mod_sticky_post -> post (post_id));
510 joinable!(mod_sticky_post -> user_ (mod_user_id));
511 joinable!(password_reset_request -> user_ (user_id));
512 joinable!(post -> community (community_id));
513 joinable!(post -> user_ (creator_id));
514 joinable!(post_like -> post (post_id));
515 joinable!(post_like -> user_ (user_id));
516 joinable!(post_read -> post (post_id));
517 joinable!(post_read -> user_ (user_id));
518 joinable!(post_saved -> post (post_id));
519 joinable!(post_saved -> user_ (user_id));
520 joinable!(site -> user_ (creator_id));
521 joinable!(user_ban -> user_ (user_id));
522 joinable!(user_mention -> comment (comment_id));
523 joinable!(user_mention -> user_ (recipient_id));
525 allow_tables_to_appear_in_same_query!(
529 comment_aggregates_fast,
533 community_aggregates_fast,
540 mod_ban_from_community,
543 mod_remove_community,
546 password_reset_request,
548 post_aggregates_fast,