有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java Liquibase从数据库更改中更新changelog XML文件

我决定在带有Postgresql的Java项目中使用liquibase,因此我使用generateChangeLogmaven目标创建了初始变更集。现在它工作起来没有任何问题

我要寻找的是,在我对数据库进行了更改(比如从RDBMS客户端)之后,是否有任何命令来分析变更日志和数据库状态,以便从我的更改生成变更集并将其附加到变更集xml文件


共 (1) 个答案

  1. # 1 楼答案

    您正在寻找diffChangelog命令:http://www.liquibase.org/documentation/diff.html

    In change log mode, an XML change log of what is necessary to upgrade the base database to the target database is sent to standard out. This change log can be included as is, or copied into an existing change log. If the diff command is passed an existing change log file, the new change sets will be appended to the end of the file.