Direct Known Subclasses:
AfterBadJoinAddressDataCorrectionPatch, BadAFKThresholdValuePatch, BadFabricJoinAddressValuePatch, BadJoinAddressDataCorrectionPatch, BadNukkitRegisterValuePatch, CommandUsageTableRemovalPatch, ComponentColumnToExtensionDataPatch, CorrectWrongCharacterEncodingPatch, DeleteIPsPatch, DiskUsagePatch, ExtensionShowInPlayersTablePatch, ExtensionStringValueLengthPatch, ExtensionTableProviderFormattersPatch, ExtensionTableProviderValuesForPatch, ExtensionTableRowValueLengthPatch, GeoInfoLastUsedPatch, GeoInfoOptimizationPatch, KillsOptimizationPatch, KillsServerIDPatch, LegacyPermissionLevelGroupsPatch, LinkedToSecurityTablePatch, LinkUsersToPlayersSecurityTablePatch, LitebansTableHeaderPatch, NicknameLastSeenPatch, NicknamesOptimizationPatch, PingOptimizationPatch, PlayerTableRowPatch, RegisterDateMinimizationPatch, RemoveDanglingServerDataPatch, RemoveDanglingUserDataPatch, RemoveEverythingTransaction, RemoveIncorrectTebexPackageDataPatch, RemoveUsernameFromAccessLogPatch, SecurityTableGroupPatch, SecurityTableIdPatch, ServerIsProxyPatch, ServerPlanVersionPatch, ServerTableRowPatch, SessionAFKTimePatch, SessionJoinAddressPatch, SessionsOptimizationPatch, TransferTableRemovalPatch, UpdateWebPermissionsPatch, UserInfoHostnameAllowNullPatch, UserInfoHostnamePatch, UserInfoOptimizationPatch, UsersTableNameLengthPatch, Version10Patch, VersionTableRemovalPatch, WebGroupAddMissingAdminGroupPatch, WebGroupDefaultGroupsPatch, WorldsOptimizationPatch, WorldsServerIDPatch, WorldTimesOptimizationPatch, WorldTimesSeverIDPatch

public abstract class Patch extends OperationCriticalTransaction
  • Constructor Details

    • Patch

      public Patch()
  • Method Details

    • hasBeenApplied

      public abstract boolean hasBeenApplied()
    • applyPatch

      protected abstract void applyPatch()
    • isApplied

      public boolean isApplied()
    • wasApplied

      public boolean wasApplied()
    • shouldBeExecuted

      protected boolean shouldBeExecuted()
      Description copied from class: Transaction
      Override this method for conditional execution.

      Please note that the transaction has not been initialized and class variables are not available for queries. The condition should depend on other variables (Like the data that is to be stored) given to the transaction.

      Overrides:
      shouldBeExecuted in class Transaction
      Returns:
      false if the transaction should not execute.
    • performOperations

      protected void performOperations()
      Description copied from class: Transaction
      Implement this method for transaction execution.
      Specified by:
      performOperations in class Transaction
    • hasColumn

      protected boolean hasColumn(String tableName, String columnName)
    • addColumn

      protected void addColumn(String tableName, String columnInfo)
    • dropTable

      protected void dropTable(String name)
    • renameTable

      protected void renameTable(String from, String to)
    • dropForeignKeys

      protected void dropForeignKeys(String referencedTable)
    • ensureNoForeignKeyConstraints

      protected void ensureNoForeignKeyConstraints(String table)
    • allValuesHaveValueZero

      protected boolean allValuesHaveValueZero(String tableName, String column)
    • columnVarcharLength

      protected int columnVarcharLength(String table, String column)