# Show GN: Flyway Community Edition을 위한 Rollback Extension

> Clean Markdown view of GeekNews topic #29221. Use the original source for factual precision when an external source URL is present.

## Metadata

- GeekNews HTML: [https://news.hada.io/topic?id=29221](https://news.hada.io/topic?id=29221)
- GeekNews Markdown: [https://news.hada.io/topic/29221.md](https://news.hada.io/topic/29221.md)
- Type: show
- Author: [coder013](https://news.hada.io/@coder013)
- Published: 2026-05-06T17:26:28+09:00
- Updated: 2026-05-06T17:26:28+09:00
- Original source: [github.com/coder013](https://github.com/coder013/flyway-rollback-extension)
- Points: 1
- Comments: 0

## Topic Body

##### 왜 만들었나  
  
- **ECS/EKS 환경**에서는 애플리케이션 롤백이 가능하지만, **데이터베이스 변경 사항은 자동 롤백이 불가능**합니다.  
- **Flyway**에선 `undo` 커맨드로 롤백을 지원하지만, Enterprise Edition부터 지원하며 **Community Edition에서는 사용할 수 없습니다.**  
- Enterprise 라이선스가 부담스러운 **개인 프로젝트, 소규모 팀**을 위해 이 Extension을 개발했습니다.  
  
##### 동작 방식  
  
- 마이그레이션과 같은 방식으로 `R{version}__*.sql` 파일을 `db/rollback/`에 작성  
- 애플리케이션 구동 시 현재 버전 → 타겟 버전 사이의 스크립트를 역순으로 실행  
  
##### 주요 기능  
  
- **Fail-fast 사전 검증** — 실행 전 롤백 스크립트 존재 여부 검사  
- **단일 트랜잭션** — all-or-nothing 보장  
- **Dry-run 모드** — 실행 계획만 로깅 가능  
- **롤백 이력** — `flyway_rollback_history` 테이블에 로그 기록  
- **Actuator 엔드포인트** — `/actuator/flyway-rollback`에서 적용 버전 및 사용 가능한 스크립트 조회  
  
##### 요구사항  
  
- Java 17+, Spring Boot 3.x  
  
---  
  
처음으로 개발한 오픈소스 라이브러리라 부족한 점이 많을 수 있습니다. 사용 후기나 개선 제안 편하게 남겨주세요. 감사합니다!

## Comments



_No public comments on this page._
