@EachProperty(value="flyway.datasources")
public class FlywayConfigurationProperties
extends java.lang.Object
implements io.micronaut.core.util.Toggleable
FluentConfiguration| Modifier and Type | Field and Description |
|---|---|
static boolean |
DEFAULT_ASYNC |
static boolean |
DEFAULT_CLEAN_SCHEMA |
static boolean |
DEFAULT_ENABLED |
| Constructor and Description |
|---|
FlywayConfigurationProperties(javax.sql.DataSource dataSource,
java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
javax.sql.DataSource |
getDataSource() |
org.flywaydb.core.api.configuration.FluentConfiguration |
getFluentConfiguration() |
java.lang.String |
getNameQualifier() |
java.lang.String |
getPassword() |
java.lang.String |
getUrl() |
java.lang.String |
getUser() |
boolean |
hasAlternativeDatabaseConfiguration()
Whether there is an alternative database configuration for the migration.
|
boolean |
isAsync() |
boolean |
isCleanSchema()
Whether Flyway will clean the schema before running the migrations.
|
boolean |
isEnabled() |
void |
setAsync(boolean async)
Whether flyway migrations should run asynchronously.
|
void |
setCleanSchema(boolean cleanSchema)
Set whether Flyway will clean the schema before running the migrations.
|
void |
setEnabled(boolean enabled)
Set whether this flyway configuration is enabled.
|
void |
setPassword(java.lang.String password) |
void |
setUrl(java.lang.String url) |
void |
setUser(java.lang.String user) |
public static final boolean DEFAULT_ENABLED
public static final boolean DEFAULT_ASYNC
public static final boolean DEFAULT_CLEAN_SCHEMA
public FlywayConfigurationProperties(@Nullable @Parameter
javax.sql.DataSource dataSource,
@Parameter
java.lang.String name)
dataSource - DataSource with the same name qualifier.name - The name qualifier.public javax.sql.DataSource getDataSource()
DataSourcepublic java.lang.String getNameQualifier()
public boolean isEnabled()
isEnabled in interface io.micronaut.core.util.Toggleablepublic void setEnabled(boolean enabled)
enabled - true if it is enabledpublic boolean isAsync()
public void setAsync(boolean async)
async - true to run flyway migrations asynchronouslypublic boolean isCleanSchema()
public void setCleanSchema(boolean cleanSchema)
cleanSchema - true to clean the schema before running the migrations.public java.lang.String getUrl()
public void setUrl(java.lang.String url)
url - The JDBC url of the database to migratepublic java.lang.String getUser()
public void setUser(java.lang.String user)
user - The user of the database to migratepublic java.lang.String getPassword()
public void setPassword(java.lang.String password)
password - The password of the database to migratepublic boolean hasAlternativeDatabaseConfiguration()
DataSource defined for the application but if both url and user are defined, then those
will be use for Liquibase.public org.flywaydb.core.api.configuration.FluentConfiguration getFluentConfiguration()