我正在尝试运行generateChangeLog以获取数据库架构的当前结构。但是,我看到liquibase总是返回空文件。
$ liquibase --logLevel=debug --driver=oracle.jdbc.OracleDriver --classpath="C:\temp\ojdbc8.jar" --changeLogFile="C:\db-changelog.xml" --url="jdbc:oracle:thin:@localhost:1521:xe" --username=system --password=oracle --defaultSchemaName=system generateChangeLog
Starting Liquibase at Tue, 23 Oct 2018 14:16:42 IST (version 3.6.2 built at 2018-07-03 11:28:09)
Liquibase command 'generateChangeLog' was executed successfully.
此外,尽管我已将日志级别指定为debug,但我看不到liquibase生成日志。
感谢您的帮助。
谢谢
答案 0 :(得分:0)
我遇到了同样的问题,当我在数据库URL中添加方案名称时,问题就解决了:
?currentSchema=core
命令示例:
$ liquibase --driver=org.postgresql.Driver \
--classpath=postgresql-42.2.5.jar \
--username=postgres \
--password=postgres \
--url="jdbc:postgresql://localhost:5432/data?currentSchema=core" \
--changeLogFile=changelog-output.xml \
generateChangeLog
Liquibase版本:3.7.0