DEV Community

Discussion on: How to set up a free PostgreSQL database on Heroku

Collapse
 
nikolasburk profile image
Nikolas Burk

Hey Andrew 👋 thanks for the comment! This is likely because Heroku doesn't provide enough access privileges on the PostgreSQL DB server to create the shadow database which is needed during the migration.

You can resolve this by creating a second database by following the instructions in the article once more, and then add the URL of the second DB as the value for the shadowDatabaseURL field on the datasource block as explained here:

datasource db {
  provider          = "postgresql"
  url               = env("DATABASE_URL")
  shadowDatabaseUrl = env("SHADOW_DATABASE_URL")
}
Enter fullscreen mode Exit fullscreen mode