[FIX] configuration of mongo interface
This commit is contained in:
parent
969bf78576
commit
85754f20f8
@ -133,7 +133,9 @@ public class MigrationEngine {
|
|||||||
private void createTableIfAbleOrWaitAdmin(final DbConfig configInput) throws MigrationException {
|
private void createTableIfAbleOrWaitAdmin(final DbConfig configInput) throws MigrationException {
|
||||||
if (ConfigBaseVariable.getDBAbleToCreate()) {
|
if (ConfigBaseVariable.getDBAbleToCreate()) {
|
||||||
final DbConfig config = configInput.clone();
|
final DbConfig config = configInput.clone();
|
||||||
|
if (!"MONGO".equalsIgnoreCase(config.getType())) {
|
||||||
config.setDbName(null);
|
config.setDbName(null);
|
||||||
|
}
|
||||||
final String dbName = configInput.getDbName();
|
final String dbName = configInput.getDbName();
|
||||||
LOGGER.info("Verify existance of '{}'", dbName);
|
LOGGER.info("Verify existance of '{}'", dbName);
|
||||||
try (final DBAccess da = DBAccess.createInterface(config)) {
|
try (final DBAccess da = DBAccess.createInterface(config)) {
|
||||||
|
@ -122,7 +122,9 @@ public class ConfigureDb {
|
|||||||
LOGGER.error("Fail to clean the DB");
|
LOGGER.error("Fail to clean the DB");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (!"MONGO".equalsIgnoreCase(modeTest)) {
|
||||||
config.setDbName(null);
|
config.setDbName(null);
|
||||||
|
}
|
||||||
LOGGER.info("Remove the DB and create a new one '{}'", config.getDbName());
|
LOGGER.info("Remove the DB and create a new one '{}'", config.getDbName());
|
||||||
try (final DBAccess daRoot = DBAccess.createInterface(config)) {
|
try (final DBAccess daRoot = DBAccess.createInterface(config)) {
|
||||||
if ("SQLITE-MEMORY".equalsIgnoreCase(modeTest)) {
|
if ("SQLITE-MEMORY".equalsIgnoreCase(modeTest)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user