Like many people I am using a Digital Ocean 1 Click app that I have been maintaining over time. At some point in upgrading Ubuntu I have accidentally upgraded MySQL to version 8 which caused issues with the collation on tables which is well documented.
I have been able to correct the install by setting the default collation for my database and correcting all tables that had the wrong collation. I did however have two migrations which kept failing to run. These were 01-add-oauth-user-data
and 02-add-members-products-events-table
respectively. I’d have thought that by setting the relevant default collation on my database that these migrations would successfully run. The only way I was able to fix my issue was by creating the table definitions manually in SQL and then it ran correctly.
Does Ghost use a specific collation when doing migrations? Were these migrations in a broken state because they were partially done and failed? How can I best prepare for more upgrades in the future that might add new tables knowing that I am running MySQL 8?