mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-08-21 20:22:45 +02:00
[Fix] Patch system apply check
Wrong method was in use for database name setting retrieval, resulting in wrong query. Fixed by replacing usage with correct method Affected issues: #754
This commit is contained in:
parent
ca01c26a19
commit
b9027294ef
|
@ -457,6 +457,10 @@ public abstract class SQLDB extends Database {
|
|||
return serverUUIDSupplier;
|
||||
}
|
||||
|
||||
public PlanConfig getConfig() {
|
||||
return config;
|
||||
}
|
||||
|
||||
public NetworkContainer.Factory getNetworkContainerFactory() {
|
||||
return networkContainerFactory;
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ public abstract class Patch {
|
|||
public void prepare(PreparedStatement statement) throws SQLException {
|
||||
statement.setString(1, tableName);
|
||||
if (usingMySQL) {
|
||||
statement.setString(2, Settings.DB_DATABASE.toString());
|
||||
statement.setString(2, db.getConfig().getString(Settings.DB_DATABASE));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -58,7 +58,7 @@ public abstract class Patch {
|
|||
public void prepare(PreparedStatement statement) throws SQLException {
|
||||
statement.setString(1, tableName);
|
||||
statement.setString(2, columnName);
|
||||
statement.setString(3, Settings.DB_DATABASE.toString());
|
||||
statement.setString(3, db.getConfig().getString(Settings.DB_DATABASE));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -114,4 +114,13 @@ public enum Settings implements Setting {
|
|||
return configPath;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return What getPath returns
|
||||
* @deprecated Old access method used to return string value in config. Use {@link com.djrapitops.plan.system.settings.config.PlanConfig#getString(Setting)} instead
|
||||
*/
|
||||
@Deprecated
|
||||
@Override
|
||||
public String toString() {
|
||||
return getPath();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user