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.
As of now, the
prisma2cli checks and uses a.envfile in the current working directory. We will change this to only read a.envfile which is in the same directory as theschema.prismafile.As proposed in prisma/prisma-client-js#454, we want to introduce support for a
.envfile in the Prisma Client.As we want to limit the
.envfile usage only to the scope of Prisma and not the whole application, as that's not the responsibility of Prisma, the.envfile will only be used by the Prisma Client, if it is next toschema.prisma.This change also has to be reflected in the
prisma2cli, it should only read a.envfile, if it's next to theschema.prismafile, which is in most cases in the./prismadirectory.