mirror of
https://github.com/amalthea-mc/ShopChest.git
synced 2024-12-22 17:11:46 +00:00
Specify database connection test queries
Should fix database connection error on older Minecraft versions
This commit is contained in:
parent
6962ad995e
commit
404c872396
@ -24,6 +24,7 @@ public class MySQL extends Database {
|
||||
Config.databaseMySqlHost, Config.databaseMySqlPort, Config.databaseMySqlDatabase));
|
||||
config.setUsername(Config.databaseMySqlUsername);
|
||||
config.setPassword(Config.databaseMySqlPassword);
|
||||
config.setConnectionTestQuery("SELECT 1");
|
||||
|
||||
return new HikariDataSource(config);
|
||||
}
|
||||
|
@ -35,6 +35,7 @@ public class SQLite extends Database {
|
||||
|
||||
HikariConfig config = new HikariConfig();
|
||||
config.setJdbcUrl(String.format("jdbc:sqlite:" + dbFile));
|
||||
config.setConnectionTestQuery("SELECT 1");
|
||||
|
||||
return new HikariDataSource(config);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user