Skip to content

Prisma Migrate cannot reset the database when the user has insufficient privileges - this makes Prisma Migrate incompatible with some hosted cloud providers #4803

@Jolg42

Description

@Jolg42

Problem

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions