I’m trying to update Ghost 3.5 to 3.7 (or later) but there is an migration error.
$ ghost update 3.7.0 --force ✔ Checking for latest Ghost version ✔ Downloading and updating Ghost to v3.7.0 + sudo systemctl stop ghost_blog-quangnv-com ✔ Stopping Ghost ✔ Linking latest Ghost and recording versions + sudo systemctl start ghost_blog-quangnv-com + sudo systemctl stop ghost_blog-quangnv-com ✖ Restarting Ghost A GhostError occurred. Message: alter table `members_labels` add constraint `members_labels_member_id_foreign` foreign key (`member_id`) references `members` (`id`) - UNKNOWN_CODE_PLEASE_REPORT: Referencing column 'member_id' and referenced column 'id' in foreign key constraint 'members_labels_member_id_foreign' are incompatible. Help: Error occurred while executing the following migration: 2-add-members-labels-table.js Suggestion: journalctl -u ghost_blog -n 50 Debug Information: OS: Ubuntu, v20.04 LTS Node Version: v12.16.2 Ghost Version: 3.7.0 Ghost-CLI Version: 1.13.1 Environment: production Command: 'ghost update 3.7.0 --force' ? Unable to upgrade Ghost from v3.5.0 to v3.7.0. Would you like to revert back to v3.5.0? Yes
I found a related issue on GitHub
version 3.6 did have a schema bug causing the foreign key constraint error, we have released 3.7 which should fix this. Please upgrade directly to latest version and this should be resolved.
But I don’t know how to do a “direct upgrade”. Please help.
(I haven’t used Ghost for a long time).