Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Liquibase - Update changelog XML file from database changes

I decided to use liquibase on my Java project with Postgresql, so I created initial changeset using generateChangeLog maven goal. Now it is working without any problems.

What I am looking for is after I made a change on the database (let's say from a RDBMS client), is there any command to analyze the changelog and the database status to generate changeset from my changes and append it to the changeset xml file?

like image 915
Utku Özdemir Avatar asked Oct 19 '25 18:10

Utku Özdemir


1 Answers

You are looking for the diffChangelog command: http://www.liquibase.org/documentation/diff.html

In change log mode, an XML change log of what is necessary to upgrade the base database to the target database is sent to standard out. This change log can be included as is, or copied into an existing change log. If the diff command is passed an existing change log file, the new change sets will be appended to the end of the file.

like image 71
SteveDonie Avatar answered Oct 22 '25 07:10

SteveDonie



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!