public interface FlywayConfiguration
| Modifier and Type | Method and Description |
|---|---|
String |
getBaselineDescription()
Retrieves the description to tag an existing schema with when executing baseline.
|
MigrationVersion |
getBaselineVersion()
Retrieves the version to tag an existing schema with when executing baseline.
|
FlywayCallback[] |
getCallbacks()
Gets the callbacks for lifecycle notifications.
|
ClassLoader |
getClassLoader()
Retrieves the ClassLoader to use for resolving migrations on the classpath.
|
DataSource |
getDataSource()
Retrieves the dataSource to use to access the database.
|
String |
getEncoding()
Retrieves the encoding of Sql migrations.
|
String |
getInstalledBy()
The username that will be recorded in the metadata table as having applied the migration.
|
String[] |
getLocations()
Retrieves the locations to scan recursively for migrations.
|
String |
getPlaceholderPrefix()
Retrieves the prefix of every placeholder.
|
Map<String,String> |
getPlaceholders()
Retrieves the map of <placeholder, replacementValue> to apply to sql migration scripts.
|
String |
getPlaceholderSuffix()
Retrieves the suffix of every placeholder.
|
String |
getRepeatableSqlMigrationPrefix()
Retrieves the file name prefix for repeatable sql migrations.
|
MigrationResolver[] |
getResolvers()
Retrieves the The custom MigrationResolvers to be used in addition to the built-in ones for resolving Migrations to apply.
|
String[] |
getSchemas()
Retrieves the schemas managed by Flyway.
|
String |
getSqlMigrationPrefix()
Retrieves the file name prefix for sql migrations.
|
String |
getSqlMigrationSeparator()
Retrieves the file name separator for sql migrations.
|
String |
getSqlMigrationSuffix()
Retrieves the file name suffix for sql migrations.
|
String |
getTable()
Retrieves the name of the schema metadata table that will be used by Flyway.
|
MigrationVersion |
getTarget()
Retrieves the target version up to which Flyway should consider migrations.
|
boolean |
isAllowMixedMigrations()
Deprecated.
Use
isMixed() instead. Will be removed in Flyway 5.0. |
boolean |
isBaselineOnMigrate()
Whether to automatically call baseline when migrate is executed against a non-empty schema with no metadata table.
|
boolean |
isCleanDisabled()
Whether to disable clean.
|
boolean |
isCleanOnValidationError()
Whether to automatically call clean or not when a validation error occurs.
|
boolean |
isGroup()
Whether to group all pending migrations together in the same transaction when applying them (only recommended for databases with support for DDL transactions).
|
boolean |
isIgnoreFutureMigrations()
Ignore future migrations when reading the metadata table.
|
boolean |
isIgnoreMissingMigrations()
Ignore missing migrations when reading the metadata table.
|
boolean |
isMixed()
Whether to allow mixing transactional and non-transactional statements within the same migration.
|
boolean |
isOutOfOrder()
Allows migrations to be run "out of order".
|
boolean |
isPlaceholderReplacement()
Checks whether placeholders should be replaced.
|
boolean |
isSkipDefaultCallbacks()
Whether Flyway should skip the default callbacks.
|
boolean |
isSkipDefaultResolvers()
Whether Flyway should skip the default resolvers.
|
boolean |
isValidateOnMigrate()
Whether to automatically call validate or not when running migrate.
|
ClassLoader getClassLoader()
DataSource getDataSource()
MigrationVersion getBaselineVersion()
String getBaselineDescription()
MigrationResolver[] getResolvers()
boolean isSkipDefaultResolvers()
FlywayCallback[] getCallbacks()
boolean isSkipDefaultCallbacks()
String getSqlMigrationSuffix()
Sql migrations have the following file name structure: prefixVERSIONseparatorDESCRIPTIONsuffix , which using the defaults translates to V1_1__My_description.sql
String getRepeatableSqlMigrationPrefix()
Repeatable sql migrations have the following file name structure: prefixSeparatorDESCRIPTIONsuffix , which using the defaults translates to R__My_description.sql
String getSqlMigrationSeparator()
Sql migrations have the following file name structure: prefixVERSIONseparatorDESCRIPTIONsuffix , which using the defaults translates to V1_1__My_description.sql
String getSqlMigrationPrefix()
Sql migrations have the following file name structure: prefixVERSIONseparatorDESCRIPTIONsuffix , which using the defaults translates to V1_1__My_description.sql
boolean isPlaceholderReplacement()
String getPlaceholderSuffix()
String getPlaceholderPrefix()
Map<String,String> getPlaceholders()
MigrationVersion getTarget()
current designates the current version of the schema.String getTable()
Retrieves the name of the schema metadata table that will be used by Flyway.
By default (single-schema mode) the metadata table is placed in the default schema for the connection provided by the datasource.
When the flyway.schemas property is set (multi-schema mode), the metadata table is placed in the first schema of the list.
String[] getSchemas()
Consequences:
String getEncoding()
String[] getLocations()
The location type is determined by its prefix.
Unprefixed locations or locations starting with classpath: point to a package on the classpath and may
contain both sql and java-based migrations.
Locations starting with filesystem: point to a directory on the filesystem and may only contain sql
migrations.
boolean isBaselineOnMigrate()
Whether to automatically call baseline when migrate is executed against a non-empty schema with no metadata table.
This schema will then be initialized with the baselineVersion before executing the migrations.
Only migrations above baselineVersion will then be applied.
This is useful for initial Flyway production deployments on projects with an existing DB.
Be careful when enabling this as it removes the safety net that ensures Flyway does not migrate the wrong database in case of a configuration mistake!
true if baseline should be called on migrate for non-empty schemas, false if not. (default: false)boolean isOutOfOrder()
If you already have versions 1 and 3 applied, and now a version 2 is found, it will be applied too instead of being ignored.
true if outOfOrder migrations should be applied, false if not. (default: false)boolean isIgnoreMissingMigrations()
true to continue normally and log a warning, false to fail fast with an exception.
(default: false)boolean isIgnoreFutureMigrations()
true to continue normally and log a warning, false to fail fast with an exception.
(default: true)boolean isValidateOnMigrate()
true if validate should be called. false if not. (default: true)boolean isCleanOnValidationError()
This is exclusively intended as a convenience for development. Even tough we strongly recommend not to change migration scripts once they have been checked into SCM and run, this provides a way of dealing with this case in a smooth manner. The database will be wiped clean automatically, ensuring that the next migration will bring you back to the state checked into SCM.
Warning ! Do not enable in production !
true if clean should be called. false if not. (default: false)boolean isCleanDisabled()
This is especially useful for production environments where running clean can be quite a career limiting move.
true to disabled clean. false to leave it enabled. (default: false)@Deprecated boolean isAllowMixedMigrations()
isMixed() instead. Will be removed in Flyway 5.0.true if mixed migrations should be allowed. false if an error should be thrown instead. (default: false)boolean isMixed()
true if mixed migrations should be allowed. false if an error should be thrown instead. (default: false)boolean isGroup()
true if migrations should be grouped. false if they should be applied individually instead. (default: false)String getInstalledBy()
null for the current database user of the connection. (default: null).Copyright © 2017. All rights reserved.