Flyway

Error running flyway check: No matching migrations found for version/description: 1

If you get the following error when running flyway check, it's because the baseline version captured in your flyway_schema_history table does not correspond exactly to a version number of your migration files on disk:

Error running flyway check: org.flywaydb.core.api.FlywayException: No matching migrations found for version/description: 1

If this corresponds to a baseline entry, you can provide a V or B script at this version to continue


To fix this, update the version number in your flyway_schema_history table to exactly match the entire version number on disk.  This includes everything after the B/V script to the double underscores, including the timestamp if you are using the default Flyway Desktop versioning.


This is necessary because the flyway check command wants to build a check database that matches the same version as the target to make an exact representation of it, so it's looking for the exact same corresponding version numbers on disk to apply to the check database.  


To prevent this issue, make sure you specify the entire version number in your -baselineVersion parameter when running flyway baseline or flyway migrate -baselineOnMigrate=true (e.g., flyway baseline -baselineVersion=001.20250223013454).  


Didn't find what you were looking for?