Skip to content

Commit

Permalink
fix(condition): allow longer texts
Browse files Browse the repository at this point in the history
  • Loading branch information
btry committed Jan 2, 2023
1 parent d66a120 commit eecdf8a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion install/mysql/plugin_formcreator_2.13.4_empty.sql
Expand Up @@ -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,
Expand Down
5 changes: 5 additions & 0 deletions install/upgrade_to_2.13.4.php
Expand Up @@ -41,6 +41,7 @@ public function isResyncIssuesRequired() {
*/
public function upgrade(Migration $migration) {
$this->migration = $migration;
$this->updateConditions();
$this->addServiceCatalogHopepage();
}

Expand All @@ -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');
}
}

0 comments on commit eecdf8a

Please sign in to comment.