The remove-empty-parents db migration attempts to download all contacts including docs and then process them one by one. On a large data set I expect this will crash.
Do some sort of batching instead (limit and skip), and use bulk docs to do the insertion.
Assigning to @alxndrsn because I _think_ I saw him talk about this issue on Slack...
Now using a temp view, similar to migrations/convert-bad-dob-format.js.
No limit or skip, and no bulk update, but should now only be getting a few docs per project, instead of _ALL_ the contacts.
Original issue: #2436
One comment in the commit. Also there are a few jshint errors to fix.
I've fixed jshint to unblock master.
No AT required.
Most helpful comment
Assigning to @alxndrsn because I _think_ I saw him talk about this issue on Slack...