Perhaps an even easier solution would be to add a default case at this line. That way new versions wouldn't need to be added each time until there was another database change.