首页 > 解决方案 > Liquibase - 更改日志和数据库之间的差异

问题描述

在我们对数据库实施/应用新更改之前,我们希望查看将应用的待处理更改列表。所以本质上它是最新的变更日志(尚未应用于数据库)和数据库之间的差异。我试着四处寻找让这个工作 - 但似乎 Liquibase 无法做到这一点。这有解决方法吗?

这主要是为了确定如果使用 liquibase 更新数据库,将在当前版本中应用哪些更改。我们使用的是 liquibase v3.8.9。

米顿

标签: liquibase

解决方案


If you are looking for a list of pending SQL to be applied to the target database, updateSQL is what you should look for: https://docs.liquibase.com/commands/community/updatesql.html

It does exactly this: "a diff between the latest changelog (yet to be applied to the DB) and the DB. "

The output (along with other debug info) will be the SQL Liquibase would run if you called just plain update


推荐阅读