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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • migrate

      public abstract void migrate​(DatabaseConnector connector, java.sql.Connection connection, java.lang.String tablePrefix) throws java.sql.SQLException
      Migrates the database to this migration stage
      Parameters:
      connector - The connector for the database
      connection - The connection to the database
      tablePrefix - 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