Home > Enterprise >  Flyway Migration with mvn flyway:migrate is giving "Mismatch for migration 1.0.53" error
Flyway Migration with mvn flyway:migrate is giving "Mismatch for migration 1.0.53" error

Time:10-01

I am running mvn flyway:migrate command in CMD of flyway but migration of the script files gives the following exception

[ERROR] Failed to execute goal org.flywaydb:flyway-maven-plugin:3.2.1:migrate (default-cli) on project convertopia-auto-db: org.flywaydb.core.api.FlywayException: Validate failed. Migration Description mismatch for migration 1.0.53 [ERROR] -> Applied to database : update rule type column valid from nullable [ERROR] -> Resolved locally : update rule type column valid from nullable - Copy - Copy [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] enter image description here

As you can see that the last two (highlighted) files are not migrated

Also, please tell me how to create "SQL text file" with extension ".sql" in windows?

CodePudding user response:

Solved it myself by deleting the update rule type column valid from nullable - Copy - Copy file which was not present in my Directory. I knew that this folder was causing the issue so I have to delete this but it was not present in my directory. So, I go to source Tree and strangely found that folder there.

My problem got solved by deleting this duplicate folder from the source tree...

After that, mvn flyway:repair updated my files and migration was made successful.

  • Related