PrismaP
Prisma11mo ago
4 replies
Matusko167

Prisma postgresql

Hello i have a problem with generate client

Environment variables loaded from ../.env
Prisma schema loaded from schema.prisma

Datasource "db": PostgreSQL database


Error: Prisma schema validation - (get-config wasm)
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:// the Data Proxy must be enabled via prisma generate --data-proxy.

More information about Data Proxy: https://pris.ly/d/data-proxy

--> schema.prisma:3
|
2 | provider = "postgres"
3 | url = env("DATABASE_URL")
|

Validation Error Count: 1
[Context: getConfig]

Prisma CLI Version : 4.16.0

my env=

DATABASE_URL="prisma+postgres://accelerate.prisma-data.net/?api_key=xxxx"


datasource db {
provider = "postgres"
url = env("DATABASE_URL")
}
Was this page helpful?