public abstract class AbstractMigrationLoadingTask extends AbstractFlywayTask
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractMigrationLoadingTask.LocationElement
One <location> sub-element within the <locations> element.
|
static class |
AbstractMigrationLoadingTask.Locations
The nested <locations> element of the task.
|
static class |
AbstractMigrationLoadingTask.PlaceholderElement
Nested <placeholder> element inside the <placeholders> element of the migrate Ant task.
|
static class |
AbstractMigrationLoadingTask.PlaceholdersElement
Nested <placeholders> element of the migrate Ant task.
|
log| Constructor and Description |
|---|
AbstractMigrationLoadingTask() |
| Modifier and Type | Method and Description |
|---|---|
void |
addConfiguredLocations(AbstractMigrationLoadingTask.Locations locations)
Do not use.
|
void |
addConfiguredPlaceholder(AbstractMigrationLoadingTask.PlaceholderElement placeholder)
Deprecated.
Use the <placeholders> element instead of adding individual <placeholder> elements directly. Will be removed in Flyway 3.0.
|
void |
addConfiguredPlaceholders(AbstractMigrationLoadingTask.PlaceholdersElement placeholders)
Adds placeholders from a nested <placeholders> element.
|
protected void |
doExecute(Flyway flyway)
Executes this task.
|
protected abstract void |
doExecuteWithMigrationConfig(Flyway flyway)
Executes Flyway fully configured for loading migrations.
|
void |
setCleanOnValidationError(boolean cleanOnValidationError) |
void |
setEncoding(String encoding) |
void |
setOutOfOrder(boolean outOfOrder) |
void |
setPlaceholderPrefix(String placeholderPrefix) |
void |
setPlaceholderSuffix(String placeholderSuffix) |
void |
setSqlMigrationPrefix(String sqlMigrationPrefix) |
void |
setSqlMigrationSuffix(String sqlMigrationSuffix) |
void |
setTarget(String target) |
void |
setValidationErrorMode(String validationErrorMode)
Deprecated.
Use cleanOnValidationError instead. Will be removed in Flyway 3.0.
|
execute, setClasspath, setClasspathref, setDriver, setInitDescription, setInitialDescription, setInitialVersion, setInitVersion, setPassword, setSchemas, setTable, setUrl, setUser, useValueIfPropertyNotSet, useValueIfPropertyNotSetbindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskTypepublic void addConfiguredLocations(AbstractMigrationLoadingTask.Locations locations)
locations - The locations on the classpath.public void setEncoding(String encoding)
encoding - The encoding of Sql migrations. (default: UTF-8)public void setSqlMigrationPrefix(String sqlMigrationPrefix)
sqlMigrationPrefix - The file name prefix for Sql migrations (default: V)public void setSqlMigrationSuffix(String sqlMigrationSuffix)
sqlMigrationSuffix - The file name suffix for Sql migrations (default: .sql)public void setTarget(String target)
target - The target version up to which Flyway should run migrations. Migrations with a higher version number will not be
applied. (default: the latest version)@Deprecated public void setValidationErrorMode(String validationErrorMode)
validationErrorMode - The action to take when validation fails.public void setCleanOnValidationError(boolean cleanOnValidationError)
cleanOnValidationError - Whether to automatically call clean or not when a validation error occurs. (default: false)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 !
public void setOutOfOrder(boolean outOfOrder)
outOfOrder - Allows migrations to be run "out of order" (default: false).
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.
Also configurable with Ant Property: ${flyway.outOfOrder}public void setPlaceholderPrefix(String placeholderPrefix)
placeholderPrefix - The prefix of every placeholder. (default: ${ )public void setPlaceholderSuffix(String placeholderSuffix)
placeholderSuffix - The suffix of every placeholder. (default: } )@Deprecated public void addConfiguredPlaceholder(AbstractMigrationLoadingTask.PlaceholderElement placeholder)
placeholder - The fully configured placeholder element.public void addConfiguredPlaceholders(AbstractMigrationLoadingTask.PlaceholdersElement placeholders)
placeholders - The fully configured placeholders element.protected final void doExecute(Flyway flyway) throws Exception
AbstractFlywayTaskdoExecute in class AbstractFlywayTaskflyway - The flyway instance to operate on.Exception - any exceptionCopyright © 2013. All Rights Reserved.