SOLVED - Ghost boot error - Error occurred while executing the following migration: 02-add-members-products-table.js

Hi all,

After trying to run ghost update v4, now whenever I try to start ghost with ghost start I get this error:

Message: Ghost was able to start, but errored during boot with: alter table `members_products` add constraint `members_products_member_id_foreign` foreign key (`member_id`) references `members` (`id`) on delete CASCADE - Referencing column 'member_id' and referenced column 'id' in foreign key constraint 'members_products_member_id_foreign' are incompatible.
Help: Error occurred while executing the following migration: 02-add-members-products-table.js
Suggestion: journalctl -u ghost_prod-db -n 50

Debug Information:
    OS: Ubuntu, v20.04.2 LTS
    Node Version: v16.15.1
    Ghost Version: 4.48.1
    Ghost-CLI Version: 1.21.0
    Environment: production
    Command: 'ghost start'

Not sure where to go from here as ghost doctor doesn’t return any errors. Any ideas? It was working fine on v4.1.2.

I have a feeling it’s related to Unable to upgrade Ghost from v4.2.0 to v4.3.0 (CASCADE - UNKNOWN_CODE_PLEASE_REPORT) but following the instructions didn’t seem to work.

In case anyone else experiences this issue, I connected to my database using DBeaver and just went through all the tables and changed all fields and tables to utf8mb4_general_ci collation (whatever that means).

Now it works.