Upgrade Model.php