Package org.dizitart.no2.migration
Class Migration
- java.lang.Object
-
- org.dizitart.no2.migration.Migration
-
public abstract class Migration extends Object
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 ofMigrationSteps 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
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description IntegergetFromVersion()Returns the version number from which the migration is being performed.IntegergetToVersion()Returns the version number to which the migration is being performed.abstract voidmigrate(InstructionSet instructionSet)Migrates the database using theinstructions.Queue<MigrationStep>steps()Returns the queue ofMigrationSteps to be executed for the migration.
-
-
-
Method Detail
-
migrate
public abstract void migrate(InstructionSet instructionSet)
Migrates the database using theinstructions.- Parameters:
instructionSet- the instructions
-
steps
public Queue<MigrationStep> steps()
Returns the queue ofMigrationSteps to be executed for the migration.- Returns:
- the queue
-
getFromVersion
public Integer getFromVersion()
Returns the version number from which the migration is being performed.
-
getToVersion
public Integer getToVersion()
Returns the version number to which the migration is being performed.
-
-