Unable to upgrade Ghost from v6.23.0 to v6.44.1

Hi there! Can’t update Ghost CMS to last version.

✔ Checking for latest Ghost version
✔ Checking system Node.js version - found v22.22.3
ℹ Ensuring user is not logged in as ghost user [skipped]
ℹ Checking if logged in user is directory owner [skipped]
✔ Checking current folder permissions
✔ Checking memory availability
✔ Checking free space
✔ Checking pnpm installation - found corepack v0.34.6
✔ Checking for available migrations

# v6.44.1

* 🎨 Include site title in members export filename (frontend) (#28358) - Puneet Dixit
* 🎨 Included site name in members CSV export filename (#28362) - amal-hafis
* 🐛 Fixed sidebar member count drifting out of sync with the members list (#28191) - Jonatan Svennberg

---

View the changelog for full details: https://github.com/TryGhost/Ghost/compare/v6.44.0...v6.44.1

✔ Fetched release notes
✔ Downloading and updating Ghost to v6.44.1
✔ Stopping Ghost
✔ Linking latest Ghost and recording versions
✔ Linking built-in themes
✖ Restarting Ghost
A GhostError occurred.

Message: Ghost was able to start, but errored during boot with: alter table `automated_emails` modify  `email_design_setting_id` varchar(24) not null  - Cannot change column 'email_design_setting_id': used in a foreign key constraint 'automated_emails_email_design_setting_id_foreign'
Context: [object Object]
Help: Error occurred while executing the following migration: 2026-03-31-20-31-19-drop-nullable-on-automated-emails-email-design-setting-id.js

Debug Information:
    OS: Ubuntu, v24.04.4 LTS
    Node Version: v22.22.3
    Ghost Version: 6.44.1
    Ghost-CLI Version: 1.29.3
    Environment: production
    Command: 'ghost update'

Log…

Debug Information:
    OS: Ubuntu, v24.04.4 LTS
    Node Version: v22.22.3
    Ghost Version: 6.44.1
    Ghost-CLI Version: 1.29.3
    Environment: production
    Command: 'ghost update'
Message: Ghost was able to start, but errored during boot with: alter table `automated_emails` modify  `email_design_setting_id` varchar(24) not null  - Cannot change column 'email_design_setting_id': used in a foreign key constraint 'automated_emails_email_design_setting_id_foreign'
Context: [object Object]
Help: Error occurred while executing the following migration: 2026-03-31-20-31-19-drop-nullable-on-automated-emails-email-design-setting-id.js
Stack: Error: Ghost was able to start, but errored during boot with: alter table `automated_emails` modify  `email_design_setting_id` varchar(24) not null  - Cannot change column 'email_design_setting_id': used in a foreign key constraint 'automated_emails_email_design_setting_id_foreign'
    at ChildProcess.<anonymous> (/usr/lib/node_modules/ghost-cli/lib/utils/local-process.js:75:35)
    at ChildProcess.emit (node:events:519:28)
    at emit (node:internal/child_process:949:14)
    at process.processTicksAndRejections (node:internal/process/task_queues:90:21)

Ok. Let’s go deeper to mysql databse…

mysql> SHOW CREATE TABLE automated_emails\G
*************************** 1. row ***************************
       Table: automated_emails
Create Table: CREATE TABLE `automated_emails` (
  `id` varchar(24) NOT NULL,
  `status` varchar(50) NOT NULL DEFAULT 'inactive',
  `name` varchar(191) NOT NULL,
  `slug` varchar(191) NOT NULL,
  `subject` varchar(300) NOT NULL,
  `lexical` longtext,
  `sender_name` varchar(191) DEFAULT NULL,
  `sender_email` varchar(191) DEFAULT NULL,
  `sender_reply_to` varchar(191) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `automated_emails_name_unique` (`name`),
  UNIQUE KEY `automated_emails_slug_unique` (`slug`),
  KEY `automated_emails_slug_index` (`slug`),
  KEY `automated_emails_status_index` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
1 row in set (0.00 sec)

mysql --version 8.0.46-0ubuntu0.24.04.2 for Linux on x86_64.

I am not familiar with mysql bugs…

Ok. Nobody help, will solve my problem myself. Just need to add coloums to database

ALTER TABLE automated_emails ADD COLUMN email_design_setting_id varchar(24) NULL;

After that ghost start without issues.