I have an existing database and I used the generateChangeLog command to create the original change log. This works great :-)
But now I want developers to use all the tools / processes that they already know / use to develop the database and code, and use the script to generate any incremental changesets as needed.
That is: make the difference with the current state of the developer database (url / username / password in the properties file) using the current change log (changeLogFile in the properties file) as the base link.
There seems to be no easy way to do this - the best I came up with is:
- Create a new temporary database.
- Use Liquibase to initialize the temp database (to what is currently on the change list) by overriding the connection URL:
liquibase --url=jdbc:mysql://localhost:3306/tempbase update - Use Liquibase to create a change set in the change log using two databases:
liquibase --referenceUrl=jdbc:mysql://localhost:3306/tempbase --referenceUsername=foo --referencePassword=baz diffChangeLog - Delete the temporary database.
- Sync change set:
liquibase changelogSync
but there must be a better way ...
source share