Package org.dizitart.no2.migration
Class Migration
java.lang.Object
org.dizitart.no2.migration.Migration
Represents the database migration operation. A migration is a way to modify the structure of a database
from one version to another. It contains a queue of
MigrationSteps that need to be executed
in order to migrate the database from the start version to the end version.- Since:
- 4.0
- Author:
- Anindya Chatterjee
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the version number from which the migration is being performed.Returns the version number to which the migration is being performed.abstract voidmigrate(InstructionSet instructionSet) Migrates the database using theinstructions.steps()Returns the queue ofMigrationSteps to be executed for the migration.
-
Constructor Details
-
Migration
Instantiates a newMigration.- Parameters:
fromVersion- the start versiontoVersion- the end version
-
-
Method Details
-
migrate
Migrates the database using theinstructions.- Parameters:
instructionSet- the instructions
-
steps
Returns the queue ofMigrationSteps to be executed for the migration.- Returns:
- the queue
-
getFromVersion
Returns the version number from which the migration is being performed. -
getToVersion
Returns the version number to which the migration is being performed.
-