Search in sources :

Example 1 with CleanResult

use of org.flywaydb.core.api.output.CleanResult in project flyway by flyway.

the class DbClean method clean.

public CleanResult clean() throws FlywayException {
    if (configuration.isCleanDisabled()) {
        throw new FlywayException("Unable to execute clean as it has been disabled with the 'flyway.cleanDisabled' property.");
    }
    callbackExecutor.onEvent(Event.BEFORE_CLEAN);
    CleanResult cleanResult = CommandResultFactory.createCleanResult(database.getCatalog());
    clean(cleanResult);
    callbackExecutor.onEvent(Event.AFTER_CLEAN);
    schemaHistory.clearCache();
    return cleanResult;
}
Also used : FlywayException(org.flywaydb.core.api.FlywayException) CleanResult(org.flywaydb.core.api.output.CleanResult)

Aggregations

FlywayException (org.flywaydb.core.api.FlywayException)1 CleanResult (org.flywaydb.core.api.output.CleanResult)1