Still not solved: Prisma can't find multi-file-separated models in 6.14.0
I am on version 6.14.0, followed all the instructions to add a typescript config file and remove the package.json instructions and ended up with this setup where it is not finding any of my models and it just dropped all my tables when migrating. Here is my setup:
This is my exact file structure:
prisma.config.ts
schema.prisma
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
``
I've also renaming
./models to
./schema` and moving migrations and schema.prisma into it, which led to the same result with all tables dropped on the following migration
Please help6 Replies
You decided to hold for human wisdom. We'll chime in soon! Meanwhile,
#ask-ai
is there if you need a quick second opinion.Hey!
Just to confirm, does this issue occur only when you have split your schema file?
For testing, if you do not split and have only one
schema.prisma
file, then it works correctly?yes, with this exact setup when I move the models to the schema.prisma and delete the separate model-files, the issue does not occur and all the tables get created like they shoudl
but I would like to use this multi-file feature
Please, I have been trying to do this since beginning of July
Thanks for confirming. Can you please create a GitHub Issue via this link:
https://github.com/prisma/prisma/issues
I'll share it with ORM team internally
GitHub
Prisma can't find multi-file-separated models in 6.14.0 · Issue #2...
Bug description I am on version 6.14.0, followed all the instructions to add a typescript config file and remove the package.json instructions and ended up with this setup where it is not finding a...
Thank you Nurul for sharing it internally!