4

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?

1 Answer 1

3

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.

Sign up to request clarification or add additional context in comments.

2 Comments

This command compares two seperate databases and outputs the changelog. What I need is to compare the database and the changelog xml file (with changesets) and find out the difference between them.
In that case, you could apply the changelog to a second database and then compare the two databases.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.