Can't upgrade from 2.25.8 to latest

If you’re looking for some help, it’s important to provide as much context as possible so that people are able to assist you. Try to always mention:

  • What’s your URL? This is the easiest way for others to debug your issue

  • What version of Ghost are you using?

  • What configuration?
    eh? I run it in a container. It’s auto-built based on the current latest version

I tried to upgrade from 2.25.8 to 2.whatever-latest-is, twice (a few months ago last time). I get this problem in the logs:

[2019-10-15 21:40:56] e[36mINFOe[39m Dropping members.note
[2019-10-15 21:40:56] e[31mERRORe[39m show columns from `members_stripe_customers` - ER_NO_SUCH_TABLE: Table 'ghost_production.members_stripe_customers' doesn't exist
[31mshow columns from `members_stripe_customers` - ER_NO_SUCH_TABLE: Table 'ghost_production.members_stripe_customers' doesn't existe[39m
[37m"OuterError: insert into `integrations` (`created_at`, `created_by`, `description`, `icon_image`, `id`, `name`, `slug`, `type`, `updated_at`, `updated_by`) values ('2019-10-15 21:40:56', '1', 'Internal DB Backup integration', NULL, '5da63ce8aeb7dd00019d68bf', 'Ghost Backup', 'ghost-backup', 'internal', '2019-10-15 21:40:56', '1') - ER_BAD_FIELD_ERROR: Unknown column 'type' in 'field list'"e[39m

If I go back to the previous version of my container, I can start up, but I guess the migrator has nothign to do.

I’ll try ghost doctor on it, but so far, nothing seams to want to upgrade it. Any ideas?

Hi there. Did you try ghost doctor? What was the output?

ghost doctor said nothing at all useful. Told me I’m not on ubuntu (no kidding, I’m in a container, on Amazon Linux 2), and everything else was fine.

Ended up in the source code. The original error around members_stripe_customers had nothing at all to do with it. It was the outer error which was the problem

"OuterError: insert into `integrations` (`created_at`, `created_by`, `description`, `icon_image`, `id`, `name`, `slug`, `type`, `updated_at`, `updated_by`) values ('2019-10-16 19:04:48', '1', 'Internal DB Backup integration', NULL, '5da769d06c5a73000138b61a', 'Ghost Backup', 'ghost-backup', 'internal', '2019-10-16 19:04:48', '1') - ER_BAD_FIELD_ERROR: Unknown column 'type' in 'field list'"e

so yeah. Nice error reporting.

This fixed it:

alter table integrations add column type varchar(50) not null default 'custom';

Based on the schema for integrations.

Something happens almost every time I upgrade.