我正在尝试使用 maven/flyway 通过 ODBC 进行数据库版本控制。
我正在使用 sql server localdb 作为数据库。但是,当我在运行 mvn flyway:status:
时没有提供用户 ID/密码时,出现以下错误Flyway Error: com.googlecode.flyway.core.exception.FlywayException: Database username missing. It was not specified as a property and it was not defined in settings.xml for the server with the id 'flyway-db'
当我输入空的用户名/密码时,它显示:
Flyway Error: com.googlecode.flyway.core.exception.FlywayException: Database username missing. It was not specified as a property and it was not defined in settings.xml for the server with the id 'flyway-db' -> [Help 1]
我的数据库没有用户名/密码。以下是我正在使用的配置标签(在用户名/密码为空的情况下):
<configuration>
<driver>sun.jdbc.odbc.JdbcOdbcDriver</driver>
<url>jdbc:odbc:localdbtest</url>
<user></user>
<password></password>
</configuration>
我相信对于空的用户名/密码,还有其他事情需要做。 不确定。非常感谢帮助。
最佳答案
我相信你的情况类似于Issue 341 .我会在下一个版本中对此进行研究。
更新:这应该在 Flyway 2.0 中得到修复
关于java - 通过 Flyway 的 ODBC 连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12934967/