-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
12 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
zzansuni-api-server/app/src/main/resources/db/migration/V3__alter_review.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |