Skip to content

Upgrade from 6.25.0 to 6.30.0, migration fails #27433

@castaway

Description

@castaway

Issue Summary

✖ Restarting Ghost
A GhostError occurred.

Message: Ghost was able to start, but errored during boot with: alter table `gifts` add constraint `gifts_buyer_member_id_foreign` foreign key (`buyer_member_id`) references `members` (`id`) on delete SET NULL - Referencing column 'buyer_member_id' and referenced column 'id' in foreign key constraint 'gifts_buyer_member_id_foreign' are incompatible.
Help: Error occurred while executing the following migration: 2026-04-06-07-48-06-add-gifts-tabl
e.js
Debug Information:
    OS: Debian GNU/Linux, v11
    Node Version: v22.21.1
    Ghost Version: 6.30.0
    Ghost-CLI Version: 1.29.1
    Environment: production
    Command: 'ghost update'

Accepted solution to revert back to 6.25.0 - any ideas?

Steps to Reproduce

Ran: npx ghost update, expected latest version to be installed

Ghost Version

6.30.0

Node.js Version

22.21.1

How did you install Ghost?

manually (back on initial release, pre v2 !)

Database type

MySQL 8

Browser & OS version

No response

Relevant log / error output

Debug Information:
    OS: Debian GNU/Linux, v11
    Node Version: v22.21.1
    Ghost Version: 6.30.0
    Ghost-CLI Version: 1.29.1
    Environment: production
    Command: 'ghost update'
Message: The database migration in Ghost encountered an error.
Help: https://ghost.org/docs/faq/
Suggestion: ghost update --rollback
--------------- stderr ---------------
/usr/src/ghost/versions/6.30.0/node_modules/.pnpm/@tryghost+errors@1.3.13/node_modules/@tryghost/errors/cjs/wrap-stack.js:25
  const extraLine = (err.stack?.split(/\n/g) || [])[1];
                               ^

SyntaxError: Unexpected token '.'
    at wrapSafe (internal/modules/cjs/loader.js:915:16)
    at Module._compile (internal/modules/cjs/loader.js:963:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)

Code of Conduct

  • I agree to be friendly and polite to people in this repository

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs:triage[triage] this needs to be triaged by the Ghost team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions