Domanda

I'd like to detect the condition where the user's database is newer than the maximum version available to migration (for example, the user downgraded to an older version of the software). When I run the following:

System.out.println("source: " + flyway.status().getVersion().toString());
System.out.println("target: " + flyway.getTarget().toString());

I get the following output:

source: 8
target: 9223372036854775807

How do I get the actual maximum version available to migrate()?

È stato utile?

Soluzione

There is currently no functionality to query the available migrations. Feel free to raise an issue :-)

Update: You can now use Flyway.info() for this and more.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top