Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Liquibase skip generated changeset

We have a running project and we started using Liquibase. I generated ChangeSets from our existing database. I have integrated liquibase into our solution and now I need the initial ChangeSet to be skipped on systems with existing database, but I need to run it on newly installed systems. Is there any out-of-the-box solution for this scenario?

like image 896
Michal Krasny Avatar asked Dec 06 '25 03:12

Michal Krasny


1 Answers

Run Liquibase once with the parameter changelogSync (instead of update), e.g.:

liquibase --changeLogFile=my_changelog.xml --defaultsFile=db.properties changeLogSync

That will mark all changesets from your changelog as being executed in the target database.

More details here: http://www.liquibase.org/documentation/existing_project.html


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!