mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-03 22:16:34 +00:00
Fix upgrader checking wrong conifg file version
Signed-off-by: BuildTools <[email protected]>
This commit is contained in:
1 parent
5c16573f39
commit
f589ffe6ea
1 file changed
+1
-1
@@ -14,7 +14,7 @@ public class UpgradeDatabase {
|
|||||||
// Upgrade the database system if the config file version is not high enough
|
// Upgrade the database system if the config file version is not high enough
|
||||||
public static void upgradeDatabase() {
|
public static void upgradeDatabase() {
|
||||||
plugin.reloadConfig();
|
plugin.reloadConfig();
|
||||||
if (plugin.getConfig().getInt("config_file_version", 1) > 5) {
|
if (plugin.getConfig().getInt("config_file_version", 1) <= 5) {
|
||||||
plugin.getLogger().info("Detected that the database needs updating. Running database upgrade...");
|
plugin.getLogger().info("Detected that the database needs updating. Running database upgrade...");
|
||||||
Bukkit.getScheduler().runTaskAsynchronously(plugin, () -> {
|
Bukkit.getScheduler().runTaskAsynchronously(plugin, () -> {
|
||||||
try (PreparedStatement statement = HuskHomes.getConnection().prepareStatement("ALTER TABLE " + HuskHomes.getSettings().getPlayerDataTable() + " ADD `is_ignoring_requests` boolean NOT NULL DEFAULT 0")) {
|
try (PreparedStatement statement = HuskHomes.getConnection().prepareStatement("ALTER TABLE " + HuskHomes.getSettings().getPlayerDataTable() + " ADD `is_ignoring_requests` boolean NOT NULL DEFAULT 0")) {
|
||||||
|
|||||||
Reference in new issue
Block a user