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
Labels
Milestone

Comments

@tomaszglinski
Copy link

@tomaszglinski 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

@axelfontaine axelfontaine commented Sep 14, 2016

Please provide a small repo that reproduces the issue.

@jowe
Copy link

@jowe 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 axelfontaine added this to the Flyway 4.1 milestone Oct 11, 2016
axelfontaine added a commit to flyway/flywaydb.org that referenced this issue Feb 6, 2017
@axelfontaine
Copy link
Contributor

@axelfontaine axelfontaine commented Feb 6, 2017

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

pradheeps pushed a commit to pradheeps/flyway that referenced this issue Mar 7, 2017
pradheeps pushed a commit to pradheeps/flyway that referenced this issue Mar 7, 2017
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
3 participants
You can’t perform that action at this time.