Midhun Agnihotram
Midhun Agnihotram

Reputation: 195

Liquibase - Diff between changelog and database

Before we implement / apply new changes to the database, we would like to see the list of pending changes that will be applied. So essentially it is a diff between the latest changelog (yet to be applied to the DB) and the DB. I tried looking around for getting this working - but seems like Liquibase is unable to do this. Does this have a workaround?

This is mainly to be sure of what changes will get applied in the current release if update the DB using liquibase. We are using liquibase v3.8.9.

Midhun

Upvotes: 0

Views: 1349

Answers (1)

ronak
ronak

Reputation: 646

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

Upvotes: 1

Related Questions