moved upgrade function out to upgrade.php otherwise during initial install all app_defaults get run twice