Search in sources :

Example 31 with SQLFailureException

use of org.dbflute.exception.SQLFailureException in project dbflute-core by dbflute.

the class DfReplaceSchemaTask method createSchema.

// -----------------------------------------------------
// Create Schema
// -------------
protected void createSchema(String sqlRootDir, boolean previous) {
    final DfCreateSchemaProcess process = createCreateSchemaProcess(sqlRootDir);
    _createSchemaFinalInfo = process.execute();
    final SQLFailureException breakCause = _createSchemaFinalInfo.getBreakCause();
    if (breakCause != null) {
        // high priority exception
        throw breakCause;
    }
    if (!_createSchemaFinalInfo.isFailure()) {
        // because it may have low priority failure
        if (!previous) {
            // because previous is immutable
            checkSchemaPolicyInRepsIfNeeds();
        }
    }
}
Also used : DfCreateSchemaProcess(org.dbflute.logic.replaceschema.process.DfCreateSchemaProcess) SQLFailureException(org.dbflute.exception.SQLFailureException)

Aggregations

SQLFailureException (org.dbflute.exception.SQLFailureException)31 SQLException (java.sql.SQLException)19 Statement (java.sql.Statement)9 ResultSet (java.sql.ResultSet)7 LinkedHashMap (java.util.LinkedHashMap)5 ExceptionMessageBuilder (org.dbflute.helper.message.ExceptionMessageBuilder)5 ArrayList (java.util.ArrayList)4 Connection (java.sql.Connection)3 DatabaseMetaData (java.sql.DatabaseMetaData)3 DfTakeFinallyAssertionFailureException (org.dbflute.exception.DfTakeFinallyAssertionFailureException)3 DfProcedureMeta (org.dbflute.logic.jdbc.metadata.info.DfProcedureMeta)3 DfTableMeta (org.dbflute.logic.jdbc.metadata.info.DfTableMeta)3 File (java.io.File)2 Map (java.util.Map)2 ErrorContinuedSql (org.dbflute.helper.jdbc.sqlfile.DfSqlFileRunnerResult.ErrorContinuedSql)2 DfProcedureExtractor (org.dbflute.logic.jdbc.metadata.basic.DfProcedureExtractor)2 DfTableExtractor (org.dbflute.logic.jdbc.metadata.basic.DfTableExtractor)2 DfTakeFinallyProcess (org.dbflute.logic.replaceschema.process.DfTakeFinallyProcess)2 DfClassificationElement (org.dbflute.properties.assistant.classification.DfClassificationElement)2 DfClassificationJdbcCloser (org.dbflute.properties.assistant.classification.coins.DfClassificationJdbcCloser)2