mirror of
https://github.com/Zrips/Jobs.git
synced 2025-02-18 05:11:32 +01:00
Fixed issue when converted the database and the "truncate" is removed in latest sqlite
- Also fixed issue when converted then the player data not show to player
This commit is contained in:
parent
34dcb3d41a
commit
1f85c13335
@ -53,7 +53,6 @@ public class convert implements Cmd {
|
|||||||
|
|
||||||
Jobs.getJobsDAO().saveExplore();
|
Jobs.getJobsDAO().saveExplore();
|
||||||
Jobs.getJobsDAO().saveBlockProtection();
|
Jobs.getJobsDAO().saveBlockProtection();
|
||||||
Jobs.loadAllPlayersData();
|
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
Jobs.consoleMsg("&cCan't write data to data base, please send error log to dev's.");
|
Jobs.consoleMsg("&cCan't write data to data base, please send error log to dev's.");
|
||||||
@ -62,6 +61,8 @@ public class convert implements Cmd {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
Jobs.reload();
|
Jobs.reload();
|
||||||
|
|
||||||
|
Jobs.loadAllPlayersData();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
@ -1035,7 +1035,7 @@ public abstract class JobsDAO {
|
|||||||
try {
|
try {
|
||||||
statement = conns.createStatement();
|
statement = conns.createStatement();
|
||||||
if (Jobs.getDBManager().getDbType().toString().equalsIgnoreCase("sqlite")) {
|
if (Jobs.getDBManager().getDbType().toString().equalsIgnoreCase("sqlite")) {
|
||||||
statement.executeUpdate("TRUNCATE TABLE `" + getPrefix() + table + "`");
|
statement.executeUpdate("DELETE from `" + getPrefix() + table + "`");
|
||||||
} else {
|
} else {
|
||||||
statement.executeUpdate("DELETE from `" + getPrefix() + table + "`");
|
statement.executeUpdate("DELETE from `" + getPrefix() + table + "`");
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ public class JobsManager {
|
|||||||
File f = new File(Jobs.getFolder(), "generalConfig.yml");
|
File f = new File(Jobs.getFolder(), "generalConfig.yml");
|
||||||
YamlConfiguration config = YamlConfiguration.loadConfiguration(f);
|
YamlConfiguration config = YamlConfiguration.loadConfiguration(f);
|
||||||
|
|
||||||
config.set("storage.method", DbType.toString());
|
config.set("storage.method", DbType.toString().toLowerCase());
|
||||||
try {
|
try {
|
||||||
config.save(f);
|
config.save(f);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user