Class MigrateResult

java.lang.Object
com.codename1.migration.MigrateResult

public final class MigrateResult extends Object
What one Migrator.migrate() call did.
  • 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 - the schema version before the run, or null for an empty history
      targetVersion - the schema version after it, or null
      applied - the script name of every migration that ran, in order
      warnings - 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