【发布时间】:2022-05-24 04:29:44
【问题描述】:
我正在使用 Flyway 3.2.1。当前属性设置为:
flyway.sqlMigrationPrefix=V
flyway.sqlMigrationSuffix=.sql
flyway.initVersion=0000
flyway.outOfOrder=false
根据documentation,版本可以是:
Dots or underscores separate the parts, you can use as many parts as you like
因此我想出了这个V_201509071234_Filename.sql,即使根据examples,我上面的名字应该是有效的。但是,在尝试执行时,它会抱怨:
Flyway 错误:org.flywaydb.core.api.FlywayException:版本无效 包含非数字字符。只有 0..9 和 .被允许。 无效版本:.201509071234
但是,如果我要在第一个下划线之前添加一个数字,例如 V2_201509071234_Filename.sql,它会起作用。
如何强制 Flyway 接受 V_201509071234_Filename.sql 作为有效名称?
【问题讨论】: