I have a collection with a number field named "reference". I want to update every document in the collection and add 1000 to the reference field.
so if reference = 1 it will become 1001
pseudo below:
db.item.updateMany({}, {$set:{reference: reference+1000}}
Any idea how best to achieve this?