I have a node module (call it foo) that has its ow...
# orm-help
r
I have a node module (call it foo) that has its own schema/tables. This node module is getting imported into a service that has its own schema/tables. Service accesses its own and foo's tables using api's exposed via foo. how do I migrate this to prisma? I can have foo generate a prisma client and use it in the service, but service would need a client that knows about its tables as well? Basically I would have 2 schema.prisma one from the dependency (foo) and one from the service. Any suggestions?
j
Right now you can only do one schema file per client. You could potentially stitch them together, as long as they are on the same database.
r
so how would i go about doing that? the schema file would be node modules dir.
r
j
That’s better than I was thinking. I was thinking that you can parse it yourself.
n
You might want to have a look at https://github.com/sabinadams/aurora to create a single schema file from other multiple schema files.
r
is aurora production ready?
also how would i generate a prisma client in a node module, export it and update in the project that imported the client?
@Nurul ^
n
Aurora is community maintained, we are actively working to support it natively.
Do you mean something like exporting PrismaClient as a private npm package and then importing it to other projects?