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

Allow newer migrations to exist and be skipped by validateOnMigrate #816

adrianchung opened this issue Aug 5, 2014 · 1 comment


Copy link

Since flyway 3.0, the validateOnMigrate is set to true by default. This causes problems with our blue-green deployment strategy.


  • Old code running on EC2 instance, running on schema version 10
  • Bring up new EC2 instance, running on schema version 11, database is now upgraded. At this point, both the old and the new code is running simultaneously.
  • Restart services on old EC2 instance, or start a new EC2 instance using the old code (perhaps done through autoscaling groups).

In this scenario, we won't be able to restart the services on the old EC2 instance because it will detect version 11 of the schema has been applied. An exception message like: Caused by: org.flywaydb.core.api.FlywayException: Validate failed. Found differences between applied migrations and available migrations: Detected applied migration missing on the classpath: 11.

All of our schema changes are backwards compatible, so it'd be nice if we can set an option to ignore detecting newer schema versions.

I realize there is a 'target' property, but that is less than ideal because I don't want to update that every time I add a new schema change.

Ideally, I'd have a property that I can set to just ignore newer schema versions detected, but continue to validate the checksums of schemas up to the the latest applied version in code.

Copy link

Hi Adrian,

thanks for the suggestion. Yes, this makes sense. This is actually already available for failed migrations, but not for successful ones. Maybe the existing property could simply be generalized.


@axelfontaine axelfontaine added this to the Flyway 3.1 milestone Aug 7, 2014
@axelfontaine axelfontaine changed the title Allow newer schemas to be exist and be skipped by validateOnMigrate Allow newer migrations to exist and be skipped by validateOnMigrate Nov 25, 2014
axelfontaine pushed a commit to flyway/ that referenced this issue Nov 25, 2014
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