Updated upgrade script.