OJS 3.3.0.22 Upgrade Completed – Database Default is utf8mb4 but All Tables Still Use latin1_swedish_ci. Is Direct Upgrade to OJS 3.4/3.5 Recommended?

Dear OJS Support - All IT Engineer (Cc; Alex_Smecher)

I have successfully upgraded my legacy OJS installation to OJS 3.3.0.22 in a Docker staging environment without any issues.

My upgrade history is as follows:

Version Installed
2.4.8.0 2016-02-19
2.4.8.5 2023-05-09
3.0.2.0 2023-05-11
3.1.2.4 2023-05-11
3.2.1.4 2023-05-11
3.3.0.13 2023-05-11
3.3.0.22 2026-07-28

Database Audit

I performed a database audit before planning the next upgrade.

The database default settings are:

Database      : ojs33_staging
Character Set : utf8mb4
Collation     : utf8mb4_unicode_ci

However, after auditing the tables, I found that almost all tables still use the legacy collation:

latin1_swedish_ci : 150 tables
NULL (View)       : 1 object (v_ref_jurnal table)

So the current situation is:

  • Database default character set = utf8mb4
  • Database default collation = utf8mb4_unicode_ci
  • Existing tables = latin1_swedish_ci

*This appears to be inherited from the original OJS 2.4.x installation.
*
My Question

Before proceeding to OJS 3.4.x and later 3.5.x, I would like to ask:

  1. Is it safe to upgrade directly while the existing tables are still using latin1_swedish_ci?
  2. Would PKP recommend converting all existing tables to utf8mb4_unicode_ci before upgrading to OJS 3.4/3.5?
  3. Or is it better to complete the application upgrade first (3.3 → 3.4 → 3.5) and perform the character set/collation conversion afterward?

I would appreciate your recommendation on the safest migration strategy for a long-lived OJS installation that originated from OJS 2.4.x.

Thank you very much for your guidance.

Hi @rindoherdianto,

This is more of a DBMS question than an OJS question. OJS has always worked with UTF8, so it’s likely that the tables that are marked latin1_swedish_ci are incorrectly configured and actually contain UTF8 data (possibly double-encoded). The mixture of different configurations is probably caused by a change in MySQL defaults; MySQL used to create databases with a latin1_swedish_ci default, but later moved to UTF8.

You’re going to want to make sure everything is consistently created and encoded. The best way to do that is probably to dump the database to a file and review the various CREATE TABLE statements etc.

There are some related threads you could review:

Regards,
Alec Smecher
Public Knowledge Project Team

Hi Alec,

Thank you very much for your explanation and for pointing me to those related threads.

Your comments about the legacy latin1_swedish_ci tables and the possibility of UTF-8 data stored in legacy structures are very helpful. I’ll carefully review the discussions you shared and compare them with the behavior I’m seeing in my staging environment before making any changes to the database.

I appreciate your guidance. It gives me a good direction for continuing the investigation.

Best regards,

Rindo Herdianto