seppevs / migrate-mongo

A database migration tool for MongoDB in Node
MIT License
927 stars 163 forks source link

Need Information on internal working of Migrate-Mongo #283

Closed KartikeyaSinha closed 1 year ago

KartikeyaSinha commented 3 years ago

Hi,

Here's a scenario which I am trying to implement and would require internal working details of migrate-mongo. Just to give you an heads up, I have already gone through the below link: https://www.npmjs.com/package/migrate-mongo

Scenario- I am currently implementing a CICD pipeline for MongoDB database changes wherein I am using the migrate-mongo to make granular/schema changes in the database. The database containers are deployed on OKD/Openshift environment and are redeployed for any database changes. I have few questions regarding this module: 1)How does migrate-mongo works in background? Does it try to replace the existing data with new data? How does it act in this scenario, where there is a mongoDB statefulset pods in Kubernetes with persistent volume attached? 2)In case of large amount of data, will it be able to handle the changes and will it be able to keep the data integrity in check?

Will appreciate response on this!

Best, Kartikeya

sarink commented 3 years ago

migrate-mongo just runs your migration files in order, and keeps track of which migrations have run in a changelog collection. The rest is up to you!

seppevs commented 1 year ago

See last comment. I'm closing this.