com.googlecode.flyway.core.validation
Class DbValidator

java.lang.Object
  extended by com.googlecode.flyway.core.validation.DbValidator

public class DbValidator
extends java.lang.Object

Main workflow for validating the applied migrations against the available classpath migrations in order to detect accidental migration changes.


Constructor Summary
DbValidator(ValidationMode validationMode, MetaDataTable metaDataTable, java.util.List<Migration> migrations)
          Creates a new database validator.
 
Method Summary
 java.lang.String validate()
          Validate the checksum of all existing sql migration in the metadata table with the checksum of the sql migrations in the classpath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DbValidator

public DbValidator(ValidationMode validationMode,
                   MetaDataTable metaDataTable,
                   java.util.List<Migration> migrations)
Creates a new database validator.

Parameters:
validationMode - The ValidationMode for checksum validation.
metaDataTable - Supports reading and writing to the metadata table.
migrations - All migrations available on the classpath , sorted by version, newest first.
Method Detail

validate

public java.lang.String validate()
Validate the checksum of all existing sql migration in the metadata table with the checksum of the sql migrations in the classpath

Returns:
description of validation error or NULL if no validation error war found


Copyright © 2010. All Rights Reserved.