Liquibase Database inspection Commands

Liquibase Database inspection commands let us inspect the database. it does not make any changes to the database, but let the DBA inspect the changes and difference in the source and target database. A few of the Liquibase Inspections Commands are as below

Command Description

Liquibase diff

diff command to actually detect the difference between two databases of the same type or different types.

Liquibase diffChangeLog

diffChangeLog command, which along with listing down the differences between the two databases, creates a ChangeLog file as well with all ChangeSets required to resolve those changes and keep both databases synced.

Liquibase generateChangeLog

The generateChangeLog command captures the current state of an existing Database. it generates a ChangeLog file that contains all the ChangeSets required to recreate the current state of the database

Liquibase snapshot

The snapshot command provided by Liquibase captures the current state of the database, it can also save the current state into the format provided in snapshotFormat attribute in the file name provided in outputFile attributes.

Liquibase snapshot with diff and diffChangelog commands

Snapshot command generates the state of the current database in the file, this file can also be used with diff and diffChangelog instead of the actual target database.
Liquibase snapshotReference snapshotReference command, which helps capture the source database's current state. and just like the snapshot command, if required it can also save the current state into the format provided in snapshotFormat attribute in the file name provided in outputFile attributes.

Liquibase snapshotReference with diff and diffChangelog commands

snapshotReference command generates the state of the source database in a file format, this file can also be used with diff and diffChangelog instead of the actual target database.

 

follow us on