Skip to content

migrate deploy: Error: P1010: User user was denied access on the database db.public #13384

@ICiscoStu

Description

@ICiscoStu

Bug description

migrate deploy throws Error: P1010: User user was denied access on the database db.public

How to reproduce

run migrate deploy

Expected behavior

migrations should run and tables on the migration should be created

since this is a production deploy, no shadow database should be necessary as per the documentation:

The migrate deploy command:

  • Does not issue a warning if an already applied migration is missing from migration history
  • Does not detect drift (production database schema differs from migration history end state - for example, due to a hotfix
  • Does not reset the database or generate artifacts (such as Prisma Client)
  • Does not rely on a shadow database

the user used has grant all on the database schema and its a superuser

Prisma information

datasource db { provider = "postgresql" url = env("DATABASE_URL") }
postgresql://postgres:[pwd]@localhost:5432/postgres?schema=public

Environment & setup

  • OS: CentOS Stream 9
  • Database: PostgreSQL 13.7
  • Node.js version: v16.14.0

Prisma Version

3.10.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug/0-unknownBug is new, does not have information for reproduction or reproduction could not be confirmed.kind/bugA reported bug.topic: prisma migrate deployCLI: prisma migrate deploy

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions