[HOTFIX][WTH-508] V3 마이그레이션 수용을 위한 스키마·검증 완화 - #108
Merged
Merged
Conversation
정규 릴리즈에 포함될 V12~V14를 핫픽스에 함께 담는다. 핫픽스가 먼저 나가는데 V15만 적용하면 운영 이력이 V1~V11, V15가 되어 이후 정규 릴리즈에서 V12~V14가 out-of-order로 판정돼 기동에 실패한다 (spring.flyway.out-of-order 미설정, 기본 false). 파일은 dev에서 그대로 가져와 체크섬이 동일하다. 세 마이그레이션 모두 기본값을 가진 컬럼 추가/확장이라 해당 기능 코드가 없어도 무해하다. Refs: WTH-508 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FUfuUw4qjjHWfZKiyqgADJ
V3 마이그레이션 대상 데이터의 event.content 최대 길이가 632자로 기존 varchar(500) 한도를 초과해 잘림이 발생한다. session.content(최대 431자)도 여유가 적어 함께 TEXT로 통일한다. Refs: WTH-508 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FUfuUw4qjjHWfZKiyqgADJ (cherry picked from commit d17ce27)
엔티티 컬럼을 TEXT로 넓혔으나 요청 DTO가 500자로 막고 있어, 마이그레이션된 632자 일정을 수정할 때 검증에 걸린다. V3는 해당 필드에 길이 제약이 없었다. Refs: WTH-508 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FUfuUw4qjjHWfZKiyqgADJ (cherry picked from commit 39fc573)
Flyway로 스키마를 관리하므로 엔티티 변경에 대응하는 V15를 추가한다. prod는 ddl-auto가 validate라 마이그레이션 없이는 기동에 실패한다. Refs: WTH-508 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FUfuUw4qjjHWfZKiyqgADJ (cherry picked from commit 6b780d8)
V3 마이그레이션 대상에 세션 자료(pptx 27건)와 문서(docx 2건)가 있어 현행 허용 목록(jpg/jpeg/png/webp/pdf)으로는 이전할 수 없다. FileContentType이 @JvmInline value class의 init에서 검증하므로 별도 컨버터 없이 조회 시점에도 생성자를 통과한다. 즉 이 변경이 배포되기 전에 pptx/docx 행을 넣으면 해당 게시글 조회에서 예외가 난다. 마이그레이션보다 먼저 나가야 하는 이유다. svg는 추가하지 않는다. XML이라 <script>를 품을 수 있어 인라인 서빙 시 XSS 벡터가 된다. mp4도 용량·전송비·Range 요청 문제로 제외한다. 두 건은 UNSUPPORTED_TYPE으로 남는다. Refs: WTH-508 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FUfuUw4qjjHWfZKiyqgADJ
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
hyxklee
marked this pull request as ready for review
September 19, 2026 16:09
This was referenced Sep 19, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
목적
V3 → V4 데이터 마이그레이션(WTH-508)을 받기 위해 운영에 먼저 나가야 하는 최소 변경입니다.
마이그레이션 자체는 DB/S3 작업이라 배포가 필요 없지만, 아래 둘은 배포가 선행돼야 합니다.
event.content→TEXTvarchar(500)에서 잘림FileType에 pptx/docx두 번째가 특히 중요합니다.
FileContentType이@JvmInline value class의init에서 검증하고별도 컨버터가 없어, DB에서 읽을 때도 생성자를 통과합니다. 즉 마이그레이션으로 행을 넣어두고
이 변경이 배포되지 않으면 삽입은 성공하고 조회에서 터집니다.
변경 내용
1. 운영 미반영 마이그레이션 동기화 (
d31a0c4)main은 V11까지인데dev에 V12V14가 대기 중입니다. 핫픽스가 먼저 나가므로V14가 out-of-order로 판정돼 기동에 실패합니다 (V15만 적용하면 운영 이력이
V1~V11, V15가 되고, 이후 정규 릴리즈에서V12
spring.flyway.out-of-order미설정).따라서 V12~V14를
dev에서 바이트 단위로 그대로 가져왔습니다. 체크섬이 동일해정규 릴리즈 때 "이미 적용됨"으로 건너뜁니다. 세 마이그레이션 모두 기본값을 가진
컬럼 추가/확장이라 해당 기능 코드가 없어도 무해합니다.
2. 일정·세션 내용 길이 (
0a7d84f,19c7628,89677b7)event.contentmeeting.content→session.content엔티티
TEXT전환 + 요청 DTO@Size1000자 + FlywayV15.DTO까지 올린 이유는, 엔티티만 넓히면 마이그레이션된 632자 일정을 수정할 때 검증에 걸리기 때문입니다.
참고로 V3에는 이 필드에 길이 제약이 없었습니다.
3. 첨부 허용 형식 (
b67d17f)svg는 추가하지 않았습니다 — XML이라
<script>를 품을 수 있어 인라인 서빙 시 XSS 벡터가 됩니다.mp4도 제외(용량·전송비·Range 요청). 두 건은 마이그레이션에서
UNSUPPORTED_TYPE으로 남습니다.포함하지 않은 것
파일 마이그레이터(
src/migration/kotlin)는 제외했습니다. 별도 소스셋이라bootJar에 포함되지 않고런타임에 영향이 없으며, 로컬에서 브랜치 체크아웃으로 실행 가능합니다. → PR #107 (dev, 정규 릴리즈)
머지 후 필수 조치
main→dev역머지가 필요합니다. 안 하면 다음 정규 릴리즈에서 충돌합니다(특히
Event.kt는 WTH-495에서도 수정 중입니다).또한 WTH-495의
V13__add_notion_calendar_import.sql은dev의V13__add_user_privacy_settings.sql과버전이 충돌하므로
V16으로 변경해야 합니다.검증
./gradlew ktlintCheck compileKotlin test --tests "*File*Test*"통과dev와 동일함을 확인관련
docs/plan/v3-to-v4-migration-plan.md🤖 Generated with Claude Code
https://claude.ai/code/session_01FUfuUw4qjjHWfZKiyqgADJ