]> Untitled Git - lemmy.git/blobdiff - crates/db_schema/src/schema.rs
Showing # of unread comments for posts. Fixes #2134 (#2393)
[lemmy.git] / crates / db_schema / src / schema.rs
index e0d7167e7bf1b53467bcf772947326902b9aacef..d7f477b7ffafedaf6ac4e6dbd56890cc33a564c5 100644 (file)
@@ -380,6 +380,16 @@ table! {
     }
 }
 
+table! {
+    person_post_aggregates (id) {
+        id -> Int4,
+        person_id -> Int4,
+        post_id -> Int4,
+        read_comments -> Int8,
+        published -> Timestamp,
+    }
+}
+
 table! {
     post_aggregates (id) {
         id -> Int4,
@@ -667,6 +677,8 @@ joinable!(comment_reply -> comment (comment_id));
 joinable!(comment_reply -> person (recipient_id));
 joinable!(post -> community (community_id));
 joinable!(post -> person (creator_id));
+joinable!(person_post_aggregates -> post (post_id));
+joinable!(person_post_aggregates -> person (person_id));
 joinable!(post_aggregates -> post (post_id));
 joinable!(post_like -> person (person_id));
 joinable!(post_like -> post (post_id));
@@ -725,6 +737,7 @@ allow_tables_to_appear_in_same_query!(
   person_ban,
   person_block,
   person_mention,
+  person_post_aggregates,
   comment_reply,
   post,
   post_aggregates,