MigrationError: Migration core::5.0.0-discard-drafts (up) failed

Hey folks, while running Strapi 5 in a existing Strapi 4 database, I got the following error:

MigrationError: Migration core::5.0.0-discard-drafts (up) failed: Original error: insert into "categories" ("contentful_id", "created_at", "created_by_id", "document_id", "locale", "name", "published_at", "slug", "updated_at", "updated_by_id") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) returning "id" - current transaction is aborted, commands ignored until end of transaction block

looks like it’s coming from this line

I’m running Strapi 5.2.0

This topic has been created from a Discord post (1301785343284088862) to give it more visibility.
It will be on Read-Only mode here.
Join the conversation on Discord