Skip to content

Only support .env file next to schema.prisma #1519

@timsuchanek

Description

@timsuchanek

As of now, the prisma2 cli checks and uses a .env file in the current working directory. We will change this to only read a .env file which is in the same directory as the schema.prisma file.

As proposed in prisma/prisma-client-js#454, we want to introduce support for a .env file in the Prisma Client.
As we want to limit the .env file usage only to the scope of Prisma and not the whole application, as that's not the responsibility of Prisma, the .env file will only be used by the Prisma Client, if it is next to schema.prisma.

This change also has to be reflected in the prisma2 cli, it should only read a .env file, if it's next to the schema.prisma file, which is in most cases in the ./prisma directory.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions