Upgrade ghost failed - migration migration is into error state

Hello,

I am trying to do a ghost migration from the version 4.8.3 to the 4.9.3 version. However, I get the following error:

- Inspecting operating system
[2021-09-10 11:42:46] INFO Ghost is running in production...
[2021-09-10 11:42:46] INFO Your site is now available on https://x/
[2021-09-10 11:42:46] INFO Ctrl+C to shut down
[2021-09-10 11:42:46] INFO Ghost server started in 1.126s
[2021-09-10 11:42:47] WARN Database state requires migration.
[2021-09-10 11:42:49] INFO Creating database backup
[2021-09-10 11:42:49] INFO Database backup written to: /bitnami/ghost/content/data/x-blog.ghost.2021-09-10-11-42-49.json
[2021-09-10 11:42:49] INFO Adding posts_meta.feature_image_alt column
[2021-09-10 11:42:49] INFO Adding posts_meta.feature_image_caption column
[2021-09-10 11:42:49] INFO Adding "portal_products" record to "settings" table with product - 6092756d29bf23000188d5d7
[2021-09-10 11:42:49] INFO Skipping migration of newsletter_show_header setting. Matches new defaults
[2021-09-10 11:42:49] INFO Deleting newsletter_show_header setting
[2021-09-10 11:42:49] INFO Adding permission for resetAllPasswords:authentication
[2021-09-10 11:42:49] WARN Adding permission(Reset all passwords) to role(Administrator)
[2021-09-10 11:42:49] INFO Adding table: benefits
[2021-09-10 11:42:50] INFO Adding table: products_benefits
[2021-09-10 11:42:50] INFO Dropping table: products_benefits
[2021-09-10 11:42:50] INFO Dropping table: benefits
[2021-09-10 11:42:50] INFO Removing permission(Reset all passwords) from role(Administrator)
[2021-09-10 11:42:50] INFO Removing permission for resetAllPasswords:authentication
[2021-09-10 11:42:50] INFO Adding newsletter_show_header setting
[2021-09-10 11:42:50] INFO Deleting newsletter_show_header_{title,icon} settings
[2021-09-10 11:42:50] INFO Reverting portal_products setting to empty array
[2021-09-10 11:42:50] INFO Removing posts_meta.feature_image_caption column
[2021-09-10 11:42:50] INFO Removing posts_meta.feature_image_alt column
[2021-09-10 11:42:50] ERROR alter table `products_benefits` add constraint `products_benefits_product_id_foreign` foreign key (`product_id`) references `products` (`id`) on delete CASCADE - ER_CANT_CREATE_TABLE: Can't create table `x_blog_ghost`.`products_benefits` (errno: 150 "Foreign key constraint is incorrectly formed")

alter table `products_benefits` add constraint `products_benefits_product_id_foreign` foreign key (`product_id`) references `products` (`id`) on delete CASCADE - ER_CANT_CREATE_TABLE: Can't create table `x_blog_ghost`.`products_benefits` (errno: 150 "Foreign key constraint is incorrectly formed")

{"config":{"transaction":false},"name":"03-add-products-benefits-table.js"}
"Error occurred while executing the following migration: 03-add-products-benefits-table.js"

Error ID:
    300

Error Code: 
    ER_CANT_CREATE_TABLE

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

InternalServerError: alter table `products_benefits` add constraint `products_benefits_product_id_foreign` foreign key (`product_id`) references `products` (`id`) on delete CASCADE - ER_CANT_CREATE_TABLE: Can't create table `x_blog_ghost`.`products_benefits` (errno: 150 "Foreign key constraint is incorrectly formed")
    at DatabaseStateManager.makeReady (/opt/bitnami/ghost/versions/4.9.3/core/server/data/db/state-manager.js:98:32)
    at async initDatabase (/opt/bitnami/ghost/versions/4.9.3/core/boot.js:57:5)
    at async bootGhost (/opt/bitnami/ghost/versions/4.9.3/core/boot.js:320:9)

Looking on the web, I can’t necessarily find anything about my problem. Some people talk about a knex problem.

Did I miss a step?

Hello,

I’ve looked on various places and it often talks about knex-migrator, is there an operation to fix it and trigger a migration correctly?