Issues with multiple folder schemas.
Hey all, I am currently using the "prismaSchemaFolder" preview feature, and I went to do:
bunx prisma generate
but I am now seeing the following:
This is my bunx prisma -v
1 Reply
Skipping coffee for instant knowledge! Let's brew that AI answer now.
This issue is related to changes in Prisma 6.6.0 regarding how schema folders are handled with the
prismaSchemaFolder
preview feature.
As of Prisma 6.6.0, you must explicitly specify the location of your Prisma schema folder. The automatic detection of schema folders in default locations has been removed. This is a breaking change from previous versions.
To fix this issue, you need to do one of the following:
1. Add the schema path to your package.json
:
2. Or specify the schema path directly in your command:
3. Or create a prisma.config.ts
file with the schema path.
Important: Make sure you're specifying the folder path, not the file path. For example, use "prisma/schema"
instead of "prisma/schema/schema.prisma"
.
Also, ensure your migrations folder is placed next to the .prisma
file that defines the datasource
block.
This change was introduced in Prisma 6.6.0 to fix confusion and inconsistent folder lookup behavior.
For more details, see:
- Github Issue #26840
- Github Issue #26849
- Multi-file Prisma Schema documentation
✅ Great, thanks for letting us know that this solved your question!