Interface Migration

All Known Subinterfaces:
JavaBasedMigration
All Known Implementing Classes:
AbstractCypherBasedMigration

public interface Migration
Base interface for any migration.
Since:
0.0.1
Author:
Michael J. Simons
  • Method Details

    • getVersion

      MigrationVersion getVersion()
      Returns:
      The version.
    • getDescription

      @Deprecated String getDescription()
      Deprecated.
      Since 1.9.0 see getOptionalDescription()
      Returns:
      Some description.
    • getOptionalDescription

      default Optional<String> getOptionalDescription()
      Returns:
      An optional description of this migration.
    • getSource

      String getSource()
      Returns:
      Something that describes the source of this migration.
    • getChecksum

      default Optional<String> getChecksum()
      Returns:
      Possible checksum of the migration.
    • apply

      void apply(MigrationContext context)
      Implement your migration code here.
      Parameters:
      context - The migrations' context.
      Throws:
      MigrationsException - In case anything happens, wrap your exception or create a new one