]> git.mxchange.org Git - friendica.git/blobdiff - src/Database/DBStructure.php
Issue 10768: Avoid MySQL problems when upgrading both index and structure
[friendica.git] / src / Database / DBStructure.php
index d7f1179d023d3fd03c52daff6098f6a58d5f13ab..f652272a4743ebf0c38ee0ab711e2a3b8c63d1c4 100644 (file)
@@ -673,6 +673,11 @@ class DBStructure
                                                $current_field_definition = DBA::cleanQuery(implode(",", $field_definition));
                                                $new_field_definition = DBA::cleanQuery(implode(",", $parameters));
                                                if ($current_field_definition != $new_field_definition) {
+                                                       // When the field structure changes then we will not perform the special index handling for MySQL.
+                                                       // See issue #10768
+                                                       $is_unique = false;
+                                                       $temp_name = $name;
+                       
                                                        $sql2 = self::modifyTableField($fieldname, $parameters);
                                                        if ($sql3 == "") {
                                                                $sql3 = "ALTER" . $ignore . " TABLE `" . $temp_name . "` " . $sql2;