fixed dbaids-upgrade function