Flyway customizing 'version' in naming convention

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-08 03:25:45

问题


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

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?


回答1:


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



来源:https://stackoverflow.com/questions/32954572/flyway-customizing-version-in-naming-convention

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!