These are chat archives for Automattic/mongoose

Sep 2017
Paul "Joey" Clark
Sep 20 2017 06:55
@AndreasGalster You would need a migration script to do that. But you might not need one.
I think when you load an old document, and the field is missing, then mongoose will set the default value.
Of course this won’t work when using .lean().
Please test it, I’m not sure. ;)
Paul "Joey" Clark
Sep 20 2017 07:01
@namho-kim I don’t think ”bob” should be inside an array []