These are chat archives for Automattic/mongoose

20th
Sep 2017
Paul "Joey" Clark
@joeytwiddle
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
@joeytwiddle
Sep 20 2017 07:01
@namho-kim I don’t think ”bob” should be inside an array []