mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-24 17:39:52 -05:00
Fix Table 'qs_shops' already exists error
Former-commit-id: 49d2a2156d9f0a90c72c9029210104b17ce6c988 [formerly 4791eb854d8f89598d8d720060e4bfe863c3f362] Former-commit-id: d4cdd41e731ea12b3d4f1db212bb6b7948fc3911
This commit is contained in:
1 parent
971b04ab7a
commit
b506a04928
3 files changed
+6
-7
No files matched your search
@@ -11,13 +11,13 @@ import org.maxgamer.quickshop.Util.Util;
|
||||
public class DatabaseHelper {
|
||||
public static void setup(Database db) throws SQLException {
|
||||
connectCheck();
|
||||
if (!db.hasTable("shops")) {
|
||||
if (!db.hasTable(QuickShop.instance.dbPrefix+"shops")) {
|
||||
createShopsTable(db);
|
||||
}
|
||||
if (!db.hasTable("messages")) {
|
||||
if (!db.hasTable(QuickShop.instance.dbPrefix+"messages")) {
|
||||
createMessagesTable(db);
|
||||
}
|
||||
if (!db.hasTable("schedule")) {
|
||||
if (!db.hasTable(QuickShop.instance.dbPrefix+"schedule")) {
|
||||
createScheduleTable(db);
|
||||
}
|
||||
checkColumns(db);
|
||||
|
||||
@@ -693,14 +693,14 @@ public class QuickShop extends JavaPlugin {
|
||||
DatabaseCore dbCore;
|
||||
if (dbCfg.getBoolean("mysql")) {
|
||||
// MySQL database - Required database be created first.
|
||||
dbPrefix = dbCfg.getString("prefix");
|
||||
if (dbPrefix==null || dbPrefix.equals("none"))
|
||||
dbPrefix = "";
|
||||
String user = dbCfg.getString("user");
|
||||
String pass = dbCfg.getString("password");
|
||||
String host = dbCfg.getString("host");
|
||||
String port = dbCfg.getString("port");
|
||||
String database = dbCfg.getString("database");
|
||||
dbPrefix = dbCfg.getString("prefix");
|
||||
if (dbPrefix==null||dbPrefix.equals("none"))
|
||||
dbPrefix = "";
|
||||
dbCore = new MySQLCore(host, user, pass, database, port);
|
||||
} else {
|
||||
// SQLite database - Doing this handles file creation
|
||||
|
||||
Reference in new issue
Block a user