Search in sources :

Example 1 with DataMigrationValidationException

use of org.jooq.exception.DataMigrationValidationException in project jOOQ by jOOQ.

the class MigrationImpl method validate0.

private final void validate0(DefaultMigrationContext ctx) {
    JooqMigrationsChangelogRecord currentRecord = currentChangelogRecord();
    if (currentRecord != null) {
        Commit currentCommit = commits().get(currentRecord.getMigratedTo());
        if (currentCommit == null)
            throw new DataMigrationValidationException("Version currently installed is not available from CommitProvider: " + currentRecord.getMigratedTo());
    }
    validateCommitProvider(ctx, from());
    validateCommitProvider(ctx, to());
    revertUntracked(ctx, null, currentRecord);
}
Also used : Commit(org.jooq.Commit) DataMigrationValidationException(org.jooq.exception.DataMigrationValidationException)

Aggregations

Commit (org.jooq.Commit)1 DataMigrationValidationException (org.jooq.exception.DataMigrationValidationException)1