Hey all :wave: I have been playing around with Pri...
# mongodb
e
Hey all 👋 I have been playing around with Prisma 3 on a brand new project using Mongo for a couple of weeks now and have been happy with it so far. I now want to take an older project that is on
1.34
and migrate it over to Prisma 3. The docs for mongo support all seem to refer to starting from scratch. Is there a workflow for moving over? I dont have much data anyway but would just like the schema and resolvers etc to carry over
Was also thinking to nuke all the old files referring to the old Prisma version - docker files etc and save the schema and resolver files temporarily, set up Prisma from scratch and then copy the files back and update to fit the new Prisma API Any thoughts?
d
Hey @ezeikel. Prisma 1 and 2+ have nothing in common. Basically these are two absolutely different products, there's no automated migration path between them. Prisma 1 is an integrated GraphQL server, Prisma 2+ is just an ORM. You can achieve a similar experience by using Pal.js to autogenerate Nexus types and resolvers based on your schema. Also I've created an authorisation package that may come in handy in that scenario: https://github.com/joindeed/prisma-auth
r
@ezeikel 👋 We have recently introduced
db pull
for MongoDB which will currently introspect your existing Prisma 1 database, so you could try that out and give us your feedback 🙂
e
@Dmitri Pisarev Thanks for the clarification. That makes perfect sense. I will check out Pal.js and prisma-auth to see about porting over the previous behaviour @Ryan Thanks
db pull
worked perfectly and gave me a good base to start with. Some of the types and relations were a bit weird but were easy to figure out when comparing the old style schema, the generated one and the docs I have now moved everything over and after a bit of fixing to match the new API everything is working just as before on the previous version 🚀 Thanks again to you both!
🙌 2
r
Awesome! Let me know how it goes 🙂