Open BrantonLiu opened 3 weeks ago
when I run
npx prisma migrate dev
got this error
Environment variables loaded from .env Prisma schema loaded from prisma\schema.prisma Datasource "db": PostgreSQL database Error: Prisma schema validation - (get-config wasm) Error code: P1012 error: Environment variable not found: DIRECT_URL. --> prisma\schema.prisma:8 | 7 | url = env("DATABASE_URL") 8 | directUrl = env("DIRECT_URL") | Validation Error Count: 1 [Context: getConfig] Prisma CLI Version : 5.21.1
What shall I do? Change these two lines in .env like this?
datasource db { provider = "postgresql" url = env("DATABASE_URL") directUrl = env("DIRECT_URL") }
datasource db { provider = "postgresql" url = env("SUPABASE_URL") // directUrl = env("DIRECT_URL") }
I try to keep going. I'll be back if encounter any error, or who can help me here. Thanks in advance!
Just erase DIRECT_URL and use only DATABASE_URL.
DIRECT_URL
DATABASE_URL
Example:
datasource db { provider = "postgresql" url = env("DATABASE_URL") }
when I run
got this error
What shall I do? Change these two lines in .env like this?
I try to keep going. I'll be back if encounter any error, or who can help me here. Thanks in advance!