简体   繁体   English

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

[英]Liquibase - Update changelog XML file from database changes

I decided to use liquibase on my Java project with Postgresql, so I created initial changeset using generateChangeLog maven goal. 我决定在Postgresql的Java项目中使用liquibase,所以我使用generateChangeLog maven目标创建了初始变更集。 Now it is working without any problems. 现在它没有任何问题。

What I am looking for is after I made a change on the database (let's say from a RDBMS client), is there any command to analyze the changelog and the database status to generate changeset from my changes and append it to the changeset xml file? 我正在寻找的是在我对数据库进行更改之后(比如说来自RDBMS客​​户端),是否有任何命令来分析更改日志和数据库状态以从我的更改生成更改集并将其附加到changeset xml文件?

You are looking for the diffChangelog command: http://www.liquibase.org/documentation/diff.html 您正在寻找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. 在更改日志模式下,将基础数据库升级到目标数据库所需的XML更改日志将发送到标准输出。 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. 如果diff命令传递给现有的更改日志文件,则新的更改集将附加到文件的末尾。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM