This also opens the question, how do you do migrations on different services that use the same schema and db?
r
Ryan
07/14/2020, 7:05 AM
I think the previous point applies here. If you have two separate DB's for development and production, you just need to run
prisma migrate up --experimental
to run the migrations on the production DB as only the latest will be applied.
s
SureDroid
07/14/2020, 2:52 PM
@Ryan The question might have been misinterpreted, but what I meant is that not two seperate db's, but you have two different services that are in two different repositories that use the same (duplicated) prisma schema, and they both use the same db. For example, service a has message author post, and service b has the same message author post models.
SureDroid
07/14/2020, 2:56 PM
One possible method could be to have the prisma schema is in it's own submodule, but then where do you run the migrations? But this relates to the first question, which service would be best to run the migrations in since prisma is in multiple seperate services (microservices).