Class LocalMigrationResource

java.lang.Object
io.ebean.migration.runner.LocalMigrationResource
All Implemented Interfaces:
Comparable<LocalMigrationResource>
Direct Known Subclasses:
LocalDdlMigrationResource, LocalJdbcMigrationResource

public abstract class LocalMigrationResource extends Object implements Comparable<LocalMigrationResource>
A DB migration resource (DDL or Jdbc)
  • Field Details

  • Constructor Details

    • LocalMigrationResource

      public LocalMigrationResource(MigrationVersion version, String location)
      Construct with version and resource.
  • Method Details

    • toString

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

      public boolean isRepeatable()
      Return true if the underlying version is "repeatable".
    • isRepeatableInit

      public boolean isRepeatableInit()
      Return true if the underlying version is "repeatable init".
    • isRepeatableLast

      public boolean isRepeatableLast()
      Return true if the underlying version is "repeatable last".
    • key

      @Nonnull public String key()
      Return the "key" that identifies the migration.
    • getComment

      @Nonnull public String getComment()
      Return the migration comment.
    • compareTo

      public int compareTo(LocalMigrationResource o)
      Default ordering by version.
      Specified by:
      compareTo in interface Comparable<LocalMigrationResource>
    • getVersion

      @Nonnull public MigrationVersion getVersion()
      Return the underlying migration version.
    • getLocation

      public String getLocation()
      Return the resource location.
    • getContent

      @Nonnull public abstract String getContent()
      Return the content of the migration.
    • getType

      @Nonnull public String getType()
      Return the type code ("R" or "V") for this migration.
    • setInitType

      public void setInitType()
      Set the migration to be an Init migration.