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

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

pmatseykanets opened this issue May 25, 2018 · 10 comments

Comments

@pmatseykanets
Copy link

@pmatseykanets pmatseykanets commented May 25, 2018

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

@axelfontaine axelfontaine commented May 25, 2018

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

@pmatseykanets
Copy link
Author

@pmatseykanets pmatseykanets commented May 25, 2018

It is filesystem location

@hemberger
Copy link

@hemberger hemberger commented May 25, 2018

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

@axelfontaine axelfontaine commented May 26, 2018

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

@hemberger hemberger commented May 26, 2018

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

@geoffreywiseman geoffreywiseman commented May 26, 2018

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

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

@axelfontaine axelfontaine commented May 28, 2018

@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

@hemberger hemberger commented May 28, 2018

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

@pmatseykanets
Copy link
Author

@pmatseykanets pmatseykanets commented May 29, 2018

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 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
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants