How to perform migrations in Mongodb
Amit Chambial

Amit Chambial @amitchambial

About: Full stack developer and a Maker

Location:
Delhi
Joined:
Jun 23, 2020

How to perform migrations in Mongodb

Publish Date: Jun 23 '20
18 2

Hey everyone

I am working on a side project where I am using mongodb nodejs nextjs.

I am performing some schema update and my code is breaking up as the objects created before schema update have not been updated or not have a particular field.
Can somebody provide me the best way to perform dB migrations in mongodb using javascript.

Comments 2 total

  • Pranu Pranav
    Pranu PranavJan 31, 2022

    Hi this is one of the required skillset, if you are a full stack developer or a developer working on a stack that contains mongodb. I choose migrate-mongo package, you can install it using npm via command npm i migrate-mongo. It is simple.
    Perform the migrations in data access layer of your application.

Add comment