Client and backend. This class is shared: the same code is compiled into your app and into your server, so everything on this page works in both.
public final class MigrationInfo
- Object
- MigrationInfo
One row of
Migrator.info(): a migration this build carries, one the database recorded, or
both.Constructors
public MigrationInfo(String version, String description, String type, String script, Integer checksum, MigrationState state, int installedRank, String installedOn, int executionTime) | Creates a row. |
Methods
public String getVersion() | The version. |
public String getDescription() | The description. |
public String getType() | The kind of migration. |
public String getScript() | The script file or migration class. |
public Integer getChecksum() | The checksum of the script. |
public MigrationState getState() | Where the migration stands. |
public int getInstalledRank() | The order the migration was applied in. |
public String getInstalledOn() | When the migration was applied. |
public int getExecutionTime() | How long the migration took. |
public String toString() | One line per migration, for a log. |
Inherited methods
Constructor details
MigrationInfo
public MigrationInfo(String version, String description, String type, String script, Integer checksum, MigrationState state, int installedRank, String installedOn, int executionTime)Creates a row. Built by the engine; an application reads these.
Parameters
versionString- the version, or null for a repeatable migration
descriptionString- the description
typeStringSQL,JDBC(Java), legacyJAVA, orBASELINEscriptString- the script or class name
checksumInteger- the checksum, or null where there is none
stateMigrationState- where the migration stands
installedRankint- the order it was applied in, or -1 if it was not
installedOnString- when it was applied, as the database prints it, or null
executionTimeint- how long it took in milliseconds, or -1
Method details
getVersion
public String getVersion()The version.
Returns
the version, or null for a repeatable migration
getDescription
public String getDescription()The description.
Returns
the description from the file name or the registration
getType
public String getType()The kind of migration.
Returns
SQL, JDBC (Java), legacy JAVA, or BASELINEgetScript
public String getScript()The script file or migration class.
Returns
the name recorded in the history
getChecksum
public Integer getChecksum()The checksum of the script.
Returns
the checksum, or null for a Java migration and a baseline
getState
public MigrationState getState()Where the migration stands.
Returns
the state
getInstalledRank
public int getInstalledRank()The order the migration was applied in.
Returns
the rank, or -1 if it has not been applied
getInstalledOn
public String getInstalledOn()When the migration was applied.
Returns
the timestamp as the database prints it, or null if it has not been applied
getExecutionTime
public int getExecutionTime()How long the migration took.
Returns
milliseconds, or -1 if it has not been applied
toString
public String toString()One line per migration, for a log.
Returns
version, description, type and state