Prisma Migrate cannot reset the database when the user has insufficient privileges - this makes Prisma Migrate incompatible with some hosted cloud providers
See original GitHub issueProblem
This is the current error message
Error: Database error: Error querying the database: db error: ERROR: must be owner of schema public
0: migration_core::api::Reset
at migration-engine/core/src/api.rs:232
Suggested solution
- We could make it a “known error”
- Improve the text, suggestion:
The database's user privileges are insufficient, the user must be owner of the "public" schema
Additional context
The current error must be owner of schema public
is not super helpful if you don’t know it’s about the user privileges and that the schema name is public
.
So we could improve the message to make it clear to the users what the problem is.
In this case the solution is to grant the “owner” privileges to the db user.
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (7 by maintainers)
Top Results From Across the Web
Prisma Migrate limitations and known issues
Prisma Migrate generates SQL files that are specific to your provider. This means that you cannot use the same migration files for PostgreSQL...
Read more >Migration troubleshooting in development - Prisma
This guide describes how to resolve issues with Prisma Migrate in a development environment, which often involves resetting your database.
Read more >Prisma Migrate | Database, Schema, SQL Migration Tool
Prisma Migrate is a database migration tool available via the Prisma CLI that integrates with Prisma schema for data modeling.
Read more >Developing with Prisma Migrate
Configure the shadow database · If you are developing against a locally hosted database, make sure your user has sufficient privileges · If...
Read more >Adding Prisma Migrate to an existing project
Check out a copy of the repository with the new migration directory and the schema.prisma file · Run the following command to reset...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This feature is now live in 2.17.0 - https://github.com/prisma/prisma/releases/tag/2.17.0
For feedback, please post on https://github.com/prisma/prisma/issues/4531.
We need to check what we can do for cases like Digital Ocean