"P4001 The introspected database was empty" unless run with postgres user #3041
Labels
bug/0-unknown
Bug is new, does not have information for reproduction or reproduction could not be confirmed.
kind/bug
A reported bug.
topic: introspection
Bug description
Trying to run
npx prisma instropect
to generate the schema but it fails. I am using a user that was generated specifically for this database and has a grant all on the very same database.How to reproduce
Just executing the command is enough
Expected behavior
The schema file is generated automatically
Prisma information
N/A
Environment & setup
@prisma/cli : 2.2.2
Current platform : darwin
I can connect from another clients like Postico or pgAdmin with the same user/password I am using in the DB connection and I can see the tables just fine. I run a grant all on this user to the same database.
At first I thought it was that my random generated password for the user had a '@' or '?' and that was breaking the connection string, but eventually I tried it with my postgres user and it worked, so I have to assume this is a permissions issue.
I really don't like to have my root user for this so I was wondering what are the minimum permissions the user need for the introspect to work so I can grant that to the prisma user. I don't see that in the docs.
Thanks!
The text was updated successfully, but these errors were encountered: