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

Getting 'ERROR: Validate failed' after upgrading from 5.0.7 to 5.1.0 #2027

Closed
pmatseykanets opened this issue May 25, 2018 · 10 comments
Closed

Comments

@pmatseykanets
Copy link

Which version and edition of Flyway are you using?

5.1.0

If this is not the latest version, can you reproduce the issue with the latest one as well?

This issue is caused by the latest version.

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

command-line

Which database are you using (type & version)?

PostgreSQL 10.3

Which operating system are you using?

Ubuntu 17

What did you do?

Ran migrate command

What did you expect to see?

Normal response as with prior versions i.e.

Flyway Community Edition 5.0.7 by Boxfuse

Database: jdbc:postgresql://<server>:<port>/<db> (PostgreSQL 10.3)
Successfully validated <N> migrations (execution time 00:00.061s)
Current version of schema "<schema>": 20180521112500
Schema "<schema>" is up to date. No migration necessary.
What did you see instead?
Flyway Community Edition 5.1.0 by Boxfuse

Database: jdbc:postgresql://<server>:<port>/<db> (PostgreSQL 10.3)
ERROR: Validate failed: Migration checksum mismatch for migration version 20171006100000
-> Applied to database : -698211182
-> Resolved locally    : 1049070299
@pmatseykanets pmatseykanets changed the title ERROR: Validate failed after upgrading from 5.0.7 to 5.1.0 Getting 'ERROR: Validate failed' after upgrading from 5.0.7 to 5.1.0 May 25, 2018
@axelfontaine
Copy link
Contributor

Is this a filesystem or a classpath location? Could you create a small repo that reproduces the issue?

@pmatseykanets
Copy link
Author

It is filesystem location

@hemberger
Copy link

I just updated to 5.1.0 from 5.0.7 as well and had checksum mismatches for about 1/3 of my migrations. I just went in and manually changed all the checksums by hand in flyway_schema_history because I know the *.sql patch files had not changed. This is a tedious process, so an easier way to recover would be much appreciated.

@axelfontaine
Copy link
Contributor

We have currently reverted downloads to 5.0.7 by default while we investigate this.

Any repo with migration files affected by this would be immensely useful for tracking this down. Could you create one to help speed up resolution of this issue?

Also no need to adjust checksums manually. Flyway 5.1.1 will fix this specific issue and in general the repair command can do this for you as well.

@hemberger
Copy link

Here are the migration files of which about 1/3 caused checksum issues for me:

https://github.com/smrealms/smr/tree/master/db/patches

Let me know if you need to know exactly which ones had different checksums.

@geoffreywiseman
Copy link

I've just upgraded to 5.1, seem to be having this same problem. Also postgres.

axelfontaine pushed a commit to flyway/flywaydb.org that referenced this issue May 28, 2018
@axelfontaine
Copy link
Contributor

@hemberger Thank you very much for the link to the repo. That was very helpful.

This has now been fixed. Expect a 5.1.1 release shortly.

@hemberger
Copy link

Thank you for the quick fix! I have been able to migrate successfully now with 5.1.1.

@pmatseykanets
Copy link
Author

Thanks a lot for quickly fixing it! Working perfectly with 5.1.1. 👍
Added regression testing to our CI to prevent this from reaching the production in the future when upgrading to a newer version.

@elnur
Copy link

elnur commented Oct 4, 2019

The same is happening to me with 5.2.4. What's up?

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
Development

No branches or pull requests

5 participants