Mongodb collection update patterns -


i have collection in db(e.g. merchants) gets updated regularly in prod. have db population script run every time.

this removes configuration collections , inserts them again based on data in script e.g. includes update merchant config.

db.merchants.remove({}); db.merchants.insert(themerchant); 

is there better pattern/procedure people use this? cant seem find guidance on how people doing in production. links methods people use great.

e.g. in sql server create patches


Comments

Popular posts from this blog

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

javascript - Confirm a form & display message if form is valid with JQuery -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -