dbstructure: check for comment value or use default

fix #6119
This commit is contained in:
fabrixxm 2018-11-17 11:43:01 +01:00
parent 460c257cb4
commit c13e078c42

View File

@ -329,8 +329,9 @@ class DBStructure
}
if (isset($database[$name]["table_status"]["Comment"])) {
if ($database[$name]["table_status"]["Comment"] != $structure['comment']) {
$sql2 = "COMMENT = '".DBA::escape($structure['comment'])."'";
$structurecomment = defaults($structure, "comment", "");
if ($database[$name]["table_status"]["Comment"] != $structurecomment) {
$sql2 = "COMMENT = '".DBA::escape($structurecomment)."'";
if ($sql3 == "") {
$sql3 = "ALTER" . $ignore . " TABLE `".$temp_name."` ".$sql2;