Package io.micronaut.liquibase
Class LiquibaseConfigurationProperties
- java.lang.Object
-
- io.micronaut.liquibase.LiquibaseConfigurationProperties
-
- All Implemented Interfaces:
io.micronaut.core.util.Toggleable
@EachProperty("liquibase.datasources") public class LiquibaseConfigurationProperties extends java.lang.Object implements io.micronaut.core.util.ToggleableCreate a Liquibase Configuration for each sub-property of liquibase.datasources.*.- Since:
- 1.0.0
-
-
Field Summary
Fields Modifier and Type Field Description static booleanDEFAULT_ASYNCThe default async value.static booleanDEFAULT_DROPFIRSTThe default dropFirst value.static booleanDEFAULT_ENABLEDThe default enable value.static booleanDEFAULT_TESTROLLBACKONUPDATEThe default testRollbackOnUpdate value.
-
Constructor Summary
Constructors Constructor Description LiquibaseConfigurationProperties(java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.StringgetChangeLog()java.lang.StringgetContexts()Comma-separated list of runtime contexts to use.java.lang.StringgetDatabaseChangeLogLockTable()Name of table to use for tracking concurrent Liquibase usage.java.lang.StringgetDatabaseChangeLogTable()Name of table to use for tracking change history.java.lang.StringgetDefaultSchema()java.lang.StringgetLabels()Comma-separated list of runtime labels to use.java.lang.StringgetLiquibaseSchema()Schema to use for Liquibase objects.java.lang.StringgetLiquibaseTablespace()Tablespace to use for Liquibase objects.java.lang.StringgetNameQualifier()java.util.Map<java.lang.String,java.lang.String>getParameters()java.io.FilegetRollbackFile()java.lang.StringgetRollbackFilePath()java.lang.StringgetTag()booleanisAsync()booleanisDropFirst()booleanisEnabled()booleanisIgnoreClasspathPrefix()Deprecated.This configuration option is not available anymore in Liquibase Opensource editionbooleanisTestRollbackOnUpdate()Returns whether a rollback should be tested at update time or not.voidsetAsync(boolean async)Whether liquibase operations should be run asynchronously.voidsetChangeLog(java.lang.String changeLog)Change log configuration path.voidsetContexts(java.lang.String contexts)Comma-separated list of runtime contexts to use.voidsetDatabaseChangeLogLockTable(java.lang.String databaseChangeLogLockTable)Name of table to use for tracking concurrent Liquibase usage.voidsetDatabaseChangeLogTable(java.lang.String databaseChangeLogTable)Name of table to use for tracking change history.voidsetDefaultSchema(java.lang.String defaultSchema)Default database schema.voidsetDropFirst(boolean dropFirst)Whether to first drop the database schema.voidsetEnabled(boolean enabled)Sets whether this liquibase configuration is enabled.voidsetIgnoreClasspathPrefix(boolean ignoreClasspathPrefix)Deprecated.This configuration option is not available anymore in Liquibase Opensource editionvoidsetLabels(java.lang.String labels)Comma-separated list of runtime labels to use.voidsetLiquibaseSchema(java.lang.String liquibaseSchema)Schema to use for Liquibase objects.voidsetLiquibaseTablespace(java.lang.String liquibaseTablespace)Tablespace to use for Liquibase objects.voidsetParameters(java.util.Map<java.lang.String,java.lang.String> parameters)Change log parameters.voidsetRollbackFilePath(java.lang.String rollbackFilePath)Path to file to which rollback SQL is written when an update is performed.voidsetTag(java.lang.String tag)voidsetTestRollbackOnUpdate(boolean testRollbackOnUpdate)Whether rollback should be tested before update is performed.
-
-
-
Field Detail
-
DEFAULT_ENABLED
public static final boolean DEFAULT_ENABLED
The default enable value.- See Also:
- Constant Field Values
-
DEFAULT_DROPFIRST
public static final boolean DEFAULT_DROPFIRST
The default dropFirst value.- See Also:
- Constant Field Values
-
DEFAULT_TESTROLLBACKONUPDATE
public static final boolean DEFAULT_TESTROLLBACKONUPDATE
The default testRollbackOnUpdate value.- See Also:
- Constant Field Values
-
DEFAULT_ASYNC
public static final boolean DEFAULT_ASYNC
The default async value.- See Also:
- Constant Field Values
-
-
Method Detail
-
setTestRollbackOnUpdate
public void setTestRollbackOnUpdate(boolean testRollbackOnUpdate)
Whether rollback should be tested before update is performed. Default value (false).- Parameters:
testRollbackOnUpdate- Whether rollback should be tested before update is performed.
-
isTestRollbackOnUpdate
public boolean isTestRollbackOnUpdate()
Returns whether a rollback should be tested at update time or not.- Returns:
- Whether a rollback should be tested at update time or not.
-
isIgnoreClasspathPrefix
@Deprecated public boolean isIgnoreClasspathPrefix()
Deprecated.This configuration option is not available anymore in Liquibase Opensource edition- Returns:
- true if classpath prefix should be ignored during changeset comparison
-
setIgnoreClasspathPrefix
@Deprecated public void setIgnoreClasspathPrefix(boolean ignoreClasspathPrefix)
Deprecated.This configuration option is not available anymore in Liquibase Opensource editionIgnores classpath prefix during changeset comparison.- Parameters:
ignoreClasspathPrefix- Sets whether to ignore the classpath prefix during changeset comparison.
-
getDatabaseChangeLogLockTable
public java.lang.String getDatabaseChangeLogLockTable()
Name of table to use for tracking concurrent Liquibase usage.- Returns:
- the name of table to use for tracking concurrent Liquibase usage.
-
setDatabaseChangeLogLockTable
public void setDatabaseChangeLogLockTable(java.lang.String databaseChangeLogLockTable)
Name of table to use for tracking concurrent Liquibase usage.- Parameters:
databaseChangeLogLockTable- the name of table to use for tracking concurrent Liquibase usage.
-
getDatabaseChangeLogTable
public java.lang.String getDatabaseChangeLogTable()
Name of table to use for tracking change history.- Returns:
- the name of table to use for tracking change history.
-
setDatabaseChangeLogTable
public void setDatabaseChangeLogTable(java.lang.String databaseChangeLogTable)
Name of table to use for tracking change history.- Parameters:
databaseChangeLogTable- the name of table to use for tracking change history.
-
getLiquibaseTablespace
public java.lang.String getLiquibaseTablespace()
Tablespace to use for Liquibase objects.- Returns:
- the tablespace to use for Liquibase objects.
-
setLiquibaseTablespace
public void setLiquibaseTablespace(java.lang.String liquibaseTablespace)
Tablespace to use for Liquibase objects.- Parameters:
liquibaseTablespace- the tablespace to use for Liquibase objects.
-
getLiquibaseSchema
public java.lang.String getLiquibaseSchema()
Schema to use for Liquibase objects.- Returns:
- Schema to use for Liquibase objects.
-
setLiquibaseSchema
public void setLiquibaseSchema(java.lang.String liquibaseSchema)
Schema to use for Liquibase objects.- Parameters:
liquibaseSchema- Schema to use for Liquibase objects.
-
getChangeLog
public java.lang.String getChangeLog()
- Returns:
- the liquibase changelog
-
setChangeLog
public void setChangeLog(java.lang.String changeLog)
Change log configuration path.- Parameters:
changeLog- sets the change log configuration path.
-
setRollbackFilePath
public void setRollbackFilePath(java.lang.String rollbackFilePath)
Path to file to which rollback SQL is written when an update is performed.- Parameters:
rollbackFilePath- Path to file to which rollback SQL is written when an update is performed.
-
getRollbackFilePath
public java.lang.String getRollbackFilePath()
- Returns:
- the path to file to which rollback SQL is written when an update is performed.
-
getRollbackFile
public java.io.File getRollbackFile()
- Returns:
- the file to which rollback SQL is written when an update is performed.
-
isDropFirst
public boolean isDropFirst()
- Returns:
- true if database schema should be drop before running liquibase operations.
-
setDropFirst
public void setDropFirst(boolean dropFirst)
Whether to first drop the database schema. Default value (false).- Parameters:
dropFirst- True to drop the schema.
-
getDefaultSchema
public java.lang.String getDefaultSchema()
- Returns:
- the default database schema.
-
setDefaultSchema
public void setDefaultSchema(java.lang.String defaultSchema)
Default database schema.- Parameters:
defaultSchema- Sets the default database schema.
-
getParameters
public java.util.Map<java.lang.String,java.lang.String> getParameters()
- Returns:
- the change log parameters.
-
setParameters
public void setParameters(java.util.Map<java.lang.String,java.lang.String> parameters)
Change log parameters.- Parameters:
parameters- Change log parameters
-
getTag
public java.lang.String getTag()
- Returns:
- the liquibase tag.
-
setTag
public void setTag(java.lang.String tag)
- Parameters:
tag- a tag.
-
getContexts
public java.lang.String getContexts()
Comma-separated list of runtime contexts to use.- Returns:
- a comma-separated list of runtime contexts to use.
-
setContexts
public void setContexts(java.lang.String contexts)
Comma-separated list of runtime contexts to use.- Parameters:
contexts- a comma-separated list of runtime contexts to use.
-
getLabels
public java.lang.String getLabels()
Comma-separated list of runtime labels to use.- Returns:
- A Comma-separated list of runtime labels to use
-
setLabels
public void setLabels(java.lang.String labels)
Comma-separated list of runtime labels to use.- Parameters:
labels- A Comma-separated list of runtime labels to use
-
isEnabled
public boolean isEnabled()
- Specified by:
isEnabledin interfaceio.micronaut.core.util.Toggleable
-
setEnabled
public void setEnabled(boolean enabled)
Sets whether this liquibase configuration is enabled. Default value (true).- Parameters:
enabled- True if it is enabled
-
getNameQualifier
public java.lang.String getNameQualifier()
- Returns:
- name qualifier associated with this liquibase configuration.
-
setAsync
public void setAsync(boolean async)
Whether liquibase operations should be run asynchronously.- Parameters:
async- true to run liquibase operations asynchronously
-
isAsync
public boolean isAsync()
- Returns:
- true if liquibase operations should be run asynchronously.
-
-