r4170 getDatabaseVersion(): move to upgrade.php, where it fits better