mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-25 01:49:49 -05:00
fix loop message issue
Former-commit-id: 6eed16e0c866153160357889c3bdbeba80cfe0ed
This commit is contained in:
1 parent
997f6f2e02
commit
33f25f3c15
1 file changed
-15
@@ -76,17 +76,6 @@ public class DatabaseHelper {
|
||||
} catch (SQLException e) {
|
||||
//ignore
|
||||
}
|
||||
if (QuickShop.instance.getDatabase().getCore() instanceof MySQLCore) {
|
||||
try {
|
||||
ps = db.getConnection().prepareStatement("ALTER TABLE " + QuickShop.instance
|
||||
.getDbPrefix() + "messages MODIFY COLUMN message text CHARACTER SET utf8mb4 NOT NULL AFTER owner");
|
||||
ps.execute();
|
||||
ps.close();
|
||||
} catch (SQLException e) {
|
||||
//ignore
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void cleanMessage(long weekAgo) {
|
||||
@@ -124,10 +113,6 @@ public class DatabaseHelper {
|
||||
Statement st = db.getConnection().createStatement();
|
||||
String createTable = "CREATE TABLE " + QuickShop.instance.getDbPrefix()
|
||||
+ "messages (owner VARCHAR(255) NOT NULL, message TEXT(25) NOT NULL, time BIGINT(32) NOT NULL );";
|
||||
if (plugin.getDatabase().getCore() instanceof MySQLCore) {
|
||||
createTable = "CREATE TABLE " + QuickShop.instance.getDbPrefix()
|
||||
+ "messages (owner VARCHAR(255) NOT NULL, message TEXT(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL , time BIGINT(32) NOT NULL );";
|
||||
}
|
||||
return st.execute(createTable);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user