Skip to content

Make sure to insert, rather than update apks when updating repo.

(Actually) fixes #517 (closed). I had a hunch the other bug (though problematic) wasn't actually the fix for #517 (closed). I am confident that this one is the fix, although I am still struggling to reproduce specific circumstances reported by others. I tracked this down when I did an update this morning and noticed a new app without any versions - so in a way I kind of reproduced it, but I can't reproduce it at will.

The problem was that again, only the vercodes of apks were being compared to see if they were the same, rather than vercode and id. The result is that some new apks will incorrectly be asked to execute an UPDATE query rather than an INSERT. As such, they don't end up in our database at all because the UPDATE will not run against any row at all.

Merge request reports