Skip to content

Commit

Permalink
[Feat]: 챌린지 리뷰 DDL 수정 (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
bayy1216 committed Sep 19, 2024
1 parent 2ed8343 commit 15f66e2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
@Builder
@Table(
indexes = {
@Index(name = "idx_challenge_review_challenge_group_id", columnList = "challenge_group_id"),
@Index(
name = "idx_challenge_review_challenge_group_id_rating",
columnList = "challenge_group_id, rating"
),
}
)
public class ChallengeReview extends BaseTimeEntity {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
-- 평점 1~5이므로 `TINYINT`로 변경
ALTER TABLE challenge_review MODIFY COLUMN rating TINYINT NOT NULL;

-- 기존 인덱스 삭제
DROP INDEX idx_challenge_review_challenge_group_id ON challenge_review;

-- 새로운 복합 인덱스 생성
CREATE INDEX idx_challenge_review_challenge_group_id_rating ON challenge_review (challenge_group_id, rating);

0 comments on commit 15f66e2

Please sign in to comment.