patching dbupgrade.js to be correct before merging into deployment.