view source
Database migration in NodeJS and MongoDB
The problem We have an app running on the MEAN stack and are using MongooseJS as our ORM. Now, we have 2 collections event and eventV2. We are looking to drop the event collection and rename the eventV2 collection to just event. The solution This means running a migration script and fortunately for us, mongoose can connect to MongoDB directly
Advertisement