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

Documentation is not clear about the definition of missing and future migration #1847

Closed
Jidehem opened this issue Nov 30, 2017 · 1 comment
Closed

Comments

@Jidehem
Copy link

@Jidehem Jidehem commented Nov 30, 2017

What version of Flyway are you using?

4.2.0

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

Maven

What database are you using (type & version)?

(Oracle)

What operating system are you using?

(WIndows)

What did you do?

(Please include the content causing the issue, any relevant configuration settings, and the command you ran)
I removed a migration, then ran migrate with ignoreMissingMigrations=true.

What did you expect to see?

A successful migration that do nothing

What did you see instead?

The following error

Validate failed: Detected applied migration not resolved locally: version_x

Analysis

See this knowledge sharing.
The problem comes from the definition of missing migration.

  • either define (and document !) missing migration as a migration that is not anymore present but there is a newer available migration (=> else it's a future migration)
  • either change logic to effectively ignore this case too. However, I feel that this may conflict with the definition of future migration. Thus first solution (improve documentation) is probably the best.
@axelfontaine
Copy link
Contributor

@axelfontaine axelfontaine commented Nov 30, 2017

Good point! I agree it is a documentation issue. We have now clarified it with:

Note that if the most recently applied migration is removed, Flyway has no way to know it is missing and will mark it as future instead.

axelfontaine added a commit to flyway/flywaydb.org that referenced this issue Nov 30, 2017
dohrayme pushed a commit to dohrayme/flyway that referenced this issue Feb 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants