I'm new to flyway, and I'm receiving this warning, when calling flyway migrate
:
WARNING: Schema 'schema' has a version (34) that is newer than the latest available migration (0) !
In a directory with migrations, I have migrations till 36, but none of this next migrations are applied to database. When I call flyway migrate
all of migration's state till 34,are set to FUTURE. Only missing one is 29. What can be the reason and solution (except clearing database) ?
I think that has happened because I was fixing 29 and I deleted this migration from flyway database table and revert also it effect on db. Is it possible to fix this, and what does it mean ?
Disclaimer:
This is dangerous, but an option.
Perform the following steps.
schema_version
tableschema_version
where the version is higher than 29 (or recent migrations compared to version 29). Refer to your migration folder. flyway migrate
, this will try and recreate the migration version 29, but it may fail since the content of the 29 version was already applied to the database. If it fails, update this migration record to set the column success=1. schema_version
to insert all records of migrations above version 29. hope this helps.