Upgrading scripts for testing and production