Liquibase Gradle Plugin


We have a Spring Boot application with JPA entity beans and we use Gradle for building the project etc.
I use the Liquibase Gradle plugin to generate the changelog from the entity beans which all works fine.
My question is, if I want to add a new entity bean then I re-generate the changelog I will get all the existing changesets with different IDs plus the new changeset for the new enity bean. Is it possible to keep the existing IDs of the previous changelog along with the new ID for the new entity bean changeset OR somehow generate the changeset with just the diff i.e. only the new entity bean changeset? We would like to automate the whole process and don’t really want to copy the new changeset for the new entity bean to the original changelog.


Hi @Iain ,

What you can do is, first create a snapshot using the snapshot command. This will create your baseline. Then use the diffChangeLog command to generate the difference.

Your workflow should look like this,

  1. generateChangeLog
  2. snapshot (This will create your baseline so you wont have to regenerate the changelogs for changesets that are already there)
  3. diffChangeLog (compares your snapshot and live database)
1 Like