DEV Community

Discussion on: Building a MongoDB migration system for NestJS with mongoose

jdnichollsc profile image
J.D Nicholls

Thanks for sharing!

I was wondering how to apply database migrations with Mongoose in a NestJS template but I figure out that I was trying to implement a Database seeding instead because you don't need migrations with a NoSQL Database. This is my template:


bassochette profile image
Julien Prugne Author

In production database you might need to apply migration on existing data even in document oriented database.
For example: you can clean some legacy data. (GDPR compliance for example)
Seeding is only for new data or starting a new environment.