I used a yaml file to create an app that runs my app and has a PostgreSQL database. However, during the deployment I got the error “permission denied for public schema”. I did some research and found this [page](How do I fix a “permission denied for schema public” error in PostgreSQL? | DigitalOcean Documentation) that suggests connecting to the database using psql
to change the user privileges. But When I tried to get the connection parameters in the app panel it says "
Connection details are unavailable while the database is being provisioned."
What could I do now? I have no way to connect to the database to change the privileges to allow my app to connect to it. I did not see any way to set the privileges in the [app spec reference page](Reference for App Specification | DigitalOcean Documentation) either
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hi there,
It sounds like you’re using a dev database in the App Platform, which has restricted permissions. Specifically, you can’t create additional databases, you must use the default one that comes with the cluster. This is likely why you’re seeing the “permission denied for public schema” error.
To resolve this, make sure your app is connecting to the default database and not trying to create a new one. Unfortunately, dev databases don’t support modifying privileges, so if you need more control over roles and permissions, you might want to switch to a DigitalOcean Managed Database instead.
More details here: 🔗 https://docs.digitalocean.com/products/app-platform/details/limits/#database-limits
Let me know how it goes!
- Bobby