Beginning with GLPI version 0.83 a very useful plugin to record SIM card data was available.
The plugin was created by Walid Nouh and then updated by Anthony Piesset and Thierry Bugier Pineau, and was very convenient for keeping track of company SIM card data.
In addition to the specific data of the SIM like number, serial, PIN, PUK, size and so on, it was also possible to add relationships to connected assets (phone / PC / wireless router), documents and many other things.
This plugin was regularly updated and remained compatible until GLPI version 9.1.
Starting with GLPI 9.2 version, SIM cards were introduced as “components” in GLPI, and thus the plugin was no longer useful and therefore has not been updated any longer.
SIM cards management in GLPI version 9.5 (where it was always managed in “components”) has been improved and even if it is not as easy to use as in the Walid Nouh plugin, we might want to use it and trust that its usability will be further improved in the future.
For those who have updated GLPI to version 9.5, that plugin is no longer available. If you have a lot of data in the plugin unfortunately there is no migration script that transfers the SIM data from the plugin to the core.
However, don’t worry! It’s not necessary to re-enter them manually!
With a little familiarity with MySQL, you can easily migrate the data from the GLPI plugin to the core.
Follow the queries below and you will find your SIM card data transferred from the old plugin to the core. Most likely you will have to make some additions if you use other fields, but you will already have the bulk of the work done.
insert into glpi_devicesimcards (id,designation,entities_id) select id, name, entities_id, from glpi_plugin_simcard_simcards;
update glpi_devicesimcards gd join glpi_plugin_simcard_simcards gpss on gpss.id=gd.id set gd.comment=gpss.comment;
insert into glpi_items_devicesimcards (items_id, itemtype, devicesimcards_id, serial, otherserial, states_id, locations_id, pin, pin2, puk, puk2) select gpssi.items_id, gpssi.itemtype, gpss.id, gpss.users_id, gpss.serial, gpss.otherserial, gpss.states_id, gpss.locations_id, gpss.pin, gpss.pin2, gpss.puk, gpss.puk2 from glpi_plugin_simcard_simcards_items gpssi join glpi_plugin_simcard_simcards gpss on gpss.id=gpssi.plugin_simcard_simcards_id;
insert into glpi_items_devicesimcards (items_id, itemtype, devicesimcards_id, serial, otherserial, states_id, locations_id, pin, pin2, puk, puk2) select '0', '', gpss.id, gpss.serial, gpss.otherserial, gpss.states_id, gpss.locations_id, gpss.pin, gpss.pin2, gpss.puk, gpss.puk2 from glpi_plugin_simcard_simcards gpss where gpss.id in (select gd.id from glpi_devicesimcards gd left join glpi_items_devicesimcards gpid on gd.id=gpid.devicesimcards_id where devicesimcards_id is null);
update glpi_documents_items set itemtype='DeviceSimcard' where itemtype='PluginSimcardSimcard';
update glpi_logs set itemtype='DeviceSimcard' where itemtype='PluginSimcardSimcard';