Home > front end >  I'm not able to disable the flyway in the application properties using the intellij
I'm not able to disable the flyway in the application properties using the intellij

Time:10-23

I'm using the spring boot to connect a postgreSQL database and when I run the application using Intellij it return me a error message Description:

Flyway failed to initialize: none of the following migration scripts locations could be found:

- classpath:db/migration/postgresql

The research done in stackoverflow suggested me to disable the flyway in the application properties like showed below.

###################################################################################
# DB Migration - automatically execute SQL scripts
###################################################################################
cn.app.datasource-populate.enabled=false
spring.flyway.enabled=false
spring.flyway.locations=classpath:db/migration/{vendor}
spring.flyway.table=${spring.application.name}_schema_version
spring.flyway.baseline-on-migrate=true
spring.flyway.baseline-version=0
spring.sql.init.mode=always
#spring.jpa.hibernate.ddl-auto=none

I have changed the line spring.flyway.enable from true to false but strangely when I run the application in intellij it automatically turn to true and do not fix the error. Does anyone know why it is happening?

CodePudding user response:

Can you try to remove your target folder(Also try invalidating the cache if this doesn't work) from the project and try rebuilding again? Sometimes Intellij doesn't pick the changes in application.properties.

  • Related