Move upgrade script to the end of upgarde.php