private SqlStatement[] generateRollbackStatementsFromInverse(Database database) throws RollbackImpossibleException {
        Change[] inverses = createInverses();
        if (inverses == null) {
            throw new RollbackImpossibleException("No inverse to " + getClass().getName() + " created");
        }

        List<SqlStatement> statements = new ArrayList<>();

        try {
            for (Change inverse : inverses) {
                if (!inverse.supports(database)) {
                    throw new RollbackImpossibleException(
                        Scope.getCurrentScope().getSingleton(ChangeFactory.class).getChangeMetaData(inverse).getName() + " is not supported on " +
                            database.getShortName()
                    );
                }
                statements.addAll(Arrays.asList(inverse.generateStatements(database)));
            }
        } catch (LiquibaseException e) {
            throw new RollbackImpossibleException(e);
        }

        return statements.toArray(new SqlStatement[statements.size()]);
    }
private SqlStatement[] generateRollbackStatementsFromInverse(Database database) throws RollbackImpossibleException {
        Change[] inverses = createInverses();
        if (inverses == null) {
            throw new RollbackImpossibleException("No inverse to " + getClass().getName() + " created");
        }

        List<SqlStatement> statements = new ArrayList<>();

        try {
            for (Change inverse : inverses) {
                if (!inverse.supports(database)) {
                    throw new RollbackImpossibleException(
                        Scope.getCurrentScope().getSingleton(ChangeFactory.class).getChangeMetaData(inverse).getName() + " is not supported on " +
                            database.getShortName()
                    );
                }
                statements.addAll(Arrays.asList(inverse.generateStatements(database)));
            }
        } catch (LiquibaseException e) {
            throw new RollbackImpossibleException(e);
        }

        return statements.toArray(new SqlStatement[statements.size()]);
    }
private SqlStatement [ ] generateRollbackStatementsFromInverse ( Database database ) throws RollbackImpossibleException { Change [ ] inverses = createInverses ( ) ; if ( inverses == null ) { throw new RollbackImpossibleException ( "No inverse to " + getClass ( ) . getName ( ) + " created" ) ; } List < SqlStatement > statements = new ArrayList <> ( ) ; try { for ( Change inverse : inverses ) { if ( ! inverse . supports ( database ) ) { throw new RollbackImpossibleException ( Scope . getCurrentScope ( ) . getSingleton ( ChangeFactory . class ) . getChangeMetaData ( inverse ) . getName ( ) + " is not supported on " + database . getShortName ( ) ) ; } statements . addAll ( Arrays . asList ( inverse . generateStatements ( database ) ) ) ; } } catch ( LiquibaseException e ) { throw new RollbackImpossibleException ( e ) ; } return statements . toArray ( new SqlStatement [ statements . size ( ) ] ) ; }
/*
Generates rollback statements from the inverse changes returned by createInverses().
Throws RollbackImpossibleException if the changes created by createInverses() is not supported for the
passed database.
/ * Generates rollback statements from the inverse changes returned by createInverses () . Throws RollbackImpossibleException if the changes created by createInverses () is not supported for the passed database .