Class Patch
java.lang.Object
com.djrapitops.plan.storage.database.transactions.Transaction
com.djrapitops.plan.storage.database.transactions.init.OperationCriticalTransaction
com.djrapitops.plan.storage.database.transactions.patches.Patch
- 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
-
Field Summary
Fields inherited from class com.djrapitops.plan.storage.database.transactions.Transaction
attempts, dbType, success
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected boolean
allValuesHaveValueZero
(String tableName, String column) protected abstract void
protected int
columnVarcharLength
(String table, String column) protected void
dropForeignKeys
(String referencedTable) protected void
protected void
abstract boolean
protected boolean
boolean
protected void
Implement this method for transaction execution.protected void
renameTable
(String from, String to) protected boolean
Override this method for conditional execution.boolean
Methods inherited from class com.djrapitops.plan.storage.database.transactions.init.OperationCriticalTransaction
executeTransaction
Methods inherited from class com.djrapitops.plan.storage.database.transactions.Transaction
commitMidTransaction, dbIsNotUnderHeavyLoad, execute, execute, executeOther, executeReturningId, executeSwallowingExceptions, getDBState, getName, getServerUUID, hasTable, query, toString, wasSuccessful
-
Constructor Details
-
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 classTransaction
- 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 classTransaction
-
hasColumn
-
addColumn
-
dropTable
-
renameTable
-
dropForeignKeys
-
ensureNoForeignKeyConstraints
-
allValuesHaveValueZero
-
columnVarcharLength
-