Flyway customizing 'version' in naming con

2019-05-31 14:32发布

I'm using Flyway 3.2.1. Current properties are set to:

flyway.sqlMigrationPrefix=V
flyway.sqlMigrationSuffix=.sql
flyway.initVersion=0000
flyway.outOfOrder=false

According to the documentation, version can be:

Dots or underscores separate the parts, you can use as many parts as you like

enter image description here

Therefore I came up with this V_201509071234_Filename.sql, even according to examples, my name above should be valid. However when attempting to execute, it complains:

Flyway Error: org.flywaydb.core.api.FlywayException: Invalid version containing non-numeric characters. Only 0..9 and . are allowed. Invalid version: .201509071234

However, if I were to add a number before first underscore, like so, V2_201509071234_Filename.sql, it works.

How can I force Flyway to accept V_201509071234_Filename.sql as a valid name?

标签: sql flyway
1条回答
对你真心纯属浪费
2楼-- · 2019-05-31 14:54

Set the prefix the be V_ and the separator to be _ and it should be OK (I hope)

查看更多
登录 后发表回答