Merge pull request #3190 from annando/bugfix-dbstructure
Bugfix: "ALTER IGNORE" was missing on structure and index alteration
This commit is contained in:
commit
86c6c48bd8
|
@ -242,7 +242,7 @@ function update_structure($verbose, $action, $tables=null, $definition=null) {
|
||||||
if (!isset($database[$name]["fields"][$fieldname])) {
|
if (!isset($database[$name]["fields"][$fieldname])) {
|
||||||
$sql2=db_add_table_field($fieldname, $parameters);
|
$sql2=db_add_table_field($fieldname, $parameters);
|
||||||
if ($sql3 == "") {
|
if ($sql3 == "") {
|
||||||
$sql3 = "ALTER TABLE `".$temp_name."` ".$sql2;
|
$sql3 = "ALTER" . $ignore . " TABLE `".$temp_name."` ".$sql2;
|
||||||
} else {
|
} else {
|
||||||
$sql3 .= ", ".$sql2;
|
$sql3 .= ", ".$sql2;
|
||||||
}
|
}
|
||||||
|
@ -253,7 +253,7 @@ function update_structure($verbose, $action, $tables=null, $definition=null) {
|
||||||
if ($current_field_definition != $new_field_definition) {
|
if ($current_field_definition != $new_field_definition) {
|
||||||
$sql2=db_modify_table_field($fieldname, $parameters);
|
$sql2=db_modify_table_field($fieldname, $parameters);
|
||||||
if ($sql3 == "") {
|
if ($sql3 == "") {
|
||||||
$sql3 = "ALTER TABLE `".$temp_name."` ".$sql2;
|
$sql3 = "ALTER" . $ignore . " TABLE `".$temp_name."` ".$sql2;
|
||||||
} else {
|
} else {
|
||||||
$sql3 .= ", ".$sql2;
|
$sql3 .= ", ".$sql2;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue