Added core status SQL to upgrade script. #329