Skip to content

Commit

Permalink
Merge pull request #92 from DEPthes/refactor/#85-search-content
Browse files Browse the repository at this point in the history
[REFACTOR]: post 검색용 content 컬럼 추가 + ddl 작성
  • Loading branch information
phonil authored Aug 17, 2024
2 parents 3378277 + d200f75 commit d0bab19
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/mvp/deplog/domain/post/domain/Post.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ public class Post extends BaseEntity {
@Column(name = "preview_content")
private String previewContent;

@Column(name = "search_content", columnDefinition = "TEXT")
private String searchContent;

@Column(name = "preview_image", columnDefinition = "TEXT")
private String previewImage;

Expand All @@ -52,11 +55,12 @@ public class Post extends BaseEntity {
private Stage stage;

@Builder
public Post(Member member, String content, String previewContent, String previewImage, String title, Stage stage) {
public Post(Member member, String content, String previewContent, String searchContent, String previewImage, String title, Stage stage) {
this.member = member;
this.title = title;
this.content = content;
this.previewContent = previewContent;
this.searchContent = searchContent;
this.previewImage = previewImage;
this.likeCount = 0;
this.scrapCount = 0;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ALTER TABLE post
ADD COLUMN search_content TEXT NULL;

0 comments on commit d0bab19

Please sign in to comment.