[4.5] Fix the ALTER TABLE (#4097)

* Fix the ALTER TABLE

when $apps[$x]['db'][$y]['fields'][$z]['name'] is an array, you dont try to get the ['text'] index therefore fields such as v_xml_cdr.xml_uuid, v_destinations.destination_type and v_destinations.destination_number wont be created when upgrading.

This patch fixes it

* Update schema.php
This commit is contained in:
Luis Daniel Lucio Quiroz
2019-05-08 16:02:20 -04:00
committed by FusionPBX
parent 24d34128df
commit 8822528227

View File

@@ -648,6 +648,11 @@ if (!class_exists('schema')) {
$sql_update .= "ALTER TABLE ".$table_name." ADD ".$field['name']." ".$field_type.";\n";
}
}
else {
if ($field['exists'] == "false") {
$sql_update .= "ALTER TABLE ".$table_name." ADD ".$field['name']["text"]." ".$field_type.";\n";
}
}
}
//rename fields where the name has changed
if (is_array($field['name'])) {