@@ -123,18 +123,21 @@ public function upgrade(Migration $migration) {
123
123
$ migration ->dropField ($ table , 'changetemplates_id ' );
124
124
125
125
// Migrate regex question parameters
126
+ $ defaultCharset = DBConnection::getDefaultCharset ();
127
+ $ defaultCollation = DBConnection::getDefaultCollation ();
128
+ $ defaultKeySign = DBConnection::getDefaultPrimaryKeySignOption ();
126
129
$ table = 'glpi_plugin_formcreator_questions ' ;
127
130
if ($ DB ->fieldExists ($ table , 'regex ' )) {
128
131
$ DB ->query (
129
132
"CREATE TABLE IF NOT EXISTS `glpi_plugin_formcreator_questionregexes` (
130
- `id` int(11) NOT NULL AUTO_INCREMENT,
133
+ `id` int(11) $ defaultKeySign NOT NULL AUTO_INCREMENT,
131
134
`plugin_formcreator_questions_id` int(11) NOT NULL,
132
135
`regex` text DEFAULT NULL,
133
136
`fieldname` varchar(255) DEFAULT NULL,
134
137
`uuid` varchar(255) DEFAULT NULL,
135
138
PRIMARY KEY (`id`),
136
139
INDEX `plugin_formcreator_questions_id` (`plugin_formcreator_questions_id`)
137
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ; "
140
+ ) ENGINE=InnoDB DEFAULT CHARSET= $ defaultCharset COLLATE= $ defaultCollation ROW_FORMAT=DYNAMIC ; "
138
141
);
139
142
$ request = [
140
143
'FROM ' => $ table ,
@@ -156,15 +159,15 @@ public function upgrade(Migration $migration) {
156
159
if ($ DB ->fieldExists ($ table , 'range_min ' )) {
157
160
$ DB ->query (
158
161
"CREATE TABLE IF NOT EXISTS `glpi_plugin_formcreator_questionranges` (
159
- `id` int(11) NOT NULL AUTO_INCREMENT,
162
+ `id` int(11) $ defaultKeySign NOT NULL AUTO_INCREMENT,
160
163
`plugin_formcreator_questions_id` int(11) NOT NULL,
161
164
`range_min` varchar(255) DEFAULT NULL,
162
165
`range_max` varchar(255) DEFAULT NULL,
163
166
`fieldname` varchar(255) DEFAULT NULL,
164
167
`uuid` varchar(255) DEFAULT NULL,
165
168
PRIMARY KEY (`id`),
166
169
INDEX `plugin_formcreator_questions_id` (`plugin_formcreator_questions_id`)
167
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ; "
170
+ ) ENGINE=InnoDB DEFAULT CHARSET= $ defaultCharset COLLATE= $ defaultCollation ROW_FORMAT=DYNAMIC ; "
168
171
);
169
172
$ request = [
170
173
'FROM ' => $ table ,
0 commit comments