Package migratedb.v1.core.api
Interface MigrationInfo
public interface MigrationInfo
Info about a migration.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Comparator<MigrationInfo>@Nullable AppliedMigration@Nullable Checksum@Nullable Integer@Nullable String@Nullable Instant@Nullable Integer@Nullable ResolvedMigrationgetState()getType()@Nullable Versiondefault boolean@Nullable ErrorDetailsvalidate()
-
Method Details
-
executionOrder
-
isRepeatable
default boolean isRepeatable()- Returns:
- Whether this is a repeatable migration.
-
getResolvedMigration
@Nullable ResolvedMigration getResolvedMigration()- Returns:
- The resolved migration to aggregate the info from.
-
getAppliedMigration
@Nullable AppliedMigration getAppliedMigration()- Returns:
- The applied migration to aggregate the info from.
-
getType
MigrationType getType()- Returns:
- The type of migration (BASELINE, SQL, JDBC, ...)
-
getChecksum
@Nullable Checksum getChecksum()- Returns:
- The checksum of this migration.
-
getVersion
@Nullable Version getVersion()- Returns:
- The schema version after the migration is complete.
-
getDescription
String getDescription()- Returns:
- The description of the migration.
-
getScript
String getScript()- Returns:
- The name of the script to execute for this migration, relative to its classpath or filesystem location.
-
getState
MigrationState getState()- Returns:
- The state of the migration (PENDING, SUCCESS, ...)
-
getInstalledOn
@Nullable Instant getInstalledOn()- Returns:
- The timestamp when this migration was installed. (Only for applied migrations)
-
getInstalledBy
@Nullable String getInstalledBy()- Returns:
- The user that installed this migration. (Only for applied migrations)
-
getInstalledRank
@Nullable Integer getInstalledRank()- 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)
-
getExecutionTime
@Nullable Integer getExecutionTime()- Returns:
- The execution time (in millis) of this migration. (Only for applied migrations)
-
getPhysicalLocation
String getPhysicalLocation()- Returns:
- The physical location of the migration on disk.
-
validate
@Nullable ErrorDetails validate()- Returns:
- The error code with the relevant validation message, or
nullif everything is fine.
-