Liquibase 和编程更改?

Liquibase and programmatic changes?

是否可以记录您以编程方式所做的更改? IE。假设您使用 JDBC 通过 Java 程序更新了 table。这些更改将如何最终出现在 Liquibase 更改日志(更改分类帐)中?

在 liquibase 之外进行更改时,将更改添加到更改日志的主要方法是使用 diffChangeLog 命令。这并不总是 100% 准确,在大多数情况下不应依赖。

该过程记录在 https://www.liquibase.org/documentation/diff.html and the reason why you should be cautious in its use is described at https://www.liquibase.org/quickstart.html

这是该页面的相关引用:

While Liquibase is capable of comparisons (or diffs), it is fundamentally a migration-based solution. The diff capability in Liquibase is only meant to assist with onboarding new projects and with sanity checking that database migrations have been properly applied.