@@ -116,6 +116,17 @@ public function upgrade(Migration $migration) {
116
116
// Migrate regex question parameters
117
117
$ table = 'glpi_plugin_formcreator_questions ' ;
118
118
if ($ DB ->fieldExists ($ table , 'regex ' )) {
119
+ $ DB ->query (
120
+ "CREATE TABLE IF NOT EXISTS `glpi_plugin_formcreator_questionregexes` (
121
+ `id` int(11) NOT NULL AUTO_INCREMENT,
122
+ `plugin_formcreator_questions_id` int(11) NOT NULL,
123
+ `regex` text DEFAULT NULL,
124
+ `fieldname` varchar(255) DEFAULT NULL,
125
+ `uuid` varchar(255) DEFAULT NULL,
126
+ PRIMARY KEY (`id`),
127
+ INDEX `plugin_formcreator_questions_id` (`plugin_formcreator_questions_id`)
128
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; "
129
+ );
119
130
$ request = [
120
131
'FROM ' => $ table ,
121
132
'WHERE ' => ['fieldtype ' => ['float ' , 'integer ' , 'text ' , 'textarea ' ]]
@@ -134,6 +145,18 @@ public function upgrade(Migration $migration) {
134
145
// Migrate range question parameters
135
146
$ table = 'glpi_plugin_formcreator_questions ' ;
136
147
if ($ DB ->fieldExists ($ table , 'range_min ' )) {
148
+ $ DB ->query (
149
+ "CREATE TABLE IF NOT EXISTS `glpi_plugin_formcreator_questionranges` (
150
+ `id` int(11) NOT NULL AUTO_INCREMENT,
151
+ `plugin_formcreator_questions_id` int(11) NOT NULL,
152
+ `range_min` varchar(255) DEFAULT NULL,
153
+ `range_max` varchar(255) DEFAULT NULL,
154
+ `fieldname` varchar(255) DEFAULT NULL,
155
+ `uuid` varchar(255) DEFAULT NULL,
156
+ PRIMARY KEY (`id`),
157
+ INDEX `plugin_formcreator_questions_id` (`plugin_formcreator_questions_id`)
158
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; "
159
+ );
137
160
$ request = [
138
161
'FROM ' => $ table ,
139
162
'WHERE ' => ['fieldtype ' => ['float ' , 'integer ' , 'checkboxes ' , 'multiselect ' , 'text ' ]]
0 commit comments