mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 09:03:49 +00:00
Fix the software_uuid issue for upgrade schema
This commit is contained in:
@@ -52,7 +52,7 @@
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "software_uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "software_uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
||||
|
||||
@@ -438,7 +438,7 @@ function db_upgrade_schema ($db, $db_type, $db_name, $display_results) {
|
||||
$db_field_type = db_column_data_type ($db, $db_type, $db_name, $table_name, $field_name);
|
||||
$field_type_array = explode("(", $field_type);
|
||||
$field_type = $field_type_array[0];
|
||||
if (trim($db_field_type) != trim($field_type)) {
|
||||
if (trim($db_field_type) != trim($field_type) && strlen($db_field_type) > 0) {
|
||||
if ($db_type == "pgsql") {
|
||||
if (strtolower($field_type) == "uuid") {
|
||||
$sql_update .= "ALTER TABLE ".$table_name." ALTER COLUMN ".$field_name." TYPE uuid USING\n";
|
||||
|
||||
Reference in New Issue
Block a user