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,CookieTableIpAddressPatch,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,TPSTableMSPTPatch,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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected booleanallValuesHaveValueZero(String tableName, String column) protected abstract voidprotected intcolumnVarcharLength(String table, String column) protected voiddropForeignKeys(String referencedTable) protected voidprotected voidabstract booleanprotected booleanbooleanprotected voidImplement this method for transaction execution.protected voidrenameTable(String from, String to) protected booleanOverride this method for conditional execution.booleanMethods inherited from class com.djrapitops.plan.storage.database.transactions.init.OperationCriticalTransaction
executeTransactionMethods 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
-
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:TransactionOverride 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:
shouldBeExecutedin classTransaction- Returns:
- false if the transaction should not execute.
-
performOperations
protected void performOperations()Description copied from class:TransactionImplement this method for transaction execution.- Specified by:
performOperationsin classTransaction
-
hasColumn
-
addColumn
-
dropTable
-
renameTable
-
dropForeignKeys
-
ensureNoForeignKeyConstraints
-
allValuesHaveValueZero
-
columnVarcharLength
-