This could be an FAQ but Is there a proper way of ...
# orm-help
m
This could be an FAQ but Is there a proper way of syncing the schema between multiple repos? we have five repo that need the latest revision of the schema, what would be the best way to sync the schema between all repos?
k
Perhaps a git sub module?
m
We tried that but the problem with sub modules is that the different projects need different generators which causes errors.
r
@Maximous Black 👋 A schema in an NPM package should be the best solution here. Easy to sync b/w teams and the latest can be pushed with a version bump.
m
Interesting, how would I do that? Is there a doc?
And how does it handle different generators?
r
There’s a blog post written by one of our community members that you can check: https://isidoro-ferreiro.medium.com/share-your-prisma-client-across-projects-44d1c7aca6fd
m
I'm still not sure how to do this or how this solves the generators problem
r
Basically creating an NPM package with your schema that you will fetch from NPM and that will run
generate
which should run the generators.
m
So add all the generators to the one shared schema, publish it, import in all projects, run
generate
(which will run all the generators?) And just use prisma from that package Did I get that right?
r
Yeah.
🙌 1
m
Ok, we'll try that and report here
💯 1