Search in sources :

Example 6 with DfSchemaXmlSerializer

use of org.dbflute.logic.jdbc.schemaxml.DfSchemaXmlSerializer in project dbflute-core by dbflute.

the class DfSchemaSyncChecker method doCreateSerializer.

protected DfSchemaXmlSerializer doCreateSerializer(DfSchemaSource dataSource, String historyFile) {
    final String schemaXml = getSchemaXml();
    final DfSchemaXmlSerializer serializer = DfSchemaXmlSerializer.createAsManage(dataSource, schemaXml, historyFile);
    final String craftMetaDir = getSchemaSyncCheckCraftMetaDir();
    if (!getDocumentProperties().isSchemaSyncCheckSuppressCraftDiff()) {
        serializer.enableCraftDiff(dataSource, craftMetaDir, DfCraftDiffAssertDirection.ROLLING_NEXT);
    }
    return serializer;
}
Also used : DfSchemaXmlSerializer(org.dbflute.logic.jdbc.schemaxml.DfSchemaXmlSerializer)

Example 7 with DfSchemaXmlSerializer

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();
}
Also used : DfSchemaXmlSerializer(org.dbflute.logic.jdbc.schemaxml.DfSchemaXmlSerializer) DfCraftDiffAssertDirection(org.dbflute.logic.doc.craftdiff.DfCraftDiffAssertDirection)

Example 8 with DfSchemaXmlSerializer

use of org.dbflute.logic.jdbc.schemaxml.DfSchemaXmlSerializer in project dbflute-core by dbflute.

the class DfAlterCheckProcess method serializeNextSchema.

// ===================================================================================
// Serialize Schema
// ================
protected void serializeNextSchema() {
    final String nextXml = getMigrationAlterCheckNextSchemaXml();
    final DfCraftDiffAssertDirection direction = DfCraftDiffAssertDirection.DIRECT_NEXT;
    final DfSchemaXmlSerializer serializer = createSchemaXmlSerializer(nextXml, direction);
    serializer.serialize();
}
Also used : DfSchemaXmlSerializer(org.dbflute.logic.jdbc.schemaxml.DfSchemaXmlSerializer) DfCraftDiffAssertDirection(org.dbflute.logic.doc.craftdiff.DfCraftDiffAssertDirection)

Example 9 with DfSchemaXmlSerializer

use of org.dbflute.logic.jdbc.schemaxml.DfSchemaXmlSerializer in project dbflute-core by dbflute.

the class DfLReverseProcess method prepareDatabase.

// ===================================================================================
// Prepare
// =======
protected Database prepareDatabase() {
    final String schemaXml = getLoadDataReverseSchemaXml();
    final DfSchemaXmlSerializer serializer = createSchemaXmlSerializer(schemaXml);
    serializer.serialize();
    final DfSchemaXmlReader reader = createSchemaXmlReader(schemaXml);
    final AppData appData = reader.read();
    return appData.getDatabase();
}
Also used : AppData(org.apache.torque.engine.database.model.AppData) DfSchemaXmlSerializer(org.dbflute.logic.jdbc.schemaxml.DfSchemaXmlSerializer) DfSchemaXmlReader(org.dbflute.logic.jdbc.schemaxml.DfSchemaXmlReader)

Example 10 with DfSchemaXmlSerializer

use of org.dbflute.logic.jdbc.schemaxml.DfSchemaXmlSerializer in project dbflute-core by dbflute.

the class DfSchemaSyncChecker method doCreateSerializer.

protected DfSchemaXmlSerializer doCreateSerializer(DfSchemaSource dataSource) {
    final String historyFile = getDiffMapFile();
    final String schemaXml = getSchemaXml();
    final DfSchemaXmlSerializer serializer = DfSchemaXmlSerializer.createAsManage(dataSource, schemaXml, historyFile);
    final String craftMetaDir = getSchemaSyncCheckCraftMetaDir();
    if (!getDocumentProperties().isSchemaSyncCheckSuppressCraftDiff()) {
        serializer.enableCraftDiff(dataSource, craftMetaDir, DfCraftDiffAssertDirection.ROLLING_NEXT);
    }
    return serializer;
}
Also used : DfSchemaXmlSerializer(org.dbflute.logic.jdbc.schemaxml.DfSchemaXmlSerializer)

Aggregations

DfSchemaXmlSerializer (org.dbflute.logic.jdbc.schemaxml.DfSchemaXmlSerializer)15 DfCraftDiffAssertDirection (org.dbflute.logic.doc.craftdiff.DfCraftDiffAssertDirection)4 AppData (org.apache.torque.engine.database.model.AppData)3 DfSchemaXmlReader (org.dbflute.logic.jdbc.schemaxml.DfSchemaXmlReader)3 DataSource (javax.sql.DataSource)1 Database (org.apache.torque.engine.database.model.Database)1 DfFittingDataSource (org.dbflute.helper.jdbc.connection.DfFittingDataSource)1 DfSPolicyChecker (org.dbflute.logic.doc.spolicy.DfSPolicyChecker)1 DfSPolicyResult (org.dbflute.logic.doc.spolicy.result.DfSPolicyResult)1 DfSchemaDiff (org.dbflute.logic.jdbc.schemadiff.DfSchemaDiff)1 DfReplaceSchemaProperties (org.dbflute.properties.DfReplaceSchemaProperties)1 DfSchemaPolicyProperties (org.dbflute.properties.DfSchemaPolicyProperties)1