How to run flyway:clean before migrations in a SpringBoot app?

前端 未结 2 823
一生所求
一生所求 2021-02-02 15:11

I am using Springboot and Flyway. The migrations work just fine but I wanted to be able perform a clean flyway command when the application context gets loaded with

2条回答
  •  無奈伤痛
    2021-02-02 15:42

    in more recent versions of spring boot (eg 2.0.2) you can use the property spring.flyway.clean-on-validation-error if you want to use clean because of a change in the sql files

提交回复
热议问题