Question: I am trying to update column names. When...
# orm-help
g
Question: I am trying to update column names. When I run yarn migrate dev, I get "Prisma Migrate could not create the shadow database. Please make sure the database user has permission to create databases. Read more about the shadow database (and workarounds) at https://pris.ly/d/migrate-shadow". This isn't my repo nor Heroku. My question is, how would the owner go about giving me access to update column names? Or is it something simpler?
1
h
Hey @Greg Renfro 👋 Would you mind telling me what database provider you're using? Often, this permission thing is related to that 😅
g
Ugh. We are using Postgres. 🤦.
h
@Greg Renfro alright. For PostgreSQL, you can do:
Copy code
GRANT x TO y;
GRANT x TO y;
In your case, it'd be
pg-write-all-data
and
pg-read-all-data
.
I generally use the root user on PostgreSQL, but if you're unable to, then I suggest doing this. Also, your user needs to be able to connect to your database, but that's granted by default.
n
Just to add, here’s a reference to permissions table which lists database-specific permissions required to create shadow database.
g
So if I have permissions for postgres, can I update and create tables in prisma? I've done it in postgres with the cli, but was curious with prisma
n
If you have CREATEDB permission in PostgreSQL then you could use
prisma migrate dev
command to generate migrations.