Liquibase 假装文件夹中没有 liquibase.properties?



我以为liquibase正在我放在linux'/opt文件夹中的liquibases文件夹中查找该文件。

该文件夹(/opt/liquibase(已经在profile.d中,因此我可以在任何地方调用liquibase。

然而,当我键入"liquibase update"时,它会在终端上给出以下输出:

Starting Liquibase at Sun, 15 Sep 2019 23:00:43 CEST (version 3.8.0 built at 2019-08-15T20:38:06Z)
Liquibase Community 3.8.0 by Datical
Errors:
The option --url is required.
The option --changeLogFile is required.

这让我想知道为什么url和changeLogFile丢失了,因为在/opt/liquibase/liquibase.properties中,我得到了以下行:

driver: com.mysql.jdbc.Driver
url: jdbc:mysql://localhost:3306/luquibase?autoReconnect=true&useSSL=false
username: zend
password: zend
changeLogFile: ~/html/zend/sql/changelog.xml

我在这里做错了什么?

这是设计的行为。预计使用 liquibase 的人会在多个项目中使用它,因此它会在当前目录中查找liquibase.properties文件,该目录可能不是 liquibase shell 脚本所在的目录。

最新更新