All Known Subinterfaces:
JavaBasedMigration
All Known Implementing Classes:
AbstractCypherBasedMigration

public sealed interface Migration permits AbstractCypherBasedMigration, JavaBasedMigration (not exhaustive)
Base interface for any migration.
Since:
0.0.1
Author:
Michael J. Simons
  • Method Details

    • getVersion

      MigrationVersion getVersion()
      Returns the version.
      Returns:
      the version
    • getOptionalDescription

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

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

      default Optional<String> getChecksum()
      Returns possible checksum of the migration.
      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
    • isRepeatable

      boolean isRepeatable()
      Returns:
      true if this migration can be safely repeated
      Since:
      2.0.0