Class DbValidate

java.lang.Object
migratedb.v1.core.internal.command.DbValidate

public class DbValidate extends Object
Handles the validate command.
  • Constructor Details

    • DbValidate

      public DbValidate(Database<?> database, SchemaHistory schemaHistory, Schema<?,?> schema, MigrationResolver migrationResolver, Configuration configuration, boolean allowPending, CallbackExecutor callbackExecutor)
      Creates a new database validator.
      Parameters:
      database - The DB support for the connection.
      schemaHistory - The database schema history table.
      schema - The schema containing the schema history table.
      migrationResolver - The migration resolver.
      configuration - The current configuration.
      allowPending - Whether pending migrations are allowed.
      callbackExecutor - The callback executor.
  • Method Details

    • validate

      public ValidateResult validate()
      Starts the actual migration.
      Returns:
      The validation error, if any.