Package liquibase.diff.output.changelog
Class DiffToChangeLog
java.lang.Object
liquibase.diff.output.changelog.DiffToChangeLog
-
Field Summary
-
Constructor Summary
ConstructorDescriptionDiffToChangeLog
(DiffResult diffResult, DiffOutputControl diffOutputControl) DiffToChangeLog
(DiffResult diffResult, DiffOutputControl diffOutputControl, boolean skipObjectSorting) Creates a new DiffToChangeLog with the given DiffResult and default DiffOutputControlDiffToChangeLog
(DiffOutputControl diffOutputControl) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addDependencies
(DependencyUtil.DependencyGraph<String> graph, List<String> schemas, Database database) Adds dependencies to the graph as schema.object_name.protected String
generateId
(Change[] changes) protected String[]
protected String
protected String[]
protected List<Class<? extends DatabaseObject>>
getOrderedOutputTypes
(Class<? extends ChangeGenerator> generatorType) void
print
(PrintStream out) void
print
(PrintStream out, ChangeLogSerializer changeLogSerializer) Prints changeLog that would bring the target database to be the same as the reference databasevoid
void
void
print
(String changeLogFile, ChangeLogSerializer changeLogSerializer) void
print
(String changeLogFile, ChangeLogSerializer changeLogSerializer, Boolean overwriteOutputFile) void
printNew
(ChangeLogSerializer changeLogSerializer, Resource file) Prints changeLog that would bring the target database to be the same as the reference databasevoid
setChangeReplaceIfExistsTypes
(String[] replaceIfExistsTypes) void
setChangeSetAuthor
(String changeSetAuthor) void
setChangeSetContext
(String changeSetContext) void
setChangeSetLabels
(String changeSetLabels) void
setChangeSetPath
(String changeSetPath) void
setChangeSetRunOnChangeTypes
(String[] runOnChangeTypes) void
setDiffResult
(DiffResult diffResult) void
protected boolean
supportsSortingObjects
(Database database) Used bysortMissingObjects(Collection, Database)
to determine whether to go into the sorting logic.protected boolean
useSeparateChangeSets
(Change[] changes)
-
Field Details
-
ORDER_ATTRIBUTE
- See Also:
-
DATABASE_CHANGE_LOG_CLOSING_XML_TAG
- See Also:
-
EXTERNAL_FILE_DIR_SCOPE_KEY
- See Also:
-
DIFF_OUTPUT_CONTROL_SCOPE_KEY
- See Also:
-
DIFF_SNAPSHOT_DATABASE
- See Also:
-
-
Constructor Details
-
DiffToChangeLog
public DiffToChangeLog(DiffResult diffResult, DiffOutputControl diffOutputControl, boolean skipObjectSorting) Creates a new DiffToChangeLog with the given DiffResult and default DiffOutputControl- Parameters:
diffResult
- the DiffResult to convert to a ChangeLogdiffOutputControl
- the DiffOutputControl to use to control the outputskipObjectSorting
- if true, will skip dependency object sorting. This can be useful on databases that have a lot of packages/procedures that are linked to each other
-
DiffToChangeLog
-
DiffToChangeLog
-
-
Method Details
-
setDiffResult
-
setChangeSetContext
-
setChangeSetLabels
-
print
public void print(String changeLogFile) throws ParserConfigurationException, IOException, DatabaseException -
print
public void print(String changeLogFile, Boolean overwriteOutputFile) throws ParserConfigurationException, IOException, DatabaseException -
print
public void print(PrintStream out) throws ParserConfigurationException, IOException, DatabaseException -
print
public void print(String changeLogFile, ChangeLogSerializer changeLogSerializer) throws ParserConfigurationException, IOException, DatabaseException -
print
public void print(String changeLogFile, ChangeLogSerializer changeLogSerializer, Boolean overwriteOutputFile) throws ParserConfigurationException, IOException, DatabaseException -
printNew
public void printNew(ChangeLogSerializer changeLogSerializer, Resource file) throws ParserConfigurationException, IOException, DatabaseException Prints changeLog that would bring the target database to be the same as the reference database -
print
public void print(PrintStream out, ChangeLogSerializer changeLogSerializer) throws ParserConfigurationException, IOException, DatabaseException Prints changeLog that would bring the target database to be the same as the reference database -
generateChangeSets
-
supportsSortingObjects
Used bysortMissingObjects(Collection, Database)
to determine whether to go into the sorting logic. -
addDependencies
protected void addDependencies(DependencyUtil.DependencyGraph<String> graph, List<String> schemas, Database database) throws DatabaseException Adds dependencies to the graph as schema.object_name.- Throws:
DatabaseException
-
getOrderedOutputTypes
protected List<Class<? extends DatabaseObject>> getOrderedOutputTypes(Class<? extends ChangeGenerator> generatorType) -
useSeparateChangeSets
-
getChangeSetAuthor
-
setChangeSetAuthor
-
getChangeSetPath
-
setChangeSetPath
-
setChangeSetRunOnChangeTypes
-
getChangeSetRunOnChangeTypes
-
setChangeReplaceIfExistsTypes
-
getChangeReplaceIfExistsTypes
-
setIdRoot
-
generateId
-