mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-27 19:47:49 +01:00
parent
fd2e45b204
commit
1c4938a3db
@ -43,6 +43,15 @@ public class KillsOptimizationPatch extends Patch {
|
||||
@Override
|
||||
protected void applyPatch() {
|
||||
try {
|
||||
if (hasTable(tempTableName) && hasColumn(tempTableName, KillsTable.VICTIM_UUID)) {
|
||||
// In this case a patch has made a table with almost correct schema to a temporary table.
|
||||
renameTable(tempTableName, tableName);
|
||||
return;
|
||||
} else if (hasColumn(tableName, KillsTable.VICTIM_UUID)) {
|
||||
// In this case a patch has made a table with almost correct schema, but something is not right.
|
||||
return;
|
||||
}
|
||||
|
||||
tempOldTable();
|
||||
execute(KillsTable.createTableSQL(dbType));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user