I have a Flyway SQL script called V3__test.sql and i have separated DDL and DML statements into two files called V3.1__test_create.sql and V3.1.1__test_insert.sql. Since Flyway schema history table has an entry of old file V3__test.sql. I am getting an exception org.flywaydb.core.api.FlywayException: Validate failed with an error Detected resolved migration not applied to database: 3.1
I have added config spring.flyway.ignore-missing-migrations: true into application.yml but doesnt seem working. Flyway version 6 and cant disable migration validation because of requirement.
Exception Stacktrace:
Cannot create inner bean '(inner bean)#5a021cb9' of type [org.springframework.orm.jpa.SharedEntityManagerCreator] while setting bean property 'entityManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#5a021cb9': Cannot resolve reference to bean 'entityManagerFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayInitializer' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Invocation of init method failed; nested exception is org.flywaydb.core.api.FlywayException: Validate failed:
Detected resolved migration not applied to database: 3.1