Span system for production database - Migration checksum mismatch

Every time I change something from the database structure, I create a new migration file, using a timestamp for execution in order, with a clean database, the migrate command (with the maven plugin or command line tool) works fine, but in the production database , with the same database structure, but with added data, I got this error:

Failed to fulfill the goal org.flywaydb: flyway-maven-plugin: 3.2.1: perform migration (main) according to the project eee-ejb: org.flywaydb.core.api.FlywayException: Failed to complete the check. Migration Migration Checksum for Migration 1430224929 [ERROR] β†’ Applies to database: -1639634536 [ERROR] β†’ Allowed locally: -1412099238

How can I use span in a production database where data is constantly being added?

+5
mysql maven flyway
source share
2 answers

This is not related to adding data. This is a change to the migration script itself. One Place to Check - Git CRLF Normalization Issues.

Update: Now Flyway 4.0 will automatically take care of this.

+4
source share

The originally launched script is now modified. If you are sure that change is what you want, run

./flyway repair

This will change, update the metadata table, and you will not get an error.

+3
source share

All Articles