PrismaP
Prisma2y ago
2 replies
Digital

Multiple Schema File issues

hi, so im using as followed on the blog about multiple schema files, and it seems that when i try to use npx prisma format or
npx prisma generate
, it fails to load those other schema files, i dont have any model in main file tho, so not sure if that's the issue, but it shouldnt be, here's also my file tree:

prisma
├── schema
│   ├── someName.prisma
│   ├── someOtherName.prisma
└── schema.prisma



schema.prisma:
generator client {
  provider        = "prisma-client-js"
  previewFeatures = ["prismaSchemaFolder"]
}

datasource db {
  provider = "postgresql"
  url      = env("DATABASE_URL")
}
Solution
seems like all files have to be in the schema directory, that's kinda annoying
Was this page helpful?