Search code examples
postgresqlherokustrapi

Strapi V3 to V4 database migration issue


I am trying to migrate Strapi V3 to V4 using the migration scripts for Postgres

I have a backup V3 and an empty V4 database running on Heroku.

The problem is when I run Strapi migration Script: v3-sql-to-v4-sql, I get a following error:

(node:17788) UnhandledPromiseRejectionWarning: error: set session_replication_role to replica; - permission denied to set parameter "session_replication_role"

Does anyone have idea why this error is happening?


Solution

  • I was trying to do the database migration on HEROKU, where you can't set the replication role to 'replica'.

    What you have to do is pull the database locally, spin up a server and from there run migration scripts. Once you are done - push the database back to HEROKU.