Spring Boot 使用 flyway10
flyway Mysql 依赖
xml
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-core</artifactId>
<version>10.15.0</version>
</dependency>
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-mysql</artifactId>
<version>10.15.0</version>
</dependency>
Spring Boot 使用配置
- 资源文件下创建 db/migration 目录存放flyway脚本
Spring Boot Flyway相关配置
-
关闭flyway服务
yamlspring: flyway: enabled: false
-
忽略已删除脚本
If you removed this migration intentionally, run repair to mark the migration as deleted.
添加配置
yamlspring: flyway: ignore-migration-patterns: - "*:missing" - "*:future"