Open juliavdkris opened 5 months ago
Hey @juliavdkris, please check my blog and script here: New Trick – Organizing Prisma Models with the MERN Stack Github Repo
This script could be help in both model split into multiple files and also for enum & types of Prisma ORM. And there is also a way to import predefined data into database too. Hope, it would be solve your problem. Thanks
Sooo we're back to using prisma, which is cool and all, but it doesn't have support for splitting your db schema over multiple files. There's this cool library called prisma-import that might help with this.
For now I'll just keep it in one file, since that's what's officially supported. But in the future it might be worth checking this out.
There is also an open issue in the prisma repo for tracking official support: https://github.com/prisma/prisma/issues/2377. Two PRs for this functionality have already been merged (https://github.com/prisma/prisma-engines/pull/4243 and https://github.com/prisma/prisma-engines/pull/4787), so it's probably coming soon :)