The issue is not reproducible by using the DO one-click install as-is, starting Ghost 3.0 updating to 4.2 and then upgrading to 4.3. We’ve also successfully updated thousands of production sites.
The problem is environment related, likely to do with having updated across major mysql versions at some point (probably as a side effect of updating ubuntu) - this is a database administration issue and is not something Ghost can control. Please do not @ our staff members for support with self-hosting issues - this is a community forum & we will help out when we can.
The error is telling you two tables in your DB are incompatible - members and members_products:
UNKNOWN_CODE_PLEASE_REPORT: Referencing column ‘member_id’ and referenced column ‘id’ in foreign key constraint ‘members_products_member_id_foreign’ are incompatible.
There’s likely a setting in MySQL causing the issue somewhere: charset/collation is my first guess but it could be a row format or sql mode issue too etc.
To debug collation issues, you need to check collation on both the table with the foreign key and the table being referenced.
Run this on both tables:
show full columns from members;
show full columns from members_products;
And also look at your global collations:
SELECT @@character_set_database, @@collation_database;
Your charset should be utf8mb4
and your collation should be utf8mb4_general_ci
.
For further debugging, you can look up SQL modes as follows:
SELECT @@GLOBAL.sql_mode, @@SESSION.sql_mode;
You can look up row formats to ensure they are all set to Dynamic as follows:
SELECT `table_name`, `row_format`
FROM `information_schema`.`tables`
WHERE `table_schema`=DATABASE();
The ANSI
and ANSI_QUOTES
SQL modes are not supported and should be disabled.