From eecdf8a2a8f6c6fdb334d02069f5afb980d9e62e Mon Sep 17 00:00:00 2001 From: Thierry Bugier Date: Thu, 8 Dec 2022 14:29:42 +0100 Subject: [PATCH] fix(condition): allow longer texts --- install/mysql/plugin_formcreator_2.13.4_empty.sql | 2 +- install/upgrade_to_2.13.4.php | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/install/mysql/plugin_formcreator_2.13.4_empty.sql b/install/mysql/plugin_formcreator_2.13.4_empty.sql index a3a2b9ad5..6838b92fb 100644 --- a/install/mysql/plugin_formcreator_2.13.4_empty.sql +++ b/install/mysql/plugin_formcreator_2.13.4_empty.sql @@ -149,7 +149,7 @@ CREATE TABLE IF NOT EXISTS `glpi_plugin_formcreator_conditions` ( `items_id` int unsigned NOT NULL DEFAULT '0' COMMENT 'item ID of the item affected by the condition', `plugin_formcreator_questions_id` int unsigned NOT NULL DEFAULT '0' COMMENT 'question to test for the condition', `show_condition` int(11) NOT NULL DEFAULT '0', - `show_value` varchar(255) NULL DEFAULT NULL, + `show_value` mediumtext NULL DEFAULT NULL, `show_logic` int(11) NOT NULL DEFAULT '1', `order` int(11) NOT NULL DEFAULT '1', `uuid` varchar(255) NULL DEFAULT NULL, diff --git a/install/upgrade_to_2.13.4.php b/install/upgrade_to_2.13.4.php index fc974252e..9e5a78a0b 100644 --- a/install/upgrade_to_2.13.4.php +++ b/install/upgrade_to_2.13.4.php @@ -41,6 +41,7 @@ public function isResyncIssuesRequired() { */ public function upgrade(Migration $migration) { $this->migration = $migration; + $this->updateConditions(); $this->addServiceCatalogHopepage(); } @@ -53,4 +54,8 @@ public function addServiceCatalogHopepage() { 'condition' => 'WHERE `entities_id` = 0' ]); } + + public function updateConditions() { + $this->migration->changeField('glpi_plugin_formcreator_conditions', 'show_value', 'show_value', 'mediumtext'); + } }