software-engineering-daily-api
software-engineering-daily-api copied to clipboard
Prevent broken `author` ObjectId references in forumthreads collection
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.
We could do something like this: bsondump forumthreads.bson | jq -r '.author["$oid"] = "<new-oid>"'. Still investigating more though