Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When migrations have been applied by enabling out-of-order Flyway displays the wrong current version #1457

rousej opened this issue Oct 26, 2016 · 1 comment


Copy link

rousej commented Oct 26, 2016

What version of Flyway are you using?


Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin, SBT plugin, ANT tasks)

Java API

What database are you using (type & version)?

Oracle 11g, MS Sql Server 2012, 2014

What operating system are you using?

Windows 7

What did you do?

(Please include the content causing the issue, any relevant configuration settings, and the command you ran)
I applied migrations in-order beginning with a baseline version of and ending with version I then applied migration version by enabling out-of-order. All migrations were successfully applied. The next time I ran flyway migrate I received the following output:

Flyway 4.0.3 by Boxfuse
Database: JDBC Driver; (Microsoft SQL Server 12.0)
Successfully validated 104 migrations (execution time 00:00.211s)
SQLServer does not support setting the schema for the current session. Default schema NOT changed to dbo
Current version of schema [dbo]:
outOfOrder mode is active. Migration of schema [dbo] may not be reproducible.
Schema [dbo] is up to date. No migration necessary.

What did you expect to see?

I expected to see the highest successfully applied migration version displayed as the Current version.

What did you see instead?

The Current version was displayed as, which was the last migration applied chronologically, but not the highest migration version applied.

@axelfontaine axelfontaine added this to the Flyway 4.1 milestone Oct 28, 2016
axelfontaine pushed a commit to flyway/ that referenced this issue Jan 31, 2017
Copy link

Good catch! Thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

2 participants