Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Mixed scripts above target trigger error when mixed=false #2392
Which version and edition of Flyway are you using?
5.2.4 Community Edition
If this is not the latest version, can you reproduce the issue with the latest one as well?
Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)
Which database are you using (type & version)?
Which operating system are you using?
What did you do?
I have a unit test that tests that I can perform a migration from scratch to version 1, even if I have a 'pending' V2 script that would fail with
Basically, this check is done 'too soon', as all migrations scripts that are found are checked, even though some are 'pending', and this is ok to let them break the 'non-mixed' rule as long as they are not applied.
Is there a way for me to go back to the old behaviour, that allows to have scripts breaking the rule, as long as they are not applied when performing a migration ?
What did you expect to see?
I would have expected the same behaviour. Let the V2 script be, since it's not intended to be applied (target version = 1), and not fail.
What did you see instead?
Exception thrown due to V2 breaking the 'non-mixed statements' rule.