Separate prisma files to manage models
See original GitHub issueIn prisma1
, I used to import multiple datamodels in prisma.yml
like below.
- datamodel.prisma
- datamodel2.prisma
- datamodel3.prisma
How can I do this in Prisma2
when there is only one file project.prisma
when I generated the boilerplate.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:41
- Comments:27 (7 by maintainers)
Top Results From Across the Web
How to split Prisma Model into separate file? - Stack Overflow
I can recommend 3 solutions though. Option 1: Prismix. Prismix utilizes models and enums to create relations across files for your Prisma schema ......
Read more >How to use Prisma with multiple database schemas
To use multiple database schemas in your Prisma schema file, add the names of your database schemas to an array in the schemas...
Read more >Work with Models and Relations with Prisma Schema
In this lesson, we will learn how to model data relationships with Prisma Schema. We will be using a social network as our...
Read more >[Prisma2] Is declaring all the models in one file a big ... - Reddit
What you should do it split it into 3 backend apps each for it's respective domain- CMS, eshop and third one for storage...
Read more >Data Modeling with Prisma - JavaScript in Plain English
Generated migration file looks like this. Migration SQL generated for User manage User one to many relationship. Many-to- ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I write on nestjs and use modular architecture, i want separate prisma schema for each module, i want this feature 🙏
Two years later, a team of 10 still has to mess around in 1 schema file. What could possibly go wrong.