Class MigrationVersion

java.lang.Object
io.ebean.migration.MigrationVersion
All Implemented Interfaces:
Comparable<MigrationVersion>

public final class MigrationVersion extends Object implements Comparable<MigrationVersion>
The version of a migration used so that migrations are processed in order.
  • Field Details

  • Method Details

    • isRepeatable

      public boolean isRepeatable()
      Return true if this is a "repeatable" version.
    • isRepeatableInit

      public boolean isRepeatableInit()
      Return true if this is a "repeatable init" verision.
    • isRepeatableLast

      public boolean isRepeatableLast()
      Return true if this is a "repeatable last" verision.
    • getFull

      @Deprecated public String getFull()
      Deprecated.
      Deprecated migrate to raw().
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • comment

      public String comment()
      Return the version comment.
    • getComment

      @Deprecated public String getComment()
      Deprecated.
      Deprecated migrate to comment();
    • raw

      public String raw()
      Return the version in raw form.
    • getRaw

      @Deprecated public String getRaw()
      Deprecated.
      Deprecated migrate to raw().
    • asString

      public String asString()
      Return the trimmed version excluding version comment and un-parsable string.
    • normalised

      public String normalised()
      Return the trimmed version with any underscores replaced with '.'
    • nextVersion

      public String nextVersion()
      Return the next version based on this version.
    • compareTo

      public int compareTo(MigrationVersion other)
      Specified by:
      compareTo in interface Comparable<MigrationVersion>
    • trim

      public static String trim(String raw)
      Parse the raw version string and just return the leading version number;
    • parse

      public static MigrationVersion parse(String raw)
      Parse the raw version string into a MigrationVersion.
    • type

      public String type()
      Return the version type (I, R or V).
    • getType

      @Deprecated public String getType()
      Deprecated.
      Deprecated migrate to type().