use of org.dbflute.logic.jdbc.schemaxml.DfSchemaXmlSerializer in project dbflute-core by dbflute.
the class DfAlterCheckProcess method createSchemaXmlSerializer.
protected DfSchemaXmlSerializer createSchemaXmlSerializer(String schemaXml, DfCraftDiffAssertDirection direction) {
// no use history here (use SchemaDiff directly later)
final String historyFile = null;
final DfSchemaXmlSerializer serializer = DfSchemaXmlSerializer.createAsManage(_dataSource, schemaXml, historyFile);
final String craftMetaDir = getMigrationAlterCheckCraftMetaDir();
serializer.enableCraftDiff(_dataSource, craftMetaDir, direction);
return serializer;
}
use of org.dbflute.logic.jdbc.schemaxml.DfSchemaXmlSerializer in project dbflute-core by dbflute.
the class TorqueJDBCTransformTask method doExecute.
// ===================================================================================
// Execute
// =======
@Override
protected void doExecute() {
final DfSchemaXmlSerializer serializer = DfSchemaXmlSerializer.createAsCore(getDataSource());
serializer.serialize();
}
use of org.dbflute.logic.jdbc.schemaxml.DfSchemaXmlSerializer in project dbflute-core by dbflute.
the class DfAlterCheckProcess method serializePreviousSchema.
protected void serializePreviousSchema() {
final String previousXml = getMigrationAlterCheckPreviousSchemaXml();
final DfCraftDiffAssertDirection direction = DfCraftDiffAssertDirection.DIRECT_PREVIOUS;
final DfSchemaXmlSerializer serializer = createSchemaXmlSerializer(previousXml, direction);
serializer.serialize();
}
use of org.dbflute.logic.jdbc.schemaxml.DfSchemaXmlSerializer in project dbflute-core by dbflute.
the class DfSchemaSyncChecker method checkSync.
// ===================================================================================
// Check Sync
// ==========
public void checkSync() {
clearOutputResource();
final DfSchemaXmlSerializer serializer = diffSchema();
_log.info("");
_log.info("* * * * * * * * * * * * * * * * *");
_log.info("* *");
_log.info("* Check Schema Synchronized *");
_log.info("* *");
_log.info("* * * * * * * * * * * * * * * * *");
final DfSchemaDiff schemaDiff = serializer.getSchemaDiff();
if (schemaDiff.hasDiff()) {
_log.info(" -> the schema has differences");
throwSchemaSyncCheckTragedyResultException();
} else {
// synchronized
_log.info(" -> the schema is synchronized");
clearOutputResource();
}
}
use of org.dbflute.logic.jdbc.schemaxml.DfSchemaXmlSerializer in project dbflute-core by dbflute.
the class DfSchemaSyncChecker method serializeMainSchema.
protected DfSchemaXmlSerializer serializeMainSchema() {
// as next
final DfSchemaXmlSerializer mainSerializer = createMainSerializer();
// because of comparison with other schema
mainSerializer.suppressSchemaDiff();
mainSerializer.serialize();
return mainSerializer;
}
Aggregations