@@ -123,18 +123,21 @@ public function upgrade(Migration $migration) {
123123 $ migration ->dropField ($ table , 'changetemplates_id ' );
124124
125125 // Migrate regex question parameters
126+ $ defaultCharset = DBConnection::getDefaultCharset ();
127+ $ defaultCollation = DBConnection::getDefaultCollation ();
128+ $ defaultKeySign = DBConnection::getDefaultPrimaryKeySignOption ();
126129 $ table = 'glpi_plugin_formcreator_questions ' ;
127130 if ($ DB ->fieldExists ($ table , 'regex ' )) {
128131 $ DB ->query (
129132 "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,
131134 `plugin_formcreator_questions_id` int(11) NOT NULL,
132135 `regex` text DEFAULT NULL,
133136 `fieldname` varchar(255) DEFAULT NULL,
134137 `uuid` varchar(255) DEFAULT NULL,
135138 PRIMARY KEY (`id`),
136139 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 ; "
138141 );
139142 $ request = [
140143 'FROM ' => $ table ,
@@ -156,15 +159,15 @@ public function upgrade(Migration $migration) {
156159 if ($ DB ->fieldExists ($ table , 'range_min ' )) {
157160 $ DB ->query (
158161 "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,
160163 `plugin_formcreator_questions_id` int(11) NOT NULL,
161164 `range_min` varchar(255) DEFAULT NULL,
162165 `range_max` varchar(255) DEFAULT NULL,
163166 `fieldname` varchar(255) DEFAULT NULL,
164167 `uuid` varchar(255) DEFAULT NULL,
165168 PRIMARY KEY (`id`),
166169 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 ; "
168171 );
169172 $ request = [
170173 'FROM ' => $ table ,
0 commit comments