Skip to content

[HOTFIX][WTH-508] V3 마이그레이션 수용을 위한 스키마·검증 완화 - #108

Merged
hyxklee merged 5 commits into
mainfrom
hotfix/v3-migration-schema
Sep 19, 2026
Merged

hyxklee merged 5 commits into
mainfrom
hotfix/v3-migration-schema

Conversation

@hyxklee

@hyxklee hyxklee commented Sep 19, 2026

Copy link
Copy Markdown
Member

목적

V3 → V4 데이터 마이그레이션(WTH-508)을 받기 위해 운영에 먼저 나가야 하는 최소 변경입니다.
마이그레이션 자체는 DB/S3 작업이라 배포가 필요 없지만, 아래 둘은 배포가 선행돼야 합니다.

변경 없으면
event.contentTEXT V3 최대 632자가 varchar(500)에서 잘림
FileType에 pptx/docx 해당 첨부 29건이 붙은 글을 조회할 때 예외

두 번째가 특히 중요합니다. FileContentType@JvmInline value classinit에서 검증하고
별도 컨버터가 없어, DB에서 읽을 때도 생성자를 통과합니다. 즉 마이그레이션으로 행을 넣어두고
이 변경이 배포되지 않으면 삽입은 성공하고 조회에서 터집니다.

변경 내용

1. 운영 미반영 마이그레이션 동기화 (d31a0c4)

main은 V11까지인데 dev에 V12V14가 대기 중입니다. 핫픽스가 먼저 나가므로
V15만 적용하면 운영 이력이 V1~V11, V15가 되고, 이후 정규 릴리즈에서
V12
V14가 out-of-order로 판정돼 기동에 실패합니다 (spring.flyway.out-of-order 미설정).

따라서 V12~V14를 dev에서 바이트 단위로 그대로 가져왔습니다. 체크섬이 동일해
정규 릴리즈 때 "이미 적용됨"으로 건너뜁니다. 세 마이그레이션 모두 기본값을 가진
컬럼 추가/확장이라 해당 기능 코드가 없어도 무해합니다.

2. 일정·세션 내용 길이 (0a7d84f, 19c7628, 89677b7)

컬럼 V3 실측 최대 기존 한도
event.content 632 500
meeting.contentsession.content 431 500

엔티티 TEXT 전환 + 요청 DTO @Size 1000자 + Flyway V15.
DTO까지 올린 이유는, 엔티티만 넓히면 마이그레이션된 632자 일정을 수정할 때 검증에 걸리기 때문입니다.
참고로 V3에는 이 필드에 길이 제약이 없었습니다.

3. 첨부 허용 형식 (b67d17f)

PPTX("application/vnd.openxmlformats-officedocument.presentationml.presentation", setOf("pptx")),
DOCX("application/vnd.openxmlformats-officedocument.wordprocessingml.document", setOf("docx")),

svg는 추가하지 않았습니다 — XML이라 <script>를 품을 수 있어 인라인 서빙 시 XSS 벡터가 됩니다.
mp4도 제외(용량·전송비·Range 요청). 두 건은 마이그레이션에서 UNSUPPORTED_TYPE으로 남습니다.

포함하지 않은 것

파일 마이그레이터(src/migration/kotlin)는 제외했습니다. 별도 소스셋이라 bootJar에 포함되지 않고
런타임에 영향이 없으며, 로컬에서 브랜치 체크아웃으로 실행 가능합니다. → PR #107 (dev, 정규 릴리즈)

머지 후 필수 조치

maindev 역머지가 필요합니다. 안 하면 다음 정규 릴리즈에서 충돌합니다
(특히 Event.kt는 WTH-495에서도 수정 중입니다).

또한 WTH-495의 V13__add_notion_calendar_import.sqldevV13__add_user_privacy_settings.sql
버전이 충돌하므로 V16으로 변경해야 합니다.

검증

  • ./gradlew ktlintCheck compileKotlin test --tests "*File*Test*" 통과
  • V12~V14 체크섬이 dev와 동일함을 확인
  • 로컬에서 V4 운영 데이터 복제본에 전체 마이그레이션 리허설 완료 (건수·무결성 전 항목 통과)

관련

🤖 Generated with Claude Code

https://claude.ai/code/session_01FUfuUw4qjjHWfZKiyqgADJ

hyxklee and others added 5 commits September 20, 2026 01:04
정규 릴리즈에 포함될 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
@coderabbitai

coderabbitai Bot commented Sep 19, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 4bb9cc2b-9519-4166-922b-248455523147

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@hyxklee hyxklee self-assigned this Sep 19, 2026
@hyxklee
hyxklee marked this pull request as ready for review September 19, 2026 16:09
@hyxklee
hyxklee merged commit 032b0ba into main Sep 19, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant