java - 通过 Flyway 的 ODBC 连接

标签 java maven-plugin flyway

我正在尝试使用 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/

相关文章:

java - 将二叉树存储在数组中

java - 无法使用 wagon maven FTPS 传输中型大文件

java - 设置新基线后更改 flyway 迁移文件

java - 为什么我的 .jar 文件运行速度比 eclipse 中的程序慢?

java - 如何使用 GOLang 通过调用 REST API 在 BitBucket 中创建存储库

java - 需要帮助 apache poi 使​​用 XSSF 读取 xls

maven - JavaFX + Maven + javafx-maven-plugin : Entry[import from realm ClassRealm[maven. api, parent: null]]

java - Maven 3 : Failed to execute goal org. apache.maven.plugins :maven-archetype-plugin:2. 2:生成

java - Flyway 无法检测到新的迁移文件

java - MariaDB和flyway语法错误但在JAVA中没有