Class ResolvedMigrationImpl
- java.lang.Object
-
- migratedb.v1.core.internal.resolver.ResolvedMigrationImpl
-
- All Implemented Interfaces:
ResolvedMigration
public class ResolvedMigrationImpl extends Object implements ResolvedMigration
A migration available on the classpath.
-
-
Constructor Summary
Constructors Constructor Description ResolvedMigrationImpl(Version version, String description, String script, Checksum checksum, Checksum equivalentChecksum, MigrationType type, String locationDescription, MigrationExecutor executor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanchecksumMatches(Checksum checksum)booleanequals(Object o)ChecksumgetChecksum()StringgetDescription()MigrationExecutorgetExecutor()StringgetLocationDescription()StringgetScript()MigrationTypegetType()VersiongetVersion()inthashCode()StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface migratedb.v1.core.api.resolver.ResolvedMigration
isRepeatable
-
-
-
-
Constructor Detail
-
ResolvedMigrationImpl
public ResolvedMigrationImpl(Version version, String description, String script, Checksum checksum, Checksum equivalentChecksum, MigrationType type, String locationDescription, MigrationExecutor executor)
-
-
Method Detail
-
getVersion
public Version getVersion()
- Specified by:
getVersionin interfaceResolvedMigration- Returns:
- The version of the database after applying this migration,
nullfor repeatable migrations.
-
getDescription
public String getDescription()
- Specified by:
getDescriptionin interfaceResolvedMigration- Returns:
- The description of the migration.
-
getScript
public String getScript()
- Specified by:
getScriptin interfaceResolvedMigration- Returns:
- The name of the script to execute for this migration, relative to its base (classpath/filesystem) location.
-
getChecksum
public Checksum getChecksum()
- Specified by:
getChecksumin interfaceResolvedMigration- Returns:
- The checksum of the migration. Optional. Can be
nullif no unique checksum is computable.
-
getType
public MigrationType getType()
- Specified by:
getTypein interfaceResolvedMigration- Returns:
- The type of migration (INIT, SQL, ...)
-
getLocationDescription
public String getLocationDescription()
- Specified by:
getLocationDescriptionin interfaceResolvedMigration- Returns:
- Description of the location of the migration (on disk, if possible). Used for more precise error reporting in case of conflict.
-
getExecutor
public MigrationExecutor getExecutor()
- Specified by:
getExecutorin interfaceResolvedMigration- Returns:
- The executor to run this migration.
-
checksumMatches
public boolean checksumMatches(Checksum checksum)
- Specified by:
checksumMatchesin interfaceResolvedMigration
-
-