how use liquibase with spring and maven plugin
For further reference, please consider the following sections:
- Official Apache Maven documentation
- Spring Boot Maven Plugin Reference Guide
- Create an OCI image
- Spring Data JPA
- Spring Boot DevTools
- Liquibase Migration
The following guides illustrate how to use some features concretely:
two path for use liquibase
- use maven plugin
- use spring
- create database and add config to application.properties
- create db.changelog-master.yaml for define changeSet
- mvn liquibase:update command for update db with changeSet
- mvn liquibase:rollback -Dliquibase.rollbackCount=1
for rollback with count from last - mvn liquibase:rollback -Dliquibase.rollbackTag=version_1.3
for rollback after specific tag
-
add follow properties at application.properties '''spring.liquibase.change-log=classpath:db.changelog-master.yaml
spring.liquibase.enabled=false''' -
run project