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

Repeatable migrations - error in case of checksum mismatch #1428

Closed
tomaszglinski opened this issue Sep 12, 2016 · 3 comments
Closed

Repeatable migrations - error in case of checksum mismatch #1428

tomaszglinski opened this issue Sep 12, 2016 · 3 comments

Comments

@tomaszglinski
Copy link

tomaszglinski commented Sep 12, 2016

What version of Flyway are you using?

4.0.3

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

Maven plugin 4.0.3

What database are you using (type & version)?

Mysql

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 have a repeatable migration file (with REPLACE commands). It applied correctly and run migration again

What did you expect to see?

The file should have been reapplied without any error

What did you see instead?

FlywayException: Validate failed: Migration checksum mismatch for migration R__testdata.sql

In schema_version table there are 2 migrations for that file written. One is success, the other one not.

@axelfontaine
Copy link
Contributor

Please provide a small repo that reproduces the issue.

@jowe
Copy link

jowe commented Sep 27, 2016

+1
We are facing the same issue: Flyway 4.0.3 reports checksum errors for failed repeatable migrations
which your are trying to fix by modifying the repeatable migration.

Use case:

  1. migrate R__create_view.sql => a syntax error in sql causes a failed repeatable migration
  2. correct error in R__create_view.sql and migrate again: checksum mismatch

You have to do a 'repair' or manual cleanup of the migration table before you can migrate sucessfully.

Summary: Perhaps not a bug - but flyway should not complain about modifications of failed repeatable migrations.

@axelfontaine
Copy link
Contributor

The error now clearly says there is a failed migration. No more confusion with complaining about checksums.

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

3 participants