fix Flyway table name problem (FINERACT-979)
This commit is contained in:
committed by
Michael Vorburger ⛑️
parent
20e8a02294
commit
c764d32d5e
+18
-14
@@ -67,11 +67,13 @@ public class TenantDatabaseUpgradeService {
|
||||
DriverDataSource source = new DriverDataSource(Thread.currentThread().getContextClassLoader(), driverConfig.getDriverClassName(), connectionProtocol, connection.getSchemaUsername(), connection.getSchemaPassword());
|
||||
|
||||
final Flyway flyway = Flyway.configure()
|
||||
.dataSource(source)
|
||||
.locations("sql/migrations/core_db")
|
||||
.outOfOrder(true)
|
||||
.placeholderReplacement(false)
|
||||
.load();
|
||||
.dataSource(source)
|
||||
.locations("sql/migrations/core_db")
|
||||
.outOfOrder(true)
|
||||
.placeholderReplacement(false)
|
||||
.configuration(Map.of(
|
||||
"flyway.table", "schema_version")) // FINERACT-979
|
||||
.load();
|
||||
|
||||
try {
|
||||
flyway.repair();
|
||||
@@ -97,15 +99,17 @@ public class TenantDatabaseUpgradeService {
|
||||
LOG.info("upgradeTenantDB: FINERACT_DEFAULT_TENANTDB_HOSTNAME = {}, FINERACT_DEFAULT_TENANTDB_PORT = {}", dbHostname, dbPort);
|
||||
|
||||
final Flyway flyway = Flyway.configure()
|
||||
.dataSource(tenantDataSource)
|
||||
.locations("sql/migrations/list_db")
|
||||
.outOfOrder(true)
|
||||
.placeholders(Map.of( // FINERACT-773
|
||||
"fineract_default_tenantdb_hostname", dbHostname,
|
||||
"fineract_default_tenantdb_port", dbPort,
|
||||
"fineract_default_tenantdb_uid", dbUid,
|
||||
"fineract_default_tenantdb_pwd", dbPwd))
|
||||
.load();
|
||||
.dataSource(tenantDataSource)
|
||||
.locations("sql/migrations/list_db")
|
||||
.outOfOrder(true)
|
||||
.placeholders(Map.of( // FINERACT-773
|
||||
"fineract_default_tenantdb_hostname", dbHostname,
|
||||
"fineract_default_tenantdb_port", dbPort,
|
||||
"fineract_default_tenantdb_uid", dbUid,
|
||||
"fineract_default_tenantdb_pwd", dbPwd))
|
||||
.configuration(Map.of(
|
||||
"flyway.table", "schema_version")) // FINERACT-979
|
||||
.load();
|
||||
|
||||
flyway.repair();
|
||||
flyway.migrate();
|
||||
|
||||
Reference in New Issue
Block a user