Skip to content

Commit eecdf8a

Browse files
committed
fix(condition): allow longer texts
1 parent d66a120 commit eecdf8a

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

install/mysql/plugin_formcreator_2.13.4_empty.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ CREATE TABLE IF NOT EXISTS `glpi_plugin_formcreator_conditions` (
149149
`items_id` int unsigned NOT NULL DEFAULT '0' COMMENT 'item ID of the item affected by the condition',
150150
`plugin_formcreator_questions_id` int unsigned NOT NULL DEFAULT '0' COMMENT 'question to test for the condition',
151151
`show_condition` int(11) NOT NULL DEFAULT '0',
152-
`show_value` varchar(255) NULL DEFAULT NULL,
152+
`show_value` mediumtext NULL DEFAULT NULL,
153153
`show_logic` int(11) NOT NULL DEFAULT '1',
154154
`order` int(11) NOT NULL DEFAULT '1',
155155
`uuid` varchar(255) NULL DEFAULT NULL,

install/upgrade_to_2.13.4.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ public function isResyncIssuesRequired() {
4141
*/
4242
public function upgrade(Migration $migration) {
4343
$this->migration = $migration;
44+
$this->updateConditions();
4445
$this->addServiceCatalogHopepage();
4546
}
4647

@@ -53,4 +54,8 @@ public function addServiceCatalogHopepage() {
5354
'condition' => 'WHERE `entities_id` = 0'
5455
]);
5556
}
57+
58+
public function updateConditions() {
59+
$this->migration->changeField('glpi_plugin_formcreator_conditions', 'show_value', 'show_value', 'mediumtext');
60+
}
5661
}

0 commit comments

Comments
 (0)