public class TopiaFlywayServiceImpl extends Object implements TopiaFlywayService
TopiaFlywayService.| Modifier and Type | Field and Description |
|---|---|
protected org.flywaydb.core.Flyway |
flyway |
protected String |
flywayBaselineVersion
Value for
TopiaFlywayService.FLYWAY_BASELINE_VERSION configuration parameter. |
protected String |
modelVersion |
protected boolean |
useModelVersion
Value for
TopiaFlywayService.USE_MODEL_VERSION configuration parameter. |
FLYWAY_BASELINE_VERSION, FLYWAY_INIT_VERSION, USE_MODEL_VERSION| Constructor and Description |
|---|
TopiaFlywayServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected void |
doExtraConfiguration(org.flywaydb.core.Flyway flyway,
TopiaApplicationContext topiaApplicationContext)
Opened hook to override in a sub-class.
|
String |
getSchemaVersion() |
void |
initOnCreateSchema() |
void |
initTopiaService(TopiaApplicationContext topiaApplicationContext,
Map<String,String> serviceConfiguration) |
void |
runSchemaMigration() |
protected void |
setDataSource(org.flywaydb.core.Flyway flyway,
TopiaApplicationContext topiaApplicationContext)
Define flyway database credentials.
|
protected void |
setLocations(org.flywaydb.core.Flyway flyway,
TopiaApplicationContext topiaApplicationContext)
Define where Flyway should look for migrations.
|
protected String flywayBaselineVersion
TopiaFlywayService.FLYWAY_BASELINE_VERSION configuration parameter.protected boolean useModelVersion
TopiaFlywayService.USE_MODEL_VERSION configuration parameter.protected org.flywaydb.core.Flyway flyway
protected String modelVersion
public void initTopiaService(TopiaApplicationContext topiaApplicationContext, Map<String,String> serviceConfiguration)
initTopiaService in interface TopiaServiceprotected void setDataSource(org.flywaydb.core.Flyway flyway,
TopiaApplicationContext topiaApplicationContext)
TopiaApplicationContext.getConfiguration(). We use
the same credentials to migrate the database as the one used when we use it.protected void setLocations(org.flywaydb.core.Flyway flyway,
TopiaApplicationContext topiaApplicationContext)
protected void doExtraConfiguration(org.flywaydb.core.Flyway flyway,
TopiaApplicationContext topiaApplicationContext)
public String getSchemaVersion() throws TopiaMigrationServiceException
getSchemaVersion in interface TopiaMigrationServiceTopiaMigrationServiceExceptionpublic void initOnCreateSchema()
initOnCreateSchema in interface TopiaMigrationServicepublic void runSchemaMigration()
runSchemaMigration in interface TopiaMigrationServicepublic void close()
close in interface TopiaServiceCopyright © 2004–2018 CodeLutin. All rights reserved.