lila/bin/mongodb/atomic.js
2015-01-12 01:40:14 +01:00

14 lines
287 B
JavaScript

[db.config, db.config_anon].forEach(function(coll) {
coll.find().forEach(function(o) {
if (o.filter && o.filter.v && o.filter.v.length > 1) {
coll.update({
_id: o._id
}, {
$push: {
'filter.v': NumberInt(7)
}
});
};
});
});