public class FlywayMigrator extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Boolean |
applyDemo |
protected Boolean |
applyStaging |
protected Boolean |
applyTesting |
protected String |
bootstrapPath |
protected String |
checksumUpdatesFilename |
protected CoeusMigrationResolver |
coeusMigrationResolver |
protected DataSource |
dataSource |
protected String |
demoDataPath |
protected String |
embeddedClientScripts |
protected Boolean |
embeddedMode |
protected Boolean |
enabled |
protected List<String> |
extraMigrationPaths |
protected Boolean |
grm |
protected String |
grmDataPath |
protected String |
initVersion |
protected String |
javaMigrationPath |
protected String |
kcPath |
protected Boolean |
manageRice |
protected Boolean |
outOfOrder |
protected String |
riceDataOnly |
protected DataSource |
riceDataSource |
protected String |
ricePath |
protected String |
riceServer |
protected String |
sqlMigrationPath |
protected String |
stagingDataPath |
protected String |
targetVersion |
protected String |
testingPath |
| Constructor and Description |
|---|
FlywayMigrator() |
| Modifier and Type | Method and Description |
|---|---|
protected List<String> |
buildLocations(String rootPath) |
protected String[] |
filterForExistence(List<String> locations) |
Boolean |
getApplyDemo() |
Boolean |
getApplyStaging() |
Boolean |
getApplyTesting() |
String |
getBootstrapPath() |
CoeusMigrationResolver |
getCoeusMigrationResolver() |
DataSource |
getDataSource() |
protected Boolean |
getDefinedOption(String option,
Boolean defaultValue) |
protected String |
getDefinedOption(String option,
String defaultValue) |
String |
getDemoDataPath() |
Boolean |
getEmbeddedMode() |
Boolean |
getEnabled() |
List<String> |
getExtraMigrationPaths() |
Boolean |
getGrm() |
String |
getGrmDataPath() |
String |
getInitVersion() |
String |
getJavaMigrationPath() |
Boolean |
getManageRice() |
Boolean |
getOutOfOrder() |
DataSource |
getRiceDataSource() |
String |
getSqlMigrationPath() |
String |
getStagingDataPath() |
String |
getTargetVersion() |
String |
getTestingPath() |
void |
migrate() |
protected void |
performMigration(DataSource dataSource,
List<String> locations,
org.flywaydb.core.api.resolver.MigrationResolver... migrationResolvers) |
protected List<String> |
prefixLocationsWithDb(String dbPath,
List<String> locations) |
protected void |
runChecksumPreMigrationFromLocation(String checksumUpdateStatement,
String location,
Connection conn) |
protected void |
runPreMigrationSql(DataSource dataSource) |
void |
setApplyDemo(boolean applyDemo)
Sets whether to apply demo data scripts or not
|
void |
setApplyStaging(boolean applyStaging)
Sets whether to apply staging data scripts or not
|
void |
setApplyTesting(boolean applyTesting)
Sets whether to apply testing data scripts or not
|
void |
setBootstrapPath(String bootstrapPath)
Sets the path for the bootstrap data scripts
|
void |
setCoeusMigrationResolver(CoeusMigrationResolver coeusMigrationResolver) |
void |
setDataSource(DataSource dataSource)
Sets the KC datasource
|
void |
setDemoDataPath(String demoDataPath)
Sets the path for the demo data scripts
|
void |
setEmbeddedMode(Boolean embeddedMode) |
void |
setEnabled(Boolean enabled) |
void |
setExtraMigrationPaths(List<String> extraMigrationPaths) |
void |
setGrm(Boolean grm) |
void |
setGrmDataPath(String grmDataPath)
Sets the path for the grm data scripts
|
void |
setInitVersion(String initVersion) |
void |
setJavaMigrationPath(String javaMigrationPath) |
void |
setManageRice(Boolean manageRice) |
void |
setOutOfOrder(Boolean outOfOrder) |
void |
setRiceDataSource(DataSource riceDataSource)
Sets the Rice server datasource
|
void |
setSqlMigrationPath(String migrationPath) |
void |
setStagingDataPath(String stagingDataPath)
Sets the path for staging data scripts
|
void |
setTargetVersion(String targetVersion) |
void |
setTestingPath(String testingPath)
Sets the path for the testing data scripts
|
protected String initVersion
protected String targetVersion
protected DataSource dataSource
protected DataSource riceDataSource
protected CoeusMigrationResolver coeusMigrationResolver
protected String sqlMigrationPath
protected String javaMigrationPath
protected String kcPath
protected String ricePath
protected String riceServer
protected String riceDataOnly
protected String embeddedClientScripts
protected String bootstrapPath
protected String testingPath
protected String stagingDataPath
protected String demoDataPath
protected String grmDataPath
protected String checksumUpdatesFilename
protected Boolean enabled
protected Boolean applyTesting
protected Boolean applyStaging
protected Boolean applyDemo
protected Boolean outOfOrder
protected Boolean grm
protected Boolean manageRice
protected Boolean embeddedMode
public void migrate()
throws SQLException
SQLExceptionprotected void performMigration(DataSource dataSource, List<String> locations, org.flywaydb.core.api.resolver.MigrationResolver... migrationResolvers)
protected List<String> prefixLocationsWithDb(String dbPath, List<String> locations)
protected void runPreMigrationSql(DataSource dataSource)
protected void runChecksumPreMigrationFromLocation(String checksumUpdateStatement, String location, Connection conn)
public void setInitVersion(String initVersion)
public void setTargetVersion(String targetVersion)
public void setDataSource(DataSource dataSource)
dataSource - public DataSource getRiceDataSource()
public void setRiceDataSource(DataSource riceDataSource)
riceDataSource - public String getBootstrapPath()
public void setBootstrapPath(String bootstrapPath)
bootstrapPath - (default : bootstrap)public String getTestingPath()
public void setTestingPath(String testingPath)
testingPath - (default : testing)public String getStagingDataPath()
public void setStagingDataPath(String stagingDataPath)
stagingDataPath - (default : staging)public String getDemoDataPath()
public void setDemoDataPath(String demoDataPath)
demoDataPath - (default : demo)public String getGrmDataPath()
public void setGrmDataPath(String grmDataPath)
grmDataPath - (default : grm)public Boolean getApplyTesting()
public void setApplyTesting(boolean applyTesting)
applyTesting - (default : Configuration parameter flyway.migrations.apply_testing or false if not set)public Boolean getApplyStaging()
public void setApplyStaging(boolean applyStaging)
applyStaging - (default : Configuration parameter flyway.migrations.apply_staging or false if not set)public Boolean getApplyDemo()
public void setApplyDemo(boolean applyDemo)
applyDemo - (default : Configuration parameter flyway.migrations.apply_demo or false if not set)public String getInitVersion()
public String getTargetVersion()
public DataSource getDataSource()
public Boolean getManageRice()
public void setManageRice(Boolean manageRice)
public Boolean getEmbeddedMode()
public void setEmbeddedMode(Boolean embeddedMode)
public Boolean getGrm()
public void setGrm(Boolean grm)
public CoeusMigrationResolver getCoeusMigrationResolver()
public void setCoeusMigrationResolver(CoeusMigrationResolver coeusMigrationResolver)
public Boolean getEnabled()
public void setEnabled(Boolean enabled)
public String getSqlMigrationPath()
public void setSqlMigrationPath(String migrationPath)
public String getJavaMigrationPath()
public void setJavaMigrationPath(String javaMigrationPath)
public Boolean getOutOfOrder()
public void setOutOfOrder(Boolean outOfOrder)
Copyright © 2018 KualiCo. All rights reserved.