Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is Prisma ORM only support only one service ? #1763

Open
ToanG1 opened this issue Feb 8, 2025 · 1 comment
Open

Is Prisma ORM only support only one service ? #1763

ToanG1 opened this issue Feb 8, 2025 · 1 comment

Comments

@ToanG1
Copy link

ToanG1 commented Feb 8, 2025

I am developing a microservices and want to migrate from SQLDatabase to Prisma
I done for one service and on the way with other services and found that model imported from only one @prisma/client so after generate multiple times, it only support for latest one

My generate script: "postinstall": "npx prisma generate --schema=news/prisma/schema.prisma && npx prisma generate --schema=sources/prisma/schema.prisma"

@fredr
Copy link
Member

fredr commented Feb 10, 2025

You can generate a client per service into a custom output like explained here: https://www.prisma.io/docs/orm/prisma-client/setup-and-configuration/generating-prisma-client#using-a-custom-output-path

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants