OCSInventory-NG / OCSInventory-Server

Communication server of OCS Inventory
http://www.ocsinventory-ng.org/
GNU General Public License v2.0
340 stars 138 forks source link

Commit for update statement of agent inventories #446

Closed adubois-bib closed 7 months ago

adubois-bib commented 7 months ago

The code has sto be adapted but here is the fix I did in order not to have a systematic insert and delete during agent update database fields when there are changes detected during inventory.

The code performs an update, then, if the entry does not exist in the database it performs an insert and, at the end, if the data is not present in source anymore it performs a delete.

Please note that the code has to be adapted because we do not use the WRITE_DIFF option anymore in our fix