You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2023-05-08 13:26:41

rkarpinski
Member
Registered: 2022-12-12
Posts: 8

Formcreator upgrade problem

Hello,
I have an issue with GLPI installation that someone gave me to repair.
There is GLPI 10.0.7 and Formcreator plugin in Upgrade status. When i'm trying to upgrade plugin I have an error like this:

The database schema is not consistent with the previous version of Formcreator 2.13.4. To see the logs run the command bin/console glpi:plugin:install formcreator -f

When i run this command i get:

root@glpi:/var/www/html/glpi# bin/console glpi:plugin:install formcreator -f
User to use:admin
Przetwarzanie wtyczki "formcreator"...
Schemat tabeli różni się dla tabeli "glpi_plugin_formcreator_entityconfigs".
--- Expected database schema
+++ Bieżący schemat bazy danych
@@ @@
   `is_search_issue_visible` int NOT NULL DEFAULT -2,
   `is_search_visible` int NOT NULL DEFAULT -2,
   `replace_helpdesk` int NOT NULL DEFAULT -2,
-  `service_catalog_home` int NOT NULL DEFAULT -2,
   `sort_order` int NOT NULL DEFAULT -2,
   `tile_design` int NOT NULL DEFAULT -2,
   PRIMARY KEY (`id`),
   UNIQUE KEY `unicity` (`entities_id`)
 ) COLLATE=utf8mb4_unicode_ci DEFAULT CHARSET=utf8mb4 ENGINE=InnoDB

Schemat tabeli różni się dla tabeli "glpi_plugin_formcreator_conditions".
--- Expected database schema
+++ Bieżący schemat bazy danych
@@ @@
   `plugin_formcreator_questions_id` int unsigned NOT NULL DEFAULT 0,
   `show_condition` int NOT NULL DEFAULT 0,
   `show_logic` int NOT NULL DEFAULT 1,
-  `show_value` text,
+  `show_value` varchar(255),
   `uuid` varchar(255),
   PRIMARY KEY (`id`),
   KEY `item` (`itemtype`,`items_id`),
   KEY `plugin_formcreator_questions_id` (`plugin_formcreator_questions_id`)
 ) COLLATE=utf8mb4_unicode_ci DEFAULT CHARSET=utf8mb4 ENGINE=InnoDB

Schemat tabeli różni się dla tabeli "glpi_plugin_formcreator_issues".
--- Expected database schema
+++ Bieżący schemat bazy danych
@@ @@
   `date_mod` timestamp,
   `display_id` varchar(255) NOT NULL,
   `entities_id` int unsigned NOT NULL DEFAULT 0,
+  `groups_id_validator` int unsigned NOT NULL DEFAULT 0,
   `is_recursive` tinyint NOT NULL DEFAULT 0,
   `items_id` int unsigned NOT NULL DEFAULT 0,
   `itemtype` varchar(255) NOT NULL DEFAULT '',
-  `name` varchar(255),
+  `name` varchar(255) NOT NULL DEFAULT '',
   `requester_id` int unsigned NOT NULL DEFAULT 0,
   `status` varchar(255) NOT NULL DEFAULT '',
   `users_id_recipient` int unsigned NOT NULL DEFAULT 0,
+  `users_id_validator` int unsigned NOT NULL DEFAULT 0,
   PRIMARY KEY (`id`),
   KEY `entities_id` (`entities_id`),
+  KEY `groups_id_validator` (`groups_id_validator`),
   KEY `item` (`itemtype`,`items_id`),
-  KEY `requester_id` (`requester_id`)
+  KEY `requester_id` (`requester_id`),
+  KEY `users_id_validator` (`users_id_validator`)
 ) COLLATE=utf8mb4_unicode_ci DEFAULT CHARSET=utf8mb4 ENGINE=InnoDB

The database schema is not consistent with the previous version of Formcreator 2.13.4. To see the logs run the command bin/console glpi:plugin:install formcreator -f
To ignore the inconsistencies and upgrade anyway run bin/console glpi:plugin:install formcreator -f -p skip-db-check
Instalacja wtyczki "formcreator" nie powiodła się.

Maybe someone can help me with this?

Offline

#2 2023-05-08 13:38:39

btry
Moderator
Registered: 2015-10-01
Posts: 593

Re: Formcreator upgrade problem

Hi

You have to fix the inconsistencies in your tables, as described in the diff generated by the command.

You have some columns missing, and some columns with a different type compared to the expected type.

Lines with - are the expected column description, and lines with + are the actual description on your tables. Create SQL queries (alter table, see mysl documentation) to fix your database before trying again your upgrade. You may also use a tool with GUI to fix the tables (Phpmyadmin, Heidi SQL, ...)


No support with MP - Always run an upgrade task on a testing instance before running it on production! Always backup before any upgrade task!

Offline

#3 2023-05-08 15:12:50

rkarpinski
Member
Registered: 2022-12-12
Posts: 8

Re: Formcreator upgrade problem

Ok, thats what I thought. I've done first and second table. Now I have only this:

Schemat tabeli różni się dla tabeli "glpi_plugin_formcreator_issues".
--- Expected database schema
+++ Bieżący schemat bazy danych
@@ @@
   `date_mod` timestamp,
   `display_id` varchar(255) NOT NULL,
   `entities_id` int unsigned NOT NULL DEFAULT 0,
+  `groups_id_validator` int unsigned NOT NULL DEFAULT 0,
   `is_recursive` tinyint NOT NULL DEFAULT 0,
   `items_id` int unsigned NOT NULL DEFAULT 0,
   `itemtype` varchar(255) NOT NULL DEFAULT '',
-  `name` varchar(255),
+  `name` varchar(255) NOT NULL DEFAULT '',
   `requester_id` int unsigned NOT NULL DEFAULT 0,
   `status` varchar(255) NOT NULL DEFAULT '',
   `users_id_recipient` int unsigned NOT NULL DEFAULT 0,
+  `users_id_validator` int unsigned NOT NULL DEFAULT 0,
   PRIMARY KEY (`id`),
   KEY `entities_id` (`entities_id`),
+  KEY `groups_id_validator` (`groups_id_validator`),
   KEY `item` (`itemtype`,`items_id`),
-  KEY `requester_id` (`requester_id`)
+  KEY `requester_id` (`requester_id`),
+  KEY `users_id_validator` (`users_id_validator`)
 ) COLLATE=utf8mb4_unicode_ci DEFAULT CHARSET=utf8mb4 ENGINE=InnoDB

I have to delete columns with + or what?

Last edited by rkarpinski (2023-05-08 15:13:11)

Offline

#4 2023-05-09 08:24:56

btry
Moderator
Registered: 2015-10-01
Posts: 593

Re: Formcreator upgrade problem

Hi

- You must add columns groups_id_validator and users_id_validator
- You must fix the column name
- you must add keys groups_id_validator and users_id_validator.


No support with MP - Always run an upgrade task on a testing instance before running it on production! Always backup before any upgrade task!

Offline

Board footer

Powered by FluxBB