You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just stumbled into the COLLATION based migration issue discussed in #27652 ; However, while debugging this, I stumbled over a potential documentation issue and/or feature request.
For the issue explanation, please see "Steps to Reproduce".
Suggestions:
It would be good to better document this issue. Around Can't upgrade 6.26 to 6.27 or later because of a migration foreign key fail #27652 there is a lot of confusion by people on why what happens happens to them. The collation issue (and debugging steps, i.e., rechecking the collation Ghost creates tables with) are a bit unclear.
Setting the default collation explicitly when creating tables in migrations, ideally from a configuration setting/environment variable that can be handed to Ghost/the Ghost container. That way, as an operator, I at least have explicit control over collation.
Steps to Reproduce
The database was configured with a default collation of utf8mb4_general_ci from IaC
I dumped the DB again, imported it with utf8mb4_uca1400_ai_ci set instead, changed the default collation of the server etc. to that as well; The issue was resolved.
The core issue here seems to be that the migrations do not specify a COLLATION on table create, falling back to defaults. I did not find an option to force one via, e.g., a config option.
The behavior of the mysqld/docker client is somewhat tangential to the issue but related (I saw the init_connect being executed in the query log; No clue why this did not work. Same with a manual connection. Running the command there manual again hat the desired effect.)
Ghost Version
6.37.0
Node.js Version
docker container version
How did you install Ghost?
Docker
Database type
Other
Browser & OS version
Relevant log / error output
Code of Conduct
I agree to be friendly and polite to people in this repository
Issue Summary
I just stumbled into the COLLATION based migration issue discussed in #27652 ; However, while debugging this, I stumbled over a potential documentation issue and/or feature request.
For the issue explanation, please see "Steps to Reproduce".
Suggestions:
Steps to Reproduce
utf8mb4_general_cifrom IaCon migration2026-04-06-07-48-06-add-gifts-table.js` in Ghost 6.27.0 #27263 occurred during the DB migrationon migration2026-04-06-07-48-06-add-gifts-table.js` in Ghost 6.27.0 #27263 , but this did not lead to the issue disappearingALTER TABLEcommands could not be executed on all tables, as even disabling foreign key checks did not allow changing the collation on all tablesutf8mb4_0900_ai_ciand re-imported. The issue persistedutf8mb4_uca1400_ai_ci; I hence set in[mysqld]inmy.cnf:utf8mb4_uca1400_ai_ci:utf8mb4_uca1400_ai_ciset instead, changed the default collation of the server etc. to that as well; The issue was resolved.The core issue here seems to be that the migrations do not specify a COLLATION on table create, falling back to defaults. I did not find an option to force one via, e.g., a config option.
The behavior of the mysqld/docker client is somewhat tangential to the issue but related (I saw the
init_connectbeing executed in the query log; No clue why this did not work. Same with a manual connection. Running the command there manual again hat the desired effect.)Ghost Version
6.37.0
Node.js Version
docker container version
How did you install Ghost?
Docker
Database type
Other
Browser & OS version
Relevant log / error output
Code of Conduct