Applied DB prefix fix to upgrade script.