반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- 정규식
- Visual Studio Code
- json
- Java
- 이클립스
- IntelliJ
- table
- javascript
- 자바스크립트
- js
- Array
- Eclipse
- 테이블
- string
- date
- CSS
- list
- windows
- 배열
- 문자열
- input
- Button
- vscode
- 이탈리아
- Maven
- CMD
- 인텔리제이
- ArrayList
- html
- 자바
Archives
- Today
- Total
어제 오늘 내일
Liquibase checksum 오류가 발생하는 경우 (변경사항 없는 경우 포함) 본문
다음과 같이 liquibase checksum 오류가 발생하는 경우 해결방법
liquibase.exception.CommandExecutionException: liquibase.exception.ValidationFailedException: Validation Failed:
1 changeset check sum
db/changelog/2024-01/schema-changes.xml::add-email-column::jdoe
previously: 8:3a5d9e4b2b8f9a1f5b4a53e34f9d2c65
now: 8:9c1e2a3b4f1d6c9f8e3b0d7e2f1c4a67
Reason: The changeset has been modified since it was executed
원인
이 오류는 다음 중 하나의 이유로 발생합니다:
- schema-changes.xml의 내용이 수정되었음 (공백, 주석, 순서 변경 포함).
- Liquibase 버전 변경 등으로 checksum 계산 방식이 달라짐.
해결방법
1. liquibase clearCheckSums 사용 (로컬/개발 환경)
liquibase clearCheckSums
- 체크섬을 모두 삭제합니다.
- 이후 다시 Liquibase를 실행하면 새 체크섬을 기준으로 DATABASECHANGELOG가 업데이트됩니다.
Maven/Gradle로 실행 시
# Maven
./mvnw liquibase:clearCheckSums
# Gradle
./gradlew liquibaseClearChecksums
2. Spring Boot 설정으로 자동 초기화 (개발 중 빠른 테스트용)
application.yml 또는 application.properties에 다음 옵션 추가
# yaml
spring.liquibase.clear-checksums: true
# properties
spring.liquibase.clear-checksums=true
주의: 매번 애플리케이션 실행 시 checksum을 초기화하므로, 운영환경에서는 사용하지 마세요.
반응형
'IT > SpringBoot' 카테고리의 다른 글
[SpringBoot] h2 db 설정, h2 콘솔 접속하기 (0) | 2024.05.04 |
---|---|
[Spring] 등록 된 모든 Bean 목록 출력하기 (2) | 2024.04.08 |
[Spring Boot] @RequestParam 어노테이션 사용법 (0) | 2023.12.20 |
[Spring Boot / 에러] Name for argument of type [java.lang.String] not specified, and parameter name information not found in class file either (0) | 2023.12.19 |
[Spring Boot] 서버 포트 변경하기 (0) | 2023.06.25 |
Comments