I have a very simple Spring Boot 2.0.4 project. Following the various examples for setting up the Liquibase Gradle plugin I wanted to be able to run the diffChangeLog
target to update my change log XML file. The configuration looks like this:
liquibase {
activities {
main {
url 'jdbc:postgresql://localhost:5432/example_db'
username 'user'
password 'password'
driver 'org.postgresql.Driver'
referenceUrl 'hibernate:spring:com.example?dialect=org.hibernate.dialect.PostgreSQL9Dialect&hibernate.physical_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy&hibernate.implicit_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy'
referenceDriver 'liquibase.ext.hibernate.database.connection.HibernateDriver'
classpath 'src/main'
changeLogFile "src/main/resources/db/changelog/master.xml"
}
runList = 'main'
}
}
The database is empty except for the databasechangelog
and databasechangeloglock
tables. When I run gradle diffChangeLog
the change log XML file is never updated. The output from gradle diff
shows "NONE" for everything. My project does have an entity and it is annotated with @Entity
.
What am I doing wrong?