From 68c4547c0a9fbb7b061fcc1a9cb1ddaf6b7310c2 Mon Sep 17 00:00:00 2001 From: Alys Date: Sat, 23 May 2015 20:03:36 +1000 Subject: [PATCH] change $push to $addToSet for monthly mystery items so that we can't get duplicates being added. Ref: https://gist.github.com/lefnire/a0a93c52211f44a2c087 and http://stackoverflow.com/questions/27248556/mongodb-difference-between-push-addtoset --- migrations/mysteryitems.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migrations/mysteryitems.js b/migrations/mysteryitems.js index 8f34a6ea6e..a95b1efc90 100644 --- a/migrations/mysteryitems.js +++ b/migrations/mysteryitems.js @@ -1,6 +1,6 @@ var _id = ''; var update = { - $push: { + $addToSet: { 'purchased.plan.mysteryItems':{ $each:['armor_mystery_201504','back_mystery_201504'] }