diff options
author | Dessalines <tyhou13@gmx.com> | 2020-07-13 09:57:37 -0400 |
---|---|---|
committer | Dessalines <tyhou13@gmx.com> | 2020-07-13 09:57:37 -0400 |
commit | 1b7a4ac09019c84c23e7b5056fecf56367a940f7 (patch) | |
tree | e46bd44b8e79bc3907ffb365d8d78492e826809e /server/lemmy_db | |
parent | 8f745b80d3c7bf2ee901d7a3333d7303cdbe6b42 (diff) | |
parent | 9ad0a8825ae8cda6b6fcb3d5bb163c234c26b823 (diff) |
Merge branch 'add_post_title_to_comments_view' of https://github.com/makigi-io/makigi into makigi-io-add_post_title_to_comments_view
Diffstat (limited to 'server/lemmy_db')
-rw-r--r-- | server/lemmy_db/src/comment_view.rs | 7 | ||||
-rw-r--r-- | server/lemmy_db/src/schema.rs | 1 | ||||
-rw-r--r-- | server/lemmy_db/src/user_mention_view.rs | 3 |
3 files changed, 11 insertions, 0 deletions
diff --git a/server/lemmy_db/src/comment_view.rs b/server/lemmy_db/src/comment_view.rs index 914e568c..4af13c2d 100644 --- a/server/lemmy_db/src/comment_view.rs +++ b/server/lemmy_db/src/comment_view.rs @@ -9,6 +9,7 @@ table! { id -> Int4, creator_id -> Int4, post_id -> Int4, + post_name -> Varchar, parent_id -> Nullable<Int4>, content -> Text, removed -> Bool, @@ -45,6 +46,7 @@ table! { id -> Int4, creator_id -> Int4, post_id -> Int4, + post_name -> Varchar, parent_id -> Nullable<Int4>, content -> Text, removed -> Bool, @@ -84,6 +86,7 @@ pub struct CommentView { pub id: i32, pub creator_id: i32, pub post_id: i32, + pub post_name: String, pub parent_id: Option<i32>, pub content: String, pub removed: bool, @@ -298,6 +301,7 @@ table! { id -> Int4, creator_id -> Int4, post_id -> Int4, + post_name -> Varchar, parent_id -> Nullable<Int4>, content -> Text, removed -> Bool, @@ -338,6 +342,7 @@ pub struct ReplyView { pub id: i32, pub creator_id: i32, pub post_id: i32, + pub post_name: String, pub parent_id: Option<i32>, pub content: String, pub removed: bool, @@ -576,6 +581,7 @@ mod tests { content: "A test comment 32".into(), creator_id: inserted_user.id, post_id: inserted_post.id, + post_name: inserted_post.name.to_owned(), community_id: inserted_community.id, community_name: inserted_community.name.to_owned(), parent_id: None, @@ -610,6 +616,7 @@ mod tests { content: "A test comment 32".into(), creator_id: inserted_user.id, post_id: inserted_post.id, + post_name: inserted_post.name.to_owned(), community_id: inserted_community.id, community_name: inserted_community.name.to_owned(), parent_id: None, diff --git a/server/lemmy_db/src/schema.rs b/server/lemmy_db/src/schema.rs index 18a522df..49dd4e69 100644 --- a/server/lemmy_db/src/schema.rs +++ b/server/lemmy_db/src/schema.rs @@ -38,6 +38,7 @@ table! { id -> Int4, creator_id -> Nullable<Int4>, post_id -> Nullable<Int4>, + post_name -> Nullable<Varchar>, parent_id -> Nullable<Int4>, content -> Nullable<Text>, removed -> Nullable<Bool>, diff --git a/server/lemmy_db/src/user_mention_view.rs b/server/lemmy_db/src/user_mention_view.rs index 8bfbf453..359f166d 100644 --- a/server/lemmy_db/src/user_mention_view.rs +++ b/server/lemmy_db/src/user_mention_view.rs @@ -11,6 +11,7 @@ table! { creator_actor_id -> Text, creator_local -> Bool, post_id -> Int4, + post_name -> Varchar, parent_id -> Nullable<Int4>, content -> Text, removed -> Bool, @@ -47,6 +48,7 @@ table! { creator_actor_id -> Text, creator_local -> Bool, post_id -> Int4, + post_name -> Varchar, parent_id -> Nullable<Int4>, content -> Text, removed -> Bool, @@ -86,6 +88,7 @@ pub struct UserMentionView { pub creator_actor_id: String, pub creator_local: bool, pub post_id: i32, + pub post_name: String, pub parent_id: Option<i32>, pub content: String, pub removed: bool, |