Information containing differences between two databases; specifically, the diffChangeLog command points out the differences in general and generates changes to resolve most of them.
A changelog file containing deployable changeSets.
The diffChangeLog command is typically used when you want to create a deployable changelog to synchronize multiple databases. The diffChangeLog command also provides more information about:
Missing objects in your database
Changes made to your database
Unexpected items in your database
Running the diffChangeLog Command
To create a diff changelog:
The first option is to run the diffChangeLog command and pass the parameters needed for your source database and target database.
As an example you can run the following:
Note: When running diffChangeLog against two different databases, the class path property should reference both .jar files. Use the path separator that is correct for your operating system (a semicolon on Windows, a colon on Mac or Linux). Example: classpath: ojdbc7.jar:postgresql-42.2.8.jar
Alternatively, configure the liquibase.properties file to include your driver class path, URL, and user authentication information for both databases. Run the following command:
Note: Replace file_name.xml, with your filename and extension format. If you specify a file name that already exists, Liquibase will append your changes to the existing file.
The diffChangeLog command produces a list of all Objects and creates a changelog with a list of changeSets.
Liquibase Community diffChangeLog categories:
Console Output Example
Additional Functionality with Liquibase Pro
While Liquibase Community stores all changeSets in a changelog, Liquibase Pro creates a directory called Objects and places the directory at the same level as your changelog. The Objects directory contains a subdirectory for each of the following stored logic types:
Note: that not all database platforms support all of these types.
Pro diffChangeLog sample file
Note: Liquibase does not currently check datatype length.