We have a existing database in production. We have decided to use liquibase for all further updates and create any new database (like development or integration).
We have created liquibase scripts based on the existing production schema (to create any new database like development, integration, etc). On top of that script we have also added two more updates. Going forward all further updates to production DB will be done by liquibase.
If we execute the liquibase on production, it will try do all the complete changes even those which are already exist, which should not happen as production already has everything except the two new updates. Now we want to use the liquibase to update those two changes alone to productions.
How we can do this?
Beyond the work of tracking the applied changes, other advantages liquibase would give you include: Ability to have the same change description on multiple database types. Ability to have if/then logic in what is applied. Generated documentation of database history.
The process to put a existing database under liquibase control is the following:
changelogSync
. This will create the Liquibase tables and mark all change sets as being applied (this is what you missed)update
to apply the change sets.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With