]> git.mxchange.org Git - friendica.git/commitdiff
Bugfix: "ALTER IGNORE" was missing on structure and index change
authorMichael <heluecht@pirati.ca>
Sun, 26 Feb 2017 08:36:05 +0000 (08:36 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 26 Feb 2017 08:36:05 +0000 (08:36 +0000)
include/dbstructure.php

index f8d084437b16ed18342855b693a3dcc15573a585..1e4790de2ee49cb786304e6fb46d1876c99b6d6e 100644 (file)
@@ -242,7 +242,7 @@ function update_structure($verbose, $action, $tables=null, $definition=null) {
                                if (!isset($database[$name]["fields"][$fieldname])) {
                                        $sql2=db_add_table_field($fieldname, $parameters);
                                        if ($sql3 == "") {
-                                               $sql3 = "ALTER TABLE `".$temp_name."` ".$sql2;
+                                               $sql3 = "ALTER" . $ignore . " TABLE `".$temp_name."` ".$sql2;
                                        } else {
                                                $sql3 .= ", ".$sql2;
                                        }
@@ -253,7 +253,7 @@ function update_structure($verbose, $action, $tables=null, $definition=null) {
                                        if ($current_field_definition != $new_field_definition) {
                                                $sql2=db_modify_table_field($fieldname, $parameters);
                                                if ($sql3 == "") {
-                                                       $sql3 = "ALTER TABLE `".$temp_name."` ".$sql2;
+                                                       $sql3 = "ALTER" . $ignore . " TABLE `".$temp_name."` ".$sql2;
                                                } else {
                                                        $sql3 .= ", ".$sql2;
                                                }