|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
com.googlecode.flyway.ant.AbstractFlywayTask
com.googlecode.flyway.ant.AbstractMigrationLoadingTask
com.googlecode.flyway.ant.MigrateTask
public class MigrateTask
Ant task that triggers the migration of the configured database to the latest version.
| Nested Class Summary | |
|---|---|
static class |
MigrateTask.PlaceholderElement
Nested <placeholder> element inside the <placeholders> element of the migrate Ant task. |
static class |
MigrateTask.PlaceholdersElement
Nested <placeholders> element of the migrate Ant task. |
| Nested classes/interfaces inherited from class com.googlecode.flyway.ant.AbstractMigrationLoadingTask |
|---|
AbstractMigrationLoadingTask.LocationElement, AbstractMigrationLoadingTask.Locations |
| Field Summary |
|---|
| Fields inherited from class org.apache.tools.ant.Task |
|---|
taskName, taskType, wrapper |
| Fields inherited from class org.apache.tools.ant.ProjectComponent |
|---|
description, location, project |
| Constructor Summary | |
|---|---|
MigrateTask()
|
|
| Method Summary | |
|---|---|
void |
addConfiguredPlaceholder(MigrateTask.PlaceholderElement placeholder)
Deprecated. Use the <placeholders> element instead of adding individual <placeholder> elements directly. Will be removed in Flyway 2.0. |
void |
addConfiguredPlaceholders(MigrateTask.PlaceholdersElement placeholders)
Adds placeholders from a nested <placeholders> element. |
protected void |
doExecute(Flyway flyway)
Executes this task. |
void |
setDisableInitCheck(boolean disableInitCheck)
|
void |
setIgnoreFailedFutureMigration(boolean ignoreFailedFutureMigration)
|
void |
setPlaceholderPrefix(java.lang.String placeholderPrefix)
|
void |
setPlaceholderSuffix(java.lang.String placeholderSuffix)
|
void |
setTarget(java.lang.String target)
|
void |
setValidationMode(java.lang.String validationMode)
|
| Methods inherited from class com.googlecode.flyway.ant.AbstractMigrationLoadingTask |
|---|
addConfiguredLocations, setBaseDir, setBasePackage, setEncoding, setSqlMigrationPrefix, setSqlMigrationSuffix, setValidationErrorMode |
| Methods inherited from class com.googlecode.flyway.ant.AbstractFlywayTask |
|---|
execute, setClasspath, setClasspathref, setDriver, setPassword, setSchemas, setTable, setUrl, setUser, useValueIfPropertyNotSet |
| Methods inherited from class org.apache.tools.ant.Task |
|---|
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType |
| Methods inherited from class org.apache.tools.ant.ProjectComponent |
|---|
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MigrateTask()
| Method Detail |
|---|
public void setTarget(java.lang.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)public void setIgnoreFailedFutureMigration(boolean ignoreFailedFutureMigration)
ignoreFailedFutureMigration - Ignores failed future migrations when reading the metadata table. These are migrations that we performed by a
newer deployment of the application that are not yet available in this version. For example: we have migrations
available on the classpath up to version 3.0. The metadata table indicates that a migration to version 4.0
(unknown to us) has already been attempted and failed. Instead of bombing out (fail fast) with an exception, a
warning is logged and Flyway terminates normally. This is useful for situations where a database rollback is not
an option. An older version of the application can then be redeployed, even though a newer one failed due to a
bad migration. (default: false)public void setPlaceholderPrefix(java.lang.String placeholderPrefix)
placeholderPrefix - The prefix of every placeholder. (default: ${ )public void setPlaceholderSuffix(java.lang.String placeholderSuffix)
placeholderSuffix - The suffix of every placeholder. (default: } )public void setValidationMode(java.lang.String validationMode)
validationMode - The type of validation to be performed before migrating.public void setDisableInitCheck(boolean disableInitCheck)
disableInitCheck - Flag to disable the check that a non-empty schema has been properly initialized with init. This check ensures
Flyway does not migrate or clean the wrong database in case of a configuration mistake. Be careful when disabling
this! (default: false)@Deprecated public void addConfiguredPlaceholder(MigrateTask.PlaceholderElement placeholder)
placeholder - The fully configured placeholder element.public void addConfiguredPlaceholders(MigrateTask.PlaceholdersElement placeholders)
placeholders - The fully configured placeholders element.
protected void doExecute(Flyway flyway)
throws java.lang.Exception
AbstractFlywayTask
doExecute in class AbstractMigrationLoadingTaskflyway - The flyway instance to operate on.
java.lang.Exception - any exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||