Restart failed update of TermWeb 4 (flyway errors)
Problem
Latest update has failed on tomcat startup and contains errors about failed flyway migration.
Error creating bean with name 'flyway' defined in class path resource [com/termweb4/core/FlywayConfig.class]: Invocation of init method failed; nested exception is org.flywaydb.core.api.FlywayException: Schema `termweb4` contains a failed migration to version 4.0.38 !
Solution
First of all you need to fix source of error (termweb configuration, database corruption, etc), after that you’ll be able to restart failed migration with start of Tomcat.
Locate failed migration in table
schema_version
and delete it:DELETE FROM `schema_version` WHERE (`version` = '4.0.38');
Start a tomcat and monitor continuation of update, if everything is ok you must see message about successful tomcat startup.
In case when you fixed update problem manually you can change installation flag of failed migration:
UPDATE schema_version SET success = '1' WHERE (version = '4.0.38');