One of the easiest way to generate the Liquibase Changeset is to keep the two sets of database instances and update one instance with the required changes and generate the changeset using the following command
Writing such a long command could be error prone and if you create a batch file(or shell script) that could be used only for diffChangeLog, if you want to see just the diff then you have to write one more batch file, in the same way for every liquibase command (parameterised batch also could not work well for all possible command options).
Alternatively you can just create liquibase.properties file in the liquibase root folder as in the below example
liqubase.bat --driver=oracle.jdbc.OracleDriver \
--url=jdbc:oracle:thin:@testdb:1521:test \
--username=bob \
--password=bob \
diffChangeLog \
--referenceUrl=jdbc:oracle:thin:@localhost/XE \
--referenceUsername=bob \
--referencePassword=bob
Writing such a long command could be error prone and if you create a batch file(or shell script) that could be used only for diffChangeLog, if you want to see just the diff then you have to write one more batch file, in the same way for every liquibase command (parameterised batch also could not work well for all possible command options).
Alternatively you can just create liquibase.properties file in the liquibase root folder as in the below example
changeLogFile = changeset.xmlurl = jdbc:postgresql://localhost:5432/instance1username = username1password = password1referenceUrl = jdbc:postgresql://localhost:5432/instance2referenceUsername = username2referencePassword = password2driver = org.postgresql.Driver
Once created this file, you can simply execute the commands like
liquibase diff
liquibase diffChangeLog
etc
with out passing any parameter. Liquibase will use the liquibase.properties file for the parameters.