Flyway request if it will do any migrations

If the flyway finishes executing any migrations at startup, our deployment system would like to know, since then it needs to perform a different set of operations than if there is no database migration (if there are migrations, then all servers in the cluster will be removed, and then one server will start and migrate, and then the rest of the servers are busy. If not migrated, you can perform a rolling upgrade, which is desirable.)

So, you can set up a span as usual and then ask if it will do any migrations in its current state? My guess is that the term "dry run" will apply here: if there is any change in the dry run, then yes, otherwise no.

+3


source to share


1 answer


Got this, so the answer is: Obviously Flyway.info (). pending () will provide a set of operations to be performed. If it is not empty, then "yes, there are changes!".



+3


source







All Articles