If you know the number of changesets you have to apply, you could use the equivalent of command line’s action "updateCount " in whatever way your are using liquibase.
Or is there no way to break your changelog into much smaller pieces? If you have to stop changesets from executing starting at some point, then you should have a way to create much smaller changelogs (with eventually one big changelog composed with includes).
I already have lots of small changesets. Don't understand exactly your suggestion here.
I was speaking about breaking your big changelog into smaller changelogs (not changesets) and applying only the last ones.
Or is there no way to break your changelog into much smaller pieces? If
you have to stop changesets from executing starting at some
point, then you should have a way to create much smaller
changelogs (with eventually one big changelog composed with includes).
I already have lots of small changesets. Don’t understand exactly your suggestion here.
Your answers gave me an idea and since we are dynamically creating an include changelog file, for all the smaller changelogs, I simple iterate all the smaller changelog files until I reach the file from each things can be executed or not.
Then I execute a query to check for the specific condition, and if everything ran ok, I create another dynamic changelog file with the remaining changelogs.
If I understand correctly:
- You got your changesets in tiny changelog files.
- You include all these mini changelogs into an include changelog file generated dynamically at process start, which will include all the changesets created up to this day.
- You run the big file.
Is that it ?
In this case, can’t you save the last changeset applied by this method and start dynamic generation starting from this saved data ?
That’s what I’m doing.
I create two "include changelog
file".
One that runs all the “tiny changelog files” until the point where the next “tiny changelog files” merged into a "include changelog
file" may run or not, based on a specific condition.