Skip to content

Got stuck when running npx prisma db push #22

@slaveofcode

Description

@slaveofcode

Always got stuck when running npx prisma db push

Following on this thread, it's recommend to use DIRECT_URL with port 5432 with some modification on code

// prisma/schema.prisma

datasource db {
  provider = "postgresql"
  url      = env("DATABASE_URL")
  directUrl = env("DIRECT_URL")
}

// .env

...
DATABASE_URL=postgresql://<user>:<password>@yourhost:6543/postgres?pgbouncer=true
DIRECT_URL=postgresql://<user>:<password>@yourhost:5432/postgres
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions