Can I work around this somehow? Running this comma...
# prisma-migrate
d
Can I work around this somehow? Running this command:
DATABASE_URL=$(heroku config:get DATABASE_URL -a foodsy-db) prisma migrate dev --create-only --preview-feature
Copy code
Error: A migration failed when applied to the shadow database:


Database error: Error querying the database: db error: ERROR: permission denied to create database
Can I create the db manually? Or am I supossed to run deploy for this use case? 🤔
m
I had this issue before and it's because you don't have access to create databases on Heroku. Prisma needs a shadow database for the migration. It was only a dev database that's why I replaced it with a local postgres one. 🙂
d
I see, do you use docker compose for the local Postgres instance? Would you be willing to share your docker-compose? (message below 😅 )
Just created one actually, thanks for confirming
m
No, I never used docker tbh 😄
t
Hey! I see you already found a way to run postgres locally, so that looks solved, but this is definitely we (the migrate team) are seeing as "not a nice user experience" and working on fixing. The shadow database is a hard requirement, but we are working on making it as easy to have a working setup as possible.
👍 1
a
This is the GH issue for being able to configure a shadow database if it’s not possible to grant privileges for creating databases: https://github.com/prisma/prisma/issues/4751