InfotelGLPI / webapplications

Plugin webapplications for GLPI
http://blogglpi.infotel.com
GNU General Public License v2.0
10 stars 18 forks source link

Core Migration doesn't migrate all tables to Appliances, or delete some of them. #36

Closed jcervantes-sipecom closed 2 years ago

jcervantes-sipecom commented 4 years ago

Hi, I'm getting some errors on the new version plugin 3.0.0 for GLPI 9.5.2 when opening an already Appliances.

Comparing my 2 DBs, the original GLPI 9.4.6 Plugin 2.6.0 and the clone upgraded to GLPI 9.5.2 Plugin 3.0.0 and applied Core migration, I notice one table dissapear and another ones don't migrate the data, like:

select count(*) from glpi_plugin_webapplications_webapplicationtechnics;
+----------+
| count(*) |
+----------+
|        6 |
+----------+

select count(*) from glpi_plugin_webapplications_webapplications_items;
+----------+
| count(*) |
+----------+
|       10 |
+----------+

select count(*) from glpi_plugin_webapplications_webapplicationtypes;
+----------+
| count(*) |
+----------+
|        4 |
+----------+

select count(*) from glpi_plugin_webapplications_webapplicationservertypes;
+----------+
| count(*) |
+----------+
|        4 |
+----------+
select count(*) from glpi_appliances_items;
+----------+
| count(*) |
+----------+
|        0 |
+----------+

select count(*) from glpi_appliancetypes;
+----------+
| count(*) |
+----------+
|        0 |
+----------+

select count(*) from glpi_plugin_webapplications_webapplicationservertypes;
+----------+
| count(*) |
+----------+
|        3 |
+----------+

It's problem repercute to another's plugins like Environment, Accounts, Database.


  1. Go to Setup
  2. Click on Plugins
  3. Click on Web Application Configure
  4. Click on Core migration
  5. See tables on database doesn't migrate all data.

Also:

  1. Once Core Migration, Go to Management
  2. Click on Appliances
  3. Click on an Item
  4. Click on Appliance
  5. See error on Category and Language of treatment

SQL Error "1146": Table 'g9495.glpi_plugin_webapplications_webapplicationtypes' doesn't exist in query "SELECT glpi_plugin_webapplications_webapplicationtypes., '' AS transname, '' AS transcomment FROM glpi_plugin_webapplications_webapplicationtypes WHERE glpi_plugin_webapplications_webapplicationtypes.id = '3'" SQL Error "1146": Table 'g9495.glpi_plugin_webapplications_webapplicationtypes' doesn't exist in query "SELECT FROM glpi_plugin_webapplications_webapplicationtypes WHERE glpi_plugin_webapplications_webapplicationtypes.id = '3' LIMIT 1" SQL Error "1146": Table 'g9495.glpi_plugin_webapplications_webapplicationtypes' doesn't exist in query "SHOW COLUMNS FROM glpi_plugin_webapplications_webapplicationtypes"

SQL Error "1146": Table 'g9495.glpi_plugin_webapplications_webapplicationtechnics' doesn't exist in query "SHOW COLUMNS FROM glpi_plugin_webapplications_webapplicationtechnics"

image

gguib commented 3 years ago

Hi,

I add migration on glpi_plugin_webapplications_webapplicationtypes -> glpi_appliancetypes. Please check new version

We removed glpi_plugin_webapplications_webapplications_items, so there's no migration.

I update Glpi 9.4 to 9.5 and webapplication 2.3.0 to 3.0.0 glpi_plugin_webapplications_webapplicationtechnics and my webapplicationtechnics migration works, same for servertypes (there's no action on it on migration, so he must keeps all from the last version).

unfortunately, i don't have errors on appliance form related to your sql errors. it still does not work?

gguib commented 3 years ago

Hi,

Please check new commit on master branch.

jcervantes-sipecom commented 3 years ago

Hi, Ok I will try.

jcervantes-sipecom commented 2 years ago

I don't have this problem anymore.