Package org.flywaydb.test.annotation
Annotation Interface FlywayTest
Support for executing flyway commands during test without any special flyway command in test code.
The default behavior is to execute the flyway commands:
org.flywaydb.core.Flyway#clean()org.flywaydb.core.Flyway#baseline()org.flywaydb.core.Flyway#migrate()
org.flywaydb.test.junit.FlywayTestExecutionListener.- Version:
- 2011-12-10, 1.7
- Author:
- Florian
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionReference the flyway bean name.booleaninvoke flyway command baseline before a migrate callbooleaninvoke flyway command clean before a init/migrate call.booleaninvoke flyway command migrateString[]Support to add locations to the default location settings.booleanWith this attribute the handling of the locationsForMigrate can be changed.
-
Element Details
-
invokeCleanDB
boolean invokeCleanDBinvoke flyway command clean before a init/migrate call. If set to true it will invokeorg.flywaydb.core.Flyway#clean(). Default: true- Default:
- true
-
invokeBaselineDB
boolean invokeBaselineDBinvoke flyway command baseline before a migrate call Baseline will create the schema_version table with a initialization entry depending onorg.flywaydb.core.Flywayconfiguration propertyorg.flywaydb.core.Flyway#baselineVersion. It will invokeorg.flywaydb.core.Flyway#baseline(). Default: false- Default:
- false
-
invokeMigrateDB
boolean invokeMigrateDBinvoke flyway command migrate If set to true it will invokeorg.flywaydb.core.Flyway#migrate(). Default: true- Default:
- true
-
locationsForMigrate
String[] locationsForMigrateSupport to add locations to the default location settings. ifoverrideLocations()returns true the complete locations will be changed. Default: empty list- Default:
- {}
-
overrideLocations
boolean overrideLocationsWith this attribute the handling of the locationsForMigrate can be changed. Default: false- Default:
- false
-
flywayName
String flywayNameReference the flyway bean name. If no name are specified the first Flyway instanceorg.flywaydb.core.Flywayof the application context are used. If the name of theorg.flywaydb.core.Flywayinstance are not part of the application context, the test will fail withorg.springframework.beans.factory.NoSuchBeanDefinitionException. Default: empty string- Default:
- ""
-