/*
 * Copyright © Red Gate Software Ltd 2010-2020
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.flywaydb.core.api;

import java.util.Date;

Info about a migration.
/** * Info about a migration. */
public interface MigrationInfo extends Comparable<MigrationInfo> {
Returns:The type of migration (BASELINE, SQL, JDBC, ...)
/** * @return The type of migration (BASELINE, SQL, JDBC, ...) */
MigrationType getType();
Returns:The target version of this migration.
/** * @return The target version of this migration. */
Integer getChecksum();
Returns:The schema version after the migration is complete.
/** * @return The schema version after the migration is complete. */
MigrationVersion getVersion();
Returns:The description of the migration.
/** * @return The description of the migration. */
String getDescription();
Returns:The name of the script to execute for this migration, relative to its classpath or filesystem location.
/** * @return The name of the script to execute for this migration, relative to its classpath or filesystem location. */
String getScript();
Returns:The state of the migration (PENDING, SUCCESS, ...)
/** * @return The state of the migration (PENDING, SUCCESS, ...) */
MigrationState getState();
Returns:The timestamp when this migration was installed. (Only for applied migrations)
/** * @return The timestamp when this migration was installed. (Only for applied migrations) */
Date getInstalledOn();
Returns:The user that installed this migration. (Only for applied migrations)
/** * @return The user that installed this migration. (Only for applied migrations) */
String getInstalledBy();
Returns:The rank of this installed migration. This is the most precise way to sort applied migrations by installation order. Migrations that were applied later have a higher rank. (Only for applied migrations)
/** * @return The rank of this installed migration. This is the most precise way to sort applied migrations by installation order. * Migrations that were applied later have a higher rank. (Only for applied migrations) */
Integer getInstalledRank();
Returns:The execution time (in millis) of this migration. (Only for applied migrations)
/** * @return The execution time (in millis) of this migration. (Only for applied migrations) */
Integer getExecutionTime();
Returns:The physical location of the migration on disk.
/** * @return The physical location of the migration on disk. */
String getPhysicalLocation(); }