-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Description
Hey! I found this example from this page. I did as the docs suggested, adding an override to the DATABASE_URL
environment variable in package.json
. I couldn't get it to work so I tried this example repository and also found that it failed to run the migrations.
I cloned the data-proxy
branch and added a .env
file with two variables:
DATABASE_URL=prisma://<stuff>
MIGRATE_DATABASE_URL=postgresql://<stuff>
Then I ran yarn run prisma:migrate
script and got the following error:
$ DATABASE_URL="$MIGRATE_DATABASE_URL" prisma migrate deploy
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Error: Schema validation error - Error (query-engine-node-api library)
Error code: P1012
error: Error validating datasource `db`: You must provide a nonempty URL. The environment variable `DATABASE_URL` resolved to an empty string.
--> schema.prisma:7
|
6 | provider = "postgresql"
7 | url = env("DATABASE_URL")
|
Validation Error Count: 1
[Context: getConfig]
Prisma CLI Version : 4.4.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Any ideas?
Metadata
Metadata
Assignees
Labels
No labels