1. mvn liquibase:generateChangeLog
It will generate a migration file in the project directory.
2. mvn compile
The generated file will be processed and placed into the classpath (target/classes).
(Make sure the resources folder is marked as a "resource root" so everything gets compiled into the classpath properly.)
3. mvn liquibase:changelogSync
It will find the file from target/classes (step 2) and create a table in the database for tracking migrations,
using the valid file name: db/changelog/db.changelog-master.xml.
After completing these 3 steps, everything will be set up correctly,
and Spring will launch the project and detect the Liquibase baseline.
liquibase.properties
# Important __________________________________________________________________
outputChangeLogFile=src/main/resources/db/changelog/db.changelog-master.xml
changeLogFile=db/changelog/db.changelog-master.xml
classpath=target/classes
# ____________________________________________________________________________
url=jdbc:postgresql://localhost:5432/OnlyHibernateDB
username=postgres
password=Mellon
driver=org.postgresql.Driver
application.properties
# Liquibase
spring.liquibase.change-log=db/changelog/db.changelog-master.xml
spring.liquibase.enabled=true