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 MigrateResult

  1. Object
  2. MigrateResult
What one Migrator.migrate() call did.

Constructors

public MigrateResult(String initialVersion, String targetVersion, List<String> applied, List<String> warnings)Creates a result.

Methods

public String getInitialVersion()The schema version before the run.
public String getTargetVersion()The schema version after the run.
public int getMigrationsExecuted()How many migrations ran.
public List<String> getApplied()The migrations that ran.
public List<String> getWarnings()What the run tolerated: a history newer than this build, for one.

Inherited methods

Constructor details

MigrateResult

public MigrateResult(String initialVersion, String targetVersion, List<String> applied, List<String> warnings)
Creates a result. Built by the engine; an application reads these.

Parameters

initialVersion String
the schema version before the run, or null for an empty history
targetVersion String
the schema version after it, or null
applied List<String>
the script name of every migration that ran, in order
warnings List<String>
things the run tolerated and the operator should know

Method details

getInitialVersion

public String getInitialVersion()
The schema version before the run.

Returns

the version, or null if nothing had been applied

getTargetVersion

public String getTargetVersion()
The schema version after the run.

Returns

the version, or null if nothing versioned has been applied

getMigrationsExecuted

public int getMigrationsExecuted()
How many migrations ran.

Returns

the count; 0 when the database was already current

getApplied

public List<String> getApplied()
The migrations that ran.

Returns

their script names in the order they ran

getWarnings

public List<String> getWarnings()
What the run tolerated: a history newer than this build, for one.

Returns

the warnings, empty when there were none