Fix an updater bug, remove the aspect and readd EngineIdUpdate.

This commit is contained in:
Olof Larsson
2014-09-17 16:15:33 +02:00
parent d35fb013d6
commit f0189c0f8f
4 changed files with 120 additions and 25 deletions

View File

@ -37,6 +37,8 @@ public class UpdateUtil
String universe = getUniverse();
if (universe == null) return;
Factions.get().log("Updating Database to New Version!");
// ... load the old uconf data ...
OldConfColls.get().init();
OldConf oldConf = OldConfColls.get().getForUniverse(universe).get(MassiveCore.INSTANCE, true);
@ -47,6 +49,10 @@ public class UpdateUtil
// ... rename target collections ...
Db db = MStore.getDb();
// The old mplayer data we don't care much for.
// Could even delete it but let's just move it out of the way.
db.getDriver().renameColl(db, Const.COLLECTION_MPLAYER, "old_"+Const.COLLECTION_MPLAYER);
db.getDriver().renameColl(db, "factions_board@" + universe, Const.COLLECTION_BOARD);
db.getDriver().renameColl(db, "factions_faction@" + universe, Const.COLLECTION_FACTION);
db.getDriver().renameColl(db, "factions_uplayer@" + universe, Const.COLLECTION_MPLAYER);
@ -112,8 +118,4 @@ public class UpdateUtil
return ret;
}
}