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 Object
implements io.micronaut.core.util.Toggleable
Create a Liquibase Configuration for each sub-property of liquibase.datasources.*.
- Since:
- 1.0.0
- Author:
- Sergio del Amo
-
Field Summary
Modifier and TypeFieldDescriptionstatic final boolean
The default async value.static final boolean
The default dropFirst value.static final boolean
The default enable value.static final boolean
The default testRollbackOnUpdate value. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionComma-separated list of runtime contexts to use.Name of table to use for tracking concurrent Liquibase usage.Name of table to use for tracking change history.Comma-separated list of runtime labels to use.Schema to use for Liquibase objects.Tablespace to use for Liquibase objects.getTag()
boolean
isAsync()
boolean
boolean
boolean
Returns whether a rollback should be tested at update time or not.void
setAsync
(boolean async) Whether liquibase operations should be run asynchronously.void
setChangeLog
(String changeLog) Change log configuration path.void
setContexts
(String contexts) Comma-separated list of runtime contexts to use.void
setDatabaseChangeLogLockTable
(String databaseChangeLogLockTable) Name of table to use for tracking concurrent Liquibase usage.void
setDatabaseChangeLogTable
(String databaseChangeLogTable) Name of table to use for tracking change history.void
setDefaultSchema
(String defaultSchema) Default database schema.void
setDropFirst
(boolean dropFirst) Whether to first drop the database schema.void
setEnabled
(boolean enabled) Sets whether this liquibase configuration is enabled.void
Comma-separated list of runtime labels to use.void
setLiquibaseSchema
(String liquibaseSchema) Schema to use for Liquibase objects.void
setLiquibaseTablespace
(String liquibaseTablespace) Tablespace to use for Liquibase objects.void
setParameters
(Map<String, String> parameters) Change log parameters.void
setRollbackFilePath
(String rollbackFilePath) Path to file to which rollback SQL is written when an update is performed.void
void
setTestRollbackOnUpdate
(boolean testRollbackOnUpdate) Whether rollback should be tested before update is performed.
-
Field Details
-
DEFAULT_ENABLED
public static final boolean DEFAULT_ENABLEDThe default enable value.- See Also:
-
DEFAULT_DROPFIRST
public static final boolean DEFAULT_DROPFIRSTThe default dropFirst value.- See Also:
-
DEFAULT_TESTROLLBACKONUPDATE
public static final boolean DEFAULT_TESTROLLBACKONUPDATEThe default testRollbackOnUpdate value.- See Also:
-
DEFAULT_ASYNC
public static final boolean DEFAULT_ASYNCThe default async value.- See Also:
-
-
Constructor Details
-
LiquibaseConfigurationProperties
- Parameters:
name
- name qualifier.
-
-
Method Details
-
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.
-
getDatabaseChangeLogLockTable
Name of table to use for tracking concurrent Liquibase usage.- Returns:
- the name of table to use for tracking concurrent Liquibase usage.
-
setDatabaseChangeLogLockTable
Name of table to use for tracking concurrent Liquibase usage.- Parameters:
databaseChangeLogLockTable
- the name of table to use for tracking concurrent Liquibase usage.
-
getDatabaseChangeLogTable
Name of table to use for tracking change history.- Returns:
- the name of table to use for tracking change history.
-
setDatabaseChangeLogTable
Name of table to use for tracking change history.- Parameters:
databaseChangeLogTable
- the name of table to use for tracking change history.
-
getLiquibaseTablespace
Tablespace to use for Liquibase objects.- Returns:
- the tablespace to use for Liquibase objects.
-
setLiquibaseTablespace
Tablespace to use for Liquibase objects.- Parameters:
liquibaseTablespace
- the tablespace to use for Liquibase objects.
-
getLiquibaseSchema
Schema to use for Liquibase objects.- Returns:
- Schema to use for Liquibase objects.
-
setLiquibaseSchema
Schema to use for Liquibase objects.- Parameters:
liquibaseSchema
- Schema to use for Liquibase objects.
-
getChangeLog
- Returns:
- the liquibase changelog
-
setChangeLog
Change log configuration path.- Parameters:
changeLog
- sets the change log configuration path.
-
setRollbackFilePath
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
- Returns:
- the path to file to which rollback SQL is written when an update is performed.
-
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
- Returns:
- the default database schema.
-
setDefaultSchema
Default database schema.- Parameters:
defaultSchema
- Sets the default database schema.
-
getParameters
- Returns:
- the change log parameters.
-
setParameters
Change log parameters.- Parameters:
parameters
- Change log parameters
-
getTag
- Returns:
- the liquibase tag.
-
setTag
- Parameters:
tag
- a tag.
-
getContexts
Comma-separated list of runtime contexts to use.- Returns:
- a comma-separated list of runtime contexts to use.
-
setContexts
Comma-separated list of runtime contexts to use.- Parameters:
contexts
- a comma-separated list of runtime contexts to use.
-
getLabels
Comma-separated list of runtime labels to use.- Returns:
- A Comma-separated list of runtime labels to use
-
setLabels
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:
isEnabled
in 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
- 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.
-