我是Liquibase的新手,我了解到diff
和diffChangeLog
这两种模式在相反的方向上使用目标数据库和基准(参考)数据库。
Using "diff" will show the difference going from 'base (reference)' -> 'target' which makes sense.
While "diffChangeLog" outputs the difference going from 'target' to 'base (reference)'.
我执行了Maven目标liquibase:diffChangeLog
,但遇到以下错误
[ERROR] Could not find goal 'diffChangeLog' in plugin
org.liquibase:liquibase-maven-plugin:3.5.1 among available goals dropAll,
rollback, clearCheckSums, updateTestingRollback, changelogSync, updateSQL,
migrateSQL, generateChangeLog, dbDoc, status, listLocks, changelogSyncSQL,
releaseLocks, migrate, tag, diff, rollbackSQL, futureRollbackSQL, update,
help -> [Help 1]
我做错了什么?我该如何以liquibase:diffChangeLog
身份运行Maven?
答案 0 :(得分:0)
diff
(liquibase:diff
)是用于查找数据库状态之间差异的maven goal
。
diffChangeLog
是command line
的参数,用于使用Liquibase
进行command line tool
操作。没有称为liquibase:diffChangeLog
内部代码如下
if ("diff".equalsIgnoreCase(this.command)) {
CommandLineUtils.doDiff(createReferenceDatabaseFromCommandParams(this.commandParams, fileOpener), database, StringUtils.trimToNull(this.diffTypes), finalSchemaComparisons);
}
else if ("diffChangeLog".equalsIgnoreCase(this.command)) {
CommandLineUtils.doDiffToChangeLog(this.changeLogFile, createReferenceDatabaseFromCommandParams(this.commandParams, fileOpener), database, diffOutputControl, StringUtils.trimToNull(this.diffTypes), finalSchemaComparisons);
}