Skip to content

Commit 84e9c68

Browse files
committed
fix(textareafield): paste images reachs limit of field in DB
upgraded the field to longtext
1 parent 1cb94ad commit 84e9c68

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

install/mysql/plugin_formcreator_empty.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ CREATE TABLE IF NOT EXISTS `glpi_plugin_formcreator_answers` (
55
`id` int(11) NOT NULL AUTO_INCREMENT,
66
`plugin_formcreator_formanswers_id` int(11) NOT NULL DEFAULT '0',
77
`plugin_formcreator_questions_id` int(11) NOT NULL DEFAULT '0',
8-
`answer` text,
8+
`answer` longtext,
99
PRIMARY KEY (`id`),
1010
INDEX `plugin_formcreator_formanswers_id` (`plugin_formcreator_formanswers_id`),
1111
INDEX `plugin_formcreator_questions_id` (`plugin_formcreator_questions_id`)

install/upgrade_to_2.9.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,9 @@ public function upgrade(Migration $migration) {
300300
$migration->addField($table, 'icon', 'string', ['after' => 'is_recursive']);
301301
$migration->addField($table, 'icon_color', 'string', ['after' => 'icon']);
302302
$migration->addField($table, 'background_color', 'string', ['after' => 'icon']);
303+
304+
$table = 'glpi_plugin_formcreator_answers';
305+
$migration->changeField($table, 'answer', 'answer', 'longtext');
303306
}
304307

305308
/**

0 commit comments

Comments
 (0)