0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

flywayMigrateで"Migration checksum mismatch for migration version"エラーが出る

Posted at

エラー内容

flywayMigrate実行時に下記エラーが発生する

Execution failed for task 'flywayMigrate'.
> Error occurred while executing flywayMigrate
  Validate failed: Migrations have failed validation
  Migration checksum mismatch for migration version *
  -> Applied to database : **********
  -> Resolved locally    : **********

原因

マイグレーションファイルが変更されたり、すでにDBに適用済みのマイグレーションとマイグレーションファイルの内容が異なるなどの理由でFlywayのチェックサムが一致しない状態になっています。

解決方法

一度flywayRepairで修復して再度flywayMigrateを実行すると解消します。

./gradlew flywayRepair
./gradlew flywayMigrate
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?