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 Link icon

    • Patch Link icon

      public Patch()
  • Method Details Link icon

    • hasBeenApplied Link icon

      public abstract boolean hasBeenApplied()
    • applyPatch Link icon

      protected abstract void applyPatch()
    • isApplied Link icon

      public boolean isApplied()
    • wasApplied Link icon

      public boolean wasApplied()
    • shouldBeExecuted Link icon

      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 Link icon

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

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

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

      protected void dropTable(String name)
    • renameTable Link icon

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

      protected void dropForeignKeys(String referencedTable)
    • ensureNoForeignKeyConstraints Link icon

      protected void ensureNoForeignKeyConstraints(String table)
    • allValuesHaveValueZero Link icon

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

      protected int columnVarcharLength(String table, String column)