use of liquibase.command.core.DiffToChangeLogCommand in project liquibase by liquibase.
the class CommandLineUtils method doDiffToChangeLog.
public static void doDiffToChangeLog(String changeLogFile, Database referenceDatabase, Database targetDatabase, DiffOutputControl diffOutputControl, String snapshotTypes, CompareControl.SchemaComparison[] schemaComparisons) throws LiquibaseException, IOException, ParserConfigurationException {
DiffToChangeLogCommand command = (DiffToChangeLogCommand) CommandFactory.getInstance().getCommand("diffChangeLog");
command.setReferenceDatabase(referenceDatabase).setTargetDatabase(targetDatabase).setSnapshotTypes(snapshotTypes).setCompareControl(new CompareControl(schemaComparisons, snapshotTypes)).setOutputStream(System.out);
command.setChangeLogFile(changeLogFile).setDiffOutputControl(diffOutputControl);
try {
command.execute();
} catch (CommandExecutionException e) {
throw new LiquibaseException(e);
}
}
Aggregations