Skip to content
This repository has been archived by the owner on Feb 21, 2025. It is now read-only.

Split prisma schema into multiple files #25

Open
juliavdkris opened this issue May 17, 2024 · 1 comment
Open

Split prisma schema into multiple files #25

juliavdkris opened this issue May 17, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@juliavdkris
Copy link
Contributor

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: prisma/prisma#2377. Two PRs for this functionality have already been merged (prisma/prisma-engines#4243 and prisma/prisma-engines#4787), so it's probably coming soon :)

@juliavdkris juliavdkris added the enhancement New feature or request label May 17, 2024
@juliavdkris juliavdkris self-assigned this May 17, 2024
@muslimakhan
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants