#494 Fix conversion plaintext to SHA256

- Make sure database is set up before attempting to perform the migration
This commit is contained in:
ljacqu
2016-02-20 11:13:13 +01:00
parent fd89915071
commit 8511a257ed
8 changed files with 122 additions and 59 deletions
@@ -20,7 +20,10 @@ public class ReloadCommand implements ExecutableCommand {
try {
commandService.getSettings().reload();
commandService.reloadMessages(commandService.getSettings().getMessagesFile());
plugin.setupDatabase();
// TODO #432: We should not reload only certain plugin entities but actually reinitialize all elements,
// i.e. here in the future we might not have setupDatabase() but Authme.onEnable(), maybe after
// a call to some destructor method
plugin.setupDatabase(commandService.getSettings());
commandService.send(sender, MessageKey.CONFIG_RELOAD_SUCCESS);
} catch (Exception e) {
sender.sendMessage("Error occurred during reload of AuthMe: aborting");