- 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 Summary
Modifier and TypeMethodDescriptionvoid
apply
(MigrationContext context) Implement your migration code here.Returns possible checksum of the migration.Returns An optional description of this migration.Returns something that describes the source of this migration.Returns the version.boolean
-
Method Details
-
getVersion
MigrationVersion getVersion()Returns the version.- Returns:
- the version
-
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
Returns possible checksum of the migration.- Returns:
- possible checksum of the migration
-
apply
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
-