【问题标题】:Liquibase - Optional diff parameters not workingLiquibase - 可选的差异参数不起作用
【发布时间】:2018-09-25 13:52:48
【问题描述】:

平台:Windows,针对 DB2-for-i

liquibase updateliquibase statusliquibase rollback 都在工作。

当我尝试使用任何可选的差异参数(--schemas、--includeObjects 等)来限制 diff 命令(或 diffChangeLog 命令)时,我得到以下信息:

> liquibase.bat 
  --url=jdbc:as400://dbhost1/dbname 
  --username=user 
  --password=password 
  --changeLogFile=.\db2.changelog.xml 
  diffChangeLog 
  --schemas=MYSCHEMA 
  --referenceUrl=jdbc:as400://dbhost2/dbname 
  --referenceUsername=user 
  --referencePassword=password

Unexpected error running Liquibase: Unknown option: 'schemas'
liquibase.exception.CommandLineParsingException: Unknown option: 'schemas'
        at liquibase.integration.commandline.Main.parseOptionArgument(Main.java:818)
        at liquibase.integration.commandline.Main.parseOptions(Main.java:764)
        at liquibase.integration.commandline.Main.run(Main.java:177)
        at liquibase.integration.commandline.Main.main(Main.java:129)

【问题讨论】:

    标签: liquibase


    【解决方案1】:

    我没有尝试过,但我认为你只需要重新排序并将选项放在命令之前。

    liquibase.bat 
      --url=jdbc:as400://dbhost1/dbname 
      --username=user 
      --password=password 
      --changeLogFile=.\db2.changelog.xml 
      --schemas=MYSCHEMA 
      --referenceUrl=jdbc:as400://dbhost2/dbname 
      --referenceUsername=user 
      --referencePassword=password
      diffChangeLog 
    

    【讨论】:

    • --reference* 参数肯定必须遵循diffChangeLog(如果它们之前出现,我会收到错误消息。我在diffChangeLog 命令之前和之后都尝试过--schemas,但我得到了同样的错误信息。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-10-22
    • 2021-05-21
    • 1970-01-01
    • 2015-08-07
    • 2013-10-09
    相关资源
    最近更新 更多