Hi. I'm about to migrate one app from prisma 1 to ...
# orm-help
m
Hi. I'm about to migrate one app from prisma 1 to prisma 2. As I have failed to recreate production prisma server with database on my localhost to do a test migration, I will try a different approach. I have currently three services on prisma server. Postgres schemas in one dbs (just like Prisma 1 generated it) •
app_1/prod
(The one we are migrating along with the one below) •
app_1/dev
(yes, im usually developing the app while accesing the remote prisma server, not localhost prisma) •
app_2/prod
(This one will probably stay forever on Prisma1) My idea is to do the migration on
app_1/dev
and if everything goes smooth, do the same on
app_1/prod
My questions: Is this a good approach, or should i try once more to recreate the prisma server on localhost? And the most important question: While doing migration work on the
app_1/dev
schema, will the other schemas in db be affected by it? Will anything collide? What about the
management
schema? Anything to worry here while doing the migration in that way? Thanks!
n
Hey Maciek 👋
Is this a good approach, or should i try once more to recreate the prisma server on localhost?
I think performing the migration in a dev environment is safe. Of course, running it locally once to get familiar with the workflow would most likely be better, but from my perspective this wouldn't be a blocker to run a migration in your dev environment.
While doing migration work on the 
app_1/dev
 schema, will the other schemas in db be affected by it? Will anything collide? What about the 
management
 schema? Anything to worry here while doing the migration in that way?
No collisions are expected here! The migration will just operate on the
app_1/dev
schema and the output of the Prisma Upgrade CLI should only target that schema, so it won't affect the
app_1/prod
,
app_2/prod
or the
management
schema. Let me know if you have any further questions about the upgrade, always happy to help 🙌
Also, what kind of API layer do you build on top of Prisma 1? Are you e.g. using
prisma-binding
or Nexus?
m
Thank you very much 🙂 . It's currently on an Apollo Server with
prisma-binding
(Prisma 1.34.10). I wasn't sure wheter to migrate to SDL First or Nexus, but after doing some research, I'm planning to migrate to Nexus (all at once). Already read the upgrade docs twice plus watched your upgrade video. Anything else I should be aware of? I'm a little scared 😉