【发布时间】:2020-01-17 11:11:09
【问题描述】:
我有两个 sql 文件,一个用于 oracle,一个用于 mySql 数据库。路径如下
db/migration/mysql/V1_1_migration.sql
db/migration/oracle/V1_1_migration.sql
在运行测试时,我遇到了错误
Caused by: 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: Found more than one migration with version 1.1
Offenders:
-> C:\code\service\db-repository\target\classes\db\migration\oracle\V1_1__migration.sql (SQL)
-> C:\code\service\db-repository\target\classes\db\migration\mysql\V1_1__migration.sql (SQL)
解决此错误的任何指针。
【问题讨论】: