public static void doDiff(Database referenceDatabase, Database targetDatabase, String snapshotTypes) throws LiquibaseException {
doDiff(referenceDatabase, targetDatabase, snapshotTypes, null);
}
public static void doDiff(Database referenceDatabase, Database targetDatabase, String snapshotTypes, CompareControl.SchemaComparison[] schemaComparisons) throws LiquibaseException {
DiffCommand diffCommand = new DiffCommand()
.setReferenceDatabase(referenceDatabase)
.setTargetDatabase(targetDatabase)
.setCompareControl(new CompareControl(schemaComparisons, snapshotTypes))
.setSnapshotTypes(snapshotTypes)
.setOutputStream(System.out);
System.out.println("");
System.out.println("Diff Results:");
try {
diffCommand.execute();
} catch (CommandExecutionException e) {
throw new LiquibaseException(e);
}
}