PrismaP
Prisma•13mo ago
.jsonp

Error P1012 when trying to use Prisma Postgres

Hey there 👋 I'm trying to use Prisma Postgres, but I am getting this error. I am unsure why the DATABASE_URL provided by Prisma would not work? Mine follows the format: prisma+postgres://accelerate.prisma-data.net/?api_key=..." but I get the following error when running npx prisma migrate dev --name init

Error code: P1012
error: Error validating datasource `db`: the URL must start with the protocol `postgresql://` or `postgres://`. To use a URL with protocol `prisma://`, you need to either enable Accelerate or the Data Proxy. Enable Accelerate via `prisma generate --accelerate` or the Data Proxy via `prisma generate --data-proxy.
Was this page helpful?