Gili
Gili

Reputation: 90180

Flyway: how to find out maximum version available to migrate()?

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()?

Upvotes: 2

Views: 1932

Answers (1)

Axel Fontaine
Axel Fontaine

Reputation: 35179

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.

Upvotes: 5

Related Questions