Saturday, 20 June 2020

Mongoose add new fields in schema to existing documents

So, after updating my Mongoose schema I'm wondering whether there is an easy way to update all the documents with the new fields. I know I can do Collection.updateMany() however that requires me to manually type out all the new fields. Is there a faster way? Thanks

Submitted June 20, 2020 at 05:19PM by everek123

No comments:

Post a Comment