added checks if update_database.php was run twice