When trying to update to 5.30, 5.31 or 5.4, I get the same error, causing the upgrade to fail:
Message: Ghost was able to start, but errored during boot with: alter table comments add constraint comments_post_id_foreign foreign key (post_id) references posts (id) on delete CASCADE - Referencing column ‘post_id’ and referenced column ‘id’ in foreign key constraint ‘comments_post_id_foreign’ are incompatible.
-bash: syntax error near unexpected token `(‘
At a bit of a loss as how to address this. Anyone?
This is almost certainly related to a database migrated from MySQL 5 to 8. I have three installs running on Digital Ocean droplets - the one that’s always been on MySQL 8 updated fine, the two that were migrated from 5 to 8 for Ghost 5 are the ones failing.
So, I have a clearer idea of the problem - but not how to fix it!