Skip to content

[Fix/#54] Flyway V6 버전 충돌 재정렬 - #55

Merged
tnals0924 merged 1 commit into
mainfrom
fix/#54-flyway-version-conflict
Sep 22, 2026
Merged

tnals0924 merged 1 commit into
mainfrom
fix/#54-flyway-version-conflict

Conversation

@tnals0924

Copy link
Copy Markdown
Member

#️⃣연관된 이슈

🎯 해결하려는 문제가 무엇인가요?

infrastructure/db/src/main/resources/db/migration/에 V6 버전 파일이 두 개 존재한다.

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로 연속하며 충돌이 없다.

버전 파일
V6 replace_notices_category_index_with_sort_columns
V7 replace_event_applications_member_id_index_with_applied_at
V8 rename_student_fees_to_transfer_statuses (기존 V6)

🧩 이 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이 이미 기록돼 있지 않은지 확인 부탁드립니다.

@coderabbitai

coderabbitai Bot commented Sep 22, 2026

Copy link
Copy Markdown

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

💤 Files selected but had no reviewable changes (1)
  • infrastructure/db/src/main/resources/db/migration/V8__rename_student_fees_to_transfer_statuses.sql
⚙️ Run configuration

Configuration used: Repository: billilge/stream-server/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 6628adfa-2da2-458d-a406-11c736d3e655

📥 Commits

Reviewing files that changed from the base of the PR and between bd118e6 and df6f0d6.

📒 Files selected for processing (1)
  • infrastructure/db/src/main/resources/db/migration/V8__rename_student_fees_to_transfer_statuses.sql

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

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

@tnals0924
tnals0924 merged commit 958756b into main Sep 22, 2026
2 checks passed
@tnals0924
tnals0924 deleted the fix/#54-flyway-version-conflict branch September 22, 2026 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flyway 마이그레이션 V6 버전 충돌 재정렬

2 participants