10

I'm using flyway for migrations. Flyway version is Flyway 3.2.1 by Boxfuse. When I am executing

./flyway migrate -url=jdbc:postgresql://$FLYWAY_DATABASE_HOST/$FLYWAY_DATABASE_NAME -password=$FLYWAY_DATABASE_PASSWORD -user=$FLYWAY_DATABASE_USER

I'm getting following error

"ERROR: Validate failed. Migration Checksum mismatch for migration 80
 Applied to database : -401430104
 Resolved locally    : -485639995

How can I resolve this?

2
  • I'm not able to get(or which command) to execute to do repair Commented Dec 28, 2020 at 16:15
  • The tag I added because I thought I'm using sbt as a build tool Commented Dec 28, 2020 at 18:03

1 Answer 1

8

Migration Checksum mismatch means that the contents of a particular migration file has changed since you executed it, and that means that your script collection might not be a faithful representation of the database schema.

If you are happy that the scripts are still good (eg the changes were comments and formatting) then flyway repair with the same URL and credentials will clear this error. If not, then you should either revert the changes, or flyway repair and accept the mismatch.

Not the answer you're looking for? Browse other questions tagged or ask your own question.