steebchen / prisma-client-go

Prisma Client Go is an auto-generated and fully type-safe database client
https://goprisma.org
Apache License 2.0
2.15k stars 95 forks source link

WARNING: env var which was defined in the Prisma schema is not setDATABASE_URL #1245

Open RalphLincoln opened 6 months ago

steebchen commented 6 months ago

Can you provide more information? Are you actually running into an error? Or are you just seeing this warning but it still works?

krishna8421 commented 5 months ago

Hey @steebchen , Actually it is just showing this warning.

➜  go run main.go
WARNING: env var which was defined in the Prisma schema is not setDATABASE_URL
2024/05/24 12:55:08 Connected to database
[GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.

[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
 - using env:   export GIN_MODE=release
 - using code:  gin.SetMode(gin.ReleaseMode)

I have DATABASE_URL set in .env file and db push is working fine and database is also connecting as expected.

steebchen commented 5 months ago

Ah thanks for this. Then all is good. I will figure out how to hide this warning as it is not actually true that anything is missing, thanks