@Context
@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(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
org.flywaydb.core.api.configuration.FluentConfiguration |
getFluentConfiguration() |
org.flywaydb.core.api.Location[] |
getLocations() |
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 |
setLocations(java.lang.String... locations) |
void |
setPassword(java.lang.String password) |
void |
setUrl(java.lang.String url) |
void |
setUser(java.lang.String user) |
void |
setUsername(java.lang.String username) |
public static final boolean DEFAULT_ENABLED
public static final boolean DEFAULT_ASYNC
public static final boolean DEFAULT_CLEAN_SCHEMA
public FlywayConfigurationProperties(@Parameter java.lang.String name)
name
- The name qualifier.public java.lang.String getNameQualifier()
public boolean isEnabled()
isEnabled
in interface io.micronaut.core.util.Toggleable
public 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 void setUsername(java.lang.String username)
username
- The username of the database to migratepublic java.lang.String getPassword()
public void setPassword(java.lang.String password)
password
- The password of the database to migratepublic org.flywaydb.core.api.Location[] getLocations()
public void setLocations(java.lang.String... locations)
locations
- The locations for the migrationspublic boolean hasAlternativeDatabaseConfiguration()
DataSource
defined for the application but if both url
and user
are defined,
then those will be use for Flyway.public org.flywaydb.core.api.configuration.FluentConfiguration getFluentConfiguration()