[Fix/#54] Flyway V6 버전 충돌 재정렬 - #55
Merged
Merged
Conversation
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes. 💤 Files selected but had no reviewable changes (1)
⚙️ Run configurationConfiguration used: Repository: billilge/stream-server/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
sangrae2325
approved these changes
Sep 22, 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.
#️⃣연관된 이슈
🎯 해결하려는 문제가 무엇인가요?
infrastructure/db/src/main/resources/db/migration/에 V6 버전 파일이 두 개 존재한다.V6__rename_student_fees_to_transfer_statuses.sql(PR [Feat/#34] 학생회비 납부 API 개발 #35, 나중 머지)V6__replace_notices_category_index_with_sort_columns.sql(PR [Refactor/#38] 커서 record 공통 로직을 Cursor 인터페이스로 추출 #39, 먼저 머지)Flyway는 동일 버전이 둘 이상이면 부팅 시
Found more than one migration with version '6'오류로 실패한다.❓ 왜 해결해야 하나요?
버전 충돌 상태에서는 Flyway가 스키마 검증/적용을 시작하지 못해 애플리케이션이 뜨지 않는다. 배포·기동을 위해 반드시 해소해야 한다.
⭐ 어떻게 해결했나요?
컨벤션(
docs/conventions/flyway-migration.md§2, "겹치면 머지하는 쪽에서 재조정")에 따라, 나중에 머지된V6__rename_student_fees_to_transfer_statuses.sql을 비어있는 다음 번호V8로 재정렬했다.재정렬 후 버전은 V1~V8로 연속하며 충돌이 없다.
🧩 이 PR의 한계 & 트레이드오프
파일명만 변경하고 SQL 내용은 그대로 두었다. 두 V6 마이그레이션은 각각 다른 테이블(notices / student_fees·transfer_statuses)을 대상으로 해 서로 의존성이 없어, 순서 재배치가 스키마 결과에 영향을 주지 않는다.
⛓️ 기존 기능에 미치는 영향
중복 V6로 인해 Flyway는 지금까지 V6 이후를 적용하지 못했을 것이므로, 어떤 환경에도 이 파일이 이미 적용되어 checksum이 기록된 상태는 아닐 것으로 판단된다. 만약 특정 환경에 이미 V6가 적용된 이력이 있다면
flyway_schema_history확인이 필요하다.🔀 Edge Case & 실패 시나리오
flyway_schema_history에 version 6이 기록된 DB가 있다면, 파일 재정렬 후missing/checksum관련 검증 이슈가 발생할 수 있다. 이 경우 해당 환경에서 이력 정합성을 별도 확인해야 한다.📋 검토한 대안과 선택 이유
💬 리뷰 포인트
[r]각 환경(dev/prod) DB의flyway_schema_history에 version 6이 이미 기록돼 있지 않은지 확인 부탁드립니다.