use of org.dbflute.logic.replaceschema.schemainitializer.DfSchemaInitializer in project dbflute-core by dbflute.
the class DfCreateSchemaProcess method initializeSchemaAdditionalDrop.
protected boolean initializeSchemaAdditionalDrop() {
final List<Map<String, Object>> additionalDropMapList = getReplaceSchemaProperties().getAdditionalDropMapList();
if (additionalDropMapList.isEmpty()) {
return false;
}
_log.info("");
_log.info("* * * * * * * * * * * * * * * * * * * *");
_log.info("* *");
_log.info("* Initialize Schema (Additional Drop) *");
_log.info("* *");
_log.info("* * * * * * * * * * * * * * * * * * * *");
if (_lazyConnection) {
_log.info("*Passed because it's a lazy connection");
return false;
}
boolean initialized = false;
for (Map<String, Object> additionalDropMap : additionalDropMapList) {
final UnifiedSchema dropSchema = getReplaceSchemaProperties().getAdditionalDropSchema(additionalDropMap);
final String dropUrl = getReplaceSchemaProperties().getAdditionalDropUrl(additionalDropMap);
final StringBuilder logSb = new StringBuilder();
if (dropSchema.hasSchema()) {
logSb.append("[").append(dropSchema.getLoggingSchema()).append("]");
if (dropUrl != null && dropUrl.trim().length() > 0) {
logSb.append(": ").append(dropUrl);
}
} else {
if (dropUrl != null && dropUrl.trim().length() > 0) {
logSb.append(dropUrl);
}
}
_log.info(logSb.toString());
final DfSchemaInitializer initializer = createSchemaInitializerAdditional(additionalDropMap);
if (initializer != null) {
initializer.initializeSchema();
initialized = true;
}
}
return initialized;
}
use of org.dbflute.logic.replaceschema.schemainitializer.DfSchemaInitializer in project dbflute-core by dbflute.
the class DfCreateSchemaProcess method initializeSchemaMainDrop.
protected boolean initializeSchemaMainDrop() {
_log.info("");
_log.info("* * * * * * * * * * *");
_log.info("* *");
_log.info("* Initialize Schema *");
_log.info("* *");
_log.info("* * * * * * * * * * *");
if (_lazyConnection) {
_log.info("*Passed because it's a lazy connection");
_skippedInitializeSchema = true;
return false;
}
final DfSchemaInitializer initializer = createSchemaInitializer(InitializeType.MAIN);
boolean initialized = false;
if (initializer != null) {
initializer.initializeSchema();
initialized = true;
}
return initialized;
}
Aggregations