Add SQL to change messages column to utf8mB4

Former-commit-id: 00219d261d314e2b499ef33987edfae9b6ecd03a
This commit is contained in:
Ghost_chu committed 2020-01-06 13:24:51 +08:00
1 parent 7a7a4c64f6
commit bc687db1e8
1 file changed
+11
@@ -76,6 +76,17 @@ 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) {