Strange Error with Ghost Docker

Anyone know what these errors mean?

e[33m"Error occurred while executing the following migration: 2-create-fixtures.js"e[39m
Error: ER_BAD_FIELD_ERROR: Unknown column 'description' in 'field list'

This results in my docker failing to start.

Resolving a misconfigured MySQL database with Ghost - Ghost Developers :)

Okay so I’ve found the option in phpMyAdmin and hopefully turned off the ANSI mode. No change in the error output. Is there a way to turn off ANSI mode in the database itself and not globally?

There are three ghost blogs running on the one MariaDB installation. The other two have no issues, only this one. I have dropped the database and imported it again…no joy.

I tried making a new MariaDB docker and imported this database. Still the same error.

There has to be a command inside the database itself.

Still get this working. Here’s the new output.

[2021-09-11 16:43:00] ERROR create table `products` (`id` varchar(24) not null, `name` varchar(191) not null, `slug` varchar(191) not null, `monthly_price_id` varchar(24) null, `yearly_price_id` varchar(24) null, `description` varchar(191) null, `created_at` datetime not null, `updated_at` datetime null) default character set utf8mb4 - ER_CANT_CREATE_TABLE: Can't create table `ghosttechnomnom`.`products` (errno: 150 "Foreign key constraint is incorrectly formed")

create table `products` (`id` varchar(24) not null, `name` varchar(191) not null, `slug` varchar(191) not null, `monthly_price_id` varchar(24) null, `yearly_price_id` varchar(24) null, `description` varchar(191) null, `created_at` datetime not null, `updated_at` datetime null) default character set utf8mb4 - ER_CANT_CREATE_TABLE: Can't create table `ghosttechnomnom`.`products` (errno: 150 "Foreign key constraint is incorrectly formed")

{"name":"1-create-tables.js"}
"Error occurred while executing the following migration: 1-create-tables.js"

Error ID:
300

Error Code:
ER_CANT_CREATE_TABLE

----------------------------------------

InternalServerError: create table `products` (`id` varchar(24) not null, `name` varchar(191) not null, `slug` varchar(191) not null, `monthly_price_id` varchar(24) null, `yearly_price_id` varchar(24) null, `description` varchar(191) null, `created_at` datetime not null, `updated_at` datetime null) default character set utf8mb4 - ER_CANT_CREATE_TABLE: Can't create table `ghosttechnomnom`.`products` (errno: 150 "Foreign key constraint is incorrectly formed")
at DatabaseStateManager.makeReady (/var/lib/ghost/versions/4.11.0/core/server/data/db/state-manager.js:98:32)
at async initDatabase (/var/lib/ghost/versions/4.11.0/core/boot.js:57:5)
at async bootGhost (/var/lib/ghost/versions/4.11.0/core/boot.js:322:9)

MigrationScriptError: create table `products` (`id` varchar(24) not null, `name` varchar(191) not null, `slug` varchar(191) not null, `monthly_price_id` varchar(24) null, `yearly_price_id` varchar(24) null, `description` varchar(191) null, `created_at` datetime not null, `updated_at` datetime null) default character set utf8mb4 - ER_CANT_CREATE_TABLE: Can't create table `ghosttechnomnom`.`products` (errno: 150 "Foreign key constraint is incorrectly formed")
at MigrationScriptError.KnexMigrateError (/var/lib/ghost/versions/4.11.0/node_modules/knex-migrator/lib/errors.js:7:26)
at new MigrationScriptError (/var/lib/ghost/versions/4.11.0/node_modules/knex-migrator/lib/errors.js:25:26)
at /var/lib/ghost/versions/4.11.0/node_modules/knex-migrator/lib/index.js:1055:19

Error: ER_CANT_CREATE_TABLE: Can't create table `ghosttechnomnom`.`products` (errno: 150 "Foreign key constraint is incorrectly formed")
at Query.Sequence._packetToError (/var/lib/ghost/versions/4.11.0/node_modules/mysql/lib/protocol/sequences/Sequence.js:47:14)
at Query.ErrorPacket (/var/lib/ghost/versions/4.11.0/node_modules/mysql/lib/protocol/sequences/Query.js:79:18)
at Protocol._parsePacket (/var/lib/ghost/versions/4.11.0/node_modules/mysql/lib/protocol/Protocol.js:291:23)
at Parser._parsePacket (/var/lib/ghost/versions/4.11.0/node_modules/mysql/lib/protocol/Parser.js:433:10)
at Parser.write (/var/lib/ghost/versions/4.11.0/node_modules/mysql/lib/protocol/Parser.js:43:10)
at Protocol.write (/var/lib/ghost/versions/4.11.0/node_modules/mysql/lib/protocol/Protocol.js:38:16)
at Socket.<anonymous> (/var/lib/ghost/versions/4.11.0/node_modules/mysql/lib/Connection.js:88:28)
at Socket.<anonymous> (/var/lib/ghost/versions/4.11.0/node_modules/mysql/lib/Connection.js:526:10)
at Socket.emit (events.js:400:28)
at addChunk (internal/streams/readable.js:290:12)
at readableAddChunk (internal/streams/readable.js:265:9)
at Socket.Readable.push (internal/streams/readable.js:204:10)
at TCP.onStreamRead (internal/stream_base_commons.js:188:23)
--------------------
at Protocol._enqueue (/var/lib/ghost/versions/4.11.0/node_modules/mysql/lib/protocol/Protocol.js:144:48)
at Connection.query (/var/lib/ghost/versions/4.11.0/node_modules/mysql/lib/Connection.js:198:25)
at /var/lib/ghost/versions/4.11.0/node_modules/knex/lib/dialects/mysql/index.js:134:18
at new Promise (<anonymous>)
at Client_MySQL._query (/var/lib/ghost/versions/4.11.0/node_modules/knex/lib/dialects/mysql/index.js:128:12)
at Client_MySQL.query (/var/lib/ghost/versions/4.11.0/node_modules/knex/lib/client.js:168:17)
at Runner.query (/var/lib/ghost/versions/4.11.0/node_modules/knex/lib/runner.js:151:36)
at Runner.queryArray (/var/lib/ghost/versions/4.11.0/node_modules/knex/lib/runner.js:248:31)
at /var/lib/ghost/versions/4.11.0/node_modules/knex/lib/runner.js:38:25
at /var/lib/ghost/versions/4.11.0/node_modules/knex/lib/runner.js:277:24
at processTicksAndRejections (internal/process/task_queues.js:95:5)

[2021-09-11 16:43:00] WARN Ghost is shutting down
[2021-09-11 16:43:00] WARN Ghost has shut down
[2021-09-11 16:43:00] WARN Your site is now offline
[2021-09-11 16:43:00] WARN Ghost was running for a few seconds