software-engineering-daily-api icon indicating copy to clipboard operation
software-engineering-daily-api copied to clipboard

Prevent broken `author` ObjectId references in forumthreads collection

Open mglaman opened this issue 6 years ago • 1 comments

Coming from https://github.com/SoftwareEngineeringDaily/sedaily-front-end/issues/617

build-mongodb.sh should update the forumthread.author property to the forumAdmin user. Or generate a dummy user which items are attributed to. That way no legitimate user collection items needed to be copied.

mglaman avatar Aug 19 '19 03:08 mglaman

We could do something like this: bsondump forumthreads.bson | jq -r '.author["$oid"] = "<new-oid>"'. Still investigating more though

andrewmarklloyd avatar Aug 19 '19 04:08 andrewmarklloyd