Skip to content

[WTH-503] penalty_type 컬럼 WARNING 값 저장 안 되는 문제 수정 - #104

Merged
woneeeee merged 2 commits into
devfrom
fix/WTH-503-penalty_type-컬럼-WARNING-값-저장-안-되는-문제-수정
Sep 13, 2026

Hidden character warning

The head ref may contain hidden characters: "fix/WTH-503-penalty_type-\uceec\ub7fc-WARNING-\uac12-\uc800\uc7a5-\uc548-\ub418\ub294-\ubb38\uc81c-\uc218\uc815"
Merged

woneeeee merged 2 commits into
devfrom
fix/WTH-503-penalty_type-컬럼-WARNING-값-저장-안-되는-문제-수정

Conversation

@woneeeee

@woneeeee woneeeee commented Sep 13, 2026

Copy link
Copy Markdown
Member

📌 Summary

어떤 작업인지 한 줄 요약해 주세요.

페널티 부여 API에서 penaltyType=WARNING으로 요청 시 500 에러가 발생하던 문제 수정

📝 Changes

변경사항을 what, why, how로 구분해 작성해 주세요.

What

penalty 테이블의 penalty_type 컬럼을 VARCHAR(20)으로 변경하는 Flyway 마이그레이션(V14) 추가

Why

PenaltyType enum에 WARNING 값이 추가됐지만(28254b6) 이를 반영하는 DB 마이그레이션이 없어서, penalty_type 컬럼이 여전히 PENALTY만 허용하는 제약으로 남아 있었음. 이 상태로 WARNING을 insert하면 Data truncated for column 'penalty_type' 에러로 500이 발생함

How

V14 마이그레이션에서 ALTER TABLE penalty MODIFY COLUMN penalty_type VARCHAR(20) NOT NULL DEFAULT 'PENALTY' 실행 — Hibernate의 @Enumerated(EnumType.STRING) 매핑과 동일한 VARCHAR로 맞춤

📸 Screenshots / Logs

필요시 스크린샷 or 로그를 첨부해주세요.

💡 Reviewer 참고사항

리뷰에 참고할 내용을 작성해주세요.

✅ Checklist

  • PR 제목 설정 완료 (WTH-123 인증 필터 설정)
  • 테스트 구현 완료
  • 리뷰어 등록 완료
  • 자체 코드 리뷰 완료

@woneeeee
woneeeee requested review from hyxklee and soo0711 September 13, 2026 13:12
@woneeeee woneeeee self-assigned this Sep 13, 2026
@woneeeee woneeeee added the 🐞 BugFix 버그 수정 label Sep 13, 2026
@coderabbitai

coderabbitai Bot commented Sep 13, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: a65001ab-a258-4cef-afdc-b2165bb4c15b


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@woneeeee woneeeee changed the title [WTH-503]: penalty_type 컬럼 WARNING 값 저장 안 되는 문제 수정 [WTH-503] penalty_type 컬럼 WARNING 값 저장 안 되는 문제 수정 Sep 13, 2026
@@ -0,0 +1,2 @@
ALTER TABLE penalty
MODIFY COLUMN penalty_type VARCHAR(20) NOT NULL DEFAULT 'PENALTY';

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image

변경이 varchar로 푸는 것 같은데, enum에 WARNING을 추가하는 방식으로 수정되어야하지 않을까용??

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

우엄... 그렇네요... varchar로 푸는 것보단 enum으로 WARNING만 추가하는게 지금 방식이랑 맞는 것 같네여... 수정해둿습니닷!!

@woneeeee
woneeeee merged commit 7691ac5 into dev Sep 13, 2026
2 checks passed
@woneeeee
woneeeee deleted the fix/WTH-503-penalty_type-컬럼-WARNING-값-저장-안-되는-문제-수정 branch September 13, 2026 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 BugFix 버그 수정

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants