public class LiquibaseDatabaseDiff extends AbstractLiquibaseChangeLogMojo
Generates a diff between the specified database and the reference database. The output is either a report or a changelog depending on the value of the diffChangeLogFile parameter.
Modifier and Type | Field and Description |
---|---|
protected String |
diffChangeLogFile
If this parameter is set, the changelog needed to "fix" differences between the two databases is output.
|
protected String |
diffExcludeObjects
Objects to be excluded from the changelog.
|
protected boolean |
diffIncludeCatalog
Include the catalog in the diff output? If this is null then the catalog will not be included
|
protected String |
diffIncludeObjects
Objects to be included in the changelog.
|
protected boolean |
diffIncludeSchema
Include the schema in the diff output? If this is null then the schema will not be included
|
protected boolean |
diffIncludeTablespace
Include the tablespace in the diff output? If this is null then the tablespace will not be included
|
protected String |
diffTypes
List of diff types to include in Change Log expressed as a comma separated list from: tables, views, columns, indexes, foreignkeys, primarykeys, uniqueconstraints, data.
|
protected String |
format
The format in which to display the diff output
TXT or JSON
|
protected String |
outputFile
Write the output of the diff to a file
|
protected String |
outputSchemas
Output schemas names.
|
protected String |
referenceDefaultCatalogName
The reference database catalog.
|
protected String |
referenceDefaultSchemaName
The reference database schema.
|
protected String |
referenceDriver
The fully qualified name of the driver class to use to connect to the reference database.
|
protected String |
referencePassword
The reference database password to use to connect to the specified database.
|
protected String |
referenceSchemas
Schemas names on reference database to use in diff.
|
protected String |
referenceServer
The server id in settings.xml to use when authenticating with.
|
protected String |
referenceUrl
The reference database URL to connect to for executing Liquibase.
|
protected String |
referenceUsername
The reference database username to use to connect to the specified database.
|
protected String |
schemas
Schemas on target database to use in diff.
|
changeLogDirectory, changeLogFile, contexts, duplicateFileMode, hubApiKey, hubMode, hubUrl, labelFilter, labels
changeExecListenerClass, changeExecListenerPropertiesFile, changelogCatalogName, changelogSchemaName, clearCheckSums, commandName, databaseChangeLogLockTableName, databaseChangeLogTableName, databaseClass, defaultCatalogName, defaultChangeExecListener, defaultSchemaName, driver, emptyPassword, includeArtifact, includeTestOutputDirectory, logging, outputDefaultCatalog, outputDefaultSchema, outputFileEncoding, password, preserveSchemaCase, project, promptOnNonLocalDatabase, propertyFile, propertyFileWillOverride, propertyProviderClass, psqlArgs, psqlExecutorName, psqlKeepTemp, psqlKeepTempName, psqlKeepTempPath, psqlLogFile, psqlPath, psqlTimeout, searchPath, showBanner, skip, sqlcmdArgs, sqlcmdCatalogName, sqlcmdExecutorName, sqlcmdKeepTemp, sqlcmdKeepTempName, sqlcmdKeepTempOverwrite, sqlcmdKeepTempPath, sqlcmdLogFile, sqlcmdPath, sqlcmdTimeout, sqlPlusArgs, sqlPlusExecutorName, sqlPlusKeepTemp, sqlPlusKeepTempName, sqlPlusKeepTempOverwrite, sqlPlusKeepTempPath, sqlPlusLogFile, sqlPlusPath, sqlPlusTimeout, systemProperties, url, username, verbose, wagonManager
Constructor and Description |
---|
LiquibaseDatabaseDiff() |
Modifier and Type | Method and Description |
---|---|
protected void |
checkRequiredParametersAreSpecified()
Performs some validation after the properties file has been loaded checking that all
properties required have been specified.
|
void |
execute() |
protected void |
performLiquibaseTask(Liquibase liquibase)
Performs the actual Liquibase task on the database using the fully configured
Liquibase . |
protected void |
printSettings(String indent)
Prints the settings that have been set of defaulted for the plugin.
|
createLiquibase, getLabelFilter, getResourceAccessor
cleanup, configureChangeLogProperties, configureFieldsAndValues, databaseConnectionRequired, getClassLoaderIncludingProjectClasspath, getField, getLicenseKey, getLiquibase, getMavenArtifactClassLoader, getOutputWriter, isPromptOnNonLocalDatabase, parsePropertiesFile, setupBindInfoPackage
@PropertyElement protected String referenceDriver
AbstractLiquibaseMojo.driver
will be used instead.@PropertyElement protected String referenceUrl
@PropertyElement protected String referenceUsername
@PropertyElement protected String referencePassword
@PropertyElement protected String referenceDefaultCatalogName
@PropertyElement protected String referenceDefaultSchemaName
@PropertyElement protected String diffChangeLogFile
@PropertyElement protected boolean diffIncludeCatalog
@PropertyElement protected boolean diffIncludeSchema
@PropertyElement protected boolean diffIncludeTablespace
@PropertyElement protected String diffTypes
@PropertyElement protected String diffExcludeObjects
@PropertyElement protected String diffIncludeObjects
@PropertyElement protected String referenceServer
@PropertyElement protected String schemas
@PropertyElement protected String referenceSchemas
@PropertyElement protected String outputSchemas
@PropertyElement protected String outputFile
@PropertyElement protected String format
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
execute
in interface org.apache.maven.plugin.Mojo
execute
in class AbstractLiquibaseMojo
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
protected void performLiquibaseTask(Liquibase liquibase) throws LiquibaseException
AbstractLiquibaseChangeLogMojo
Liquibase
.performLiquibaseTask
in class AbstractLiquibaseChangeLogMojo
liquibase
- The Liquibase
that has been fully
configured to run the desired database task.LiquibaseException
protected void printSettings(String indent)
AbstractLiquibaseMojo
printSettings
in class AbstractLiquibaseChangeLogMojo
indent
- The indent string to use when printing the settings.protected void checkRequiredParametersAreSpecified() throws org.apache.maven.plugin.MojoFailureException
AbstractLiquibaseMojo
checkRequiredParametersAreSpecified
in class AbstractLiquibaseChangeLogMojo
org.apache.maven.plugin.MojoFailureException
- If any property that is required has not been
specified.Copyright © 2023 Liquibase.org. All rights reserved.