OCSInventory-NG / OCSInventory-Server

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

upgrade 2.0.5 -> 2.3.1 -> 2.6.0 missing some sql data #198

Closed juanjosepablos closed 4 years ago

juanjosepablos commented 4 years ago

After 6 years working ocs-ng-server 2.0.5 just fine (Thanks so much). I decide to upgrade OCS NG

General informations

Operating system : Debian 8.11

Server informations

Perl version : 5.20.2 Mysql / Mariadb / Percona version : Ver 15.1 Distrib 10.0.38-MariaDB

Server installation method ( Only one choice )

OCS Inventory informations

Ocs server version : 2.0.5

Problem's description

upgrade version 2.0.5 to 2.6.0 did not work, so I have to upgrade from 2.0.5 to 2.3.1 and then 2.3.1 to 2.6.0. Testing unix agent 2.6.0 The server return an error 500 when trying to upload the inventory. So I have checked the sql schema and I found a few columns missing from the sql server. To fix this issue I have execute those commands:

ALTER TABLE download_available add column `DELETED` int(1) NOT NULL DEFAULT '0';
ALTER TABLE networks add column `MTU` varchar(255) DEFAULT NULL;
ALTER TABLE snmp_laststate add column `VIRTUALMACHINES` varchar(255) DEFAULT NULL;

I have not got the knowledge to tell when this schema changed, but I feel that opening this bug helps others to create a sql file under OCSInventory-ocsreports/files/update/

juanjosepablos commented 4 years ago

81 complaints about MTU info missing BTW

gillesdubois commented 4 years ago

Hi @juanjosepablos ,

Indeed, upgrading from such an old version can be a little painful. I recommend you to stay up to date.

In the case of a 2.0.5 we recommend passing trough 3 versions :

Regards, Gilles Dubois.