Skippable Elastic migrations
Some migrations require certain conditions to be met, for example being on a supported Elasticsearch version. If the condition is not met at the time the migration first executes, the migration will never be retried even if the condition is met in the future.
Proposal
Allow condition-dependent migrations to be re-evaluated and executed when the condition is met.
A migration can define a condition_met?
method. If this method is not defined, we always execute the migration.
We should cache this (maybe 24 hours) so that the condition checks aren't executed unnecessarily.
Edited by Madelein van Niekerk