Class DataMigration
java.lang.Object
dev.esophose.playerparticles.database.DataMigration
- Direct Known Subclasses:
_1_InitialMigration
,_2_Add_Data_Columns
,_3_Add_Setting_Toggle_Self_Column
public abstract class DataMigration
extends java.lang.Object
-
Constructor Summary
Constructors Constructor Description DataMigration(int revision)
-
Method Summary
Modifier and Type Method Description int
getRevision()
abstract void
migrate(DatabaseConnector connector, java.sql.Connection connection, java.lang.String tablePrefix)
Migrates the database to this migration stage
-
Constructor Details
-
DataMigration
public DataMigration(int revision)
-
-
Method Details
-
migrate
public abstract void migrate(DatabaseConnector connector, java.sql.Connection connection, java.lang.String tablePrefix) throws java.sql.SQLExceptionMigrates the database to this migration stage- Parameters:
connector
- The connector for the databaseconnection
- The connection to the databasetablePrefix
- The prefix of the database- Throws:
java.sql.SQLException
- Any error that occurs during the SQL execution
-
getRevision
public int getRevision()- Returns:
- the revision number of this migration
-