Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does Flyway ignoreMissingMigrations is not taken into account?

Tags:

flyway

I have a setup in which migrations from previous scripts were removed. The flyway configuration specifies that ignoreMissingMigrations is true.

However, Flyway fails with the following error

Validate failed: Detected applied migration not resolved locally: version_x

where version_x is the first version that was removed after baseline.

Why do I get this error although ignoreMissingMigrations is true ?

Note: Flyway version: 4.2.0

like image 701
Jidehem Avatar asked Oct 27 '25 23:10

Jidehem


1 Answers

The problem comes from a special setup that Flyway is unable to handle correctly.

We have no newer applied migration, thus Flyway see this migration as a future migration instead of a missing migration. Thus the solution is to set ignoreFutureMigrations to true in addition to ignoreMissingMigrations.

like image 133
Jidehem Avatar answered Oct 31 '25 12:10

Jidehem



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!