It is basically to avoid to execute a update query for every share to update the file_target. I will add a unit test for it. BTW, this can probably also lead to problems if we update to many rows... I will break this down into chunks of 99 rows per query, like I did for the other one.