diff --git a/core/upgrade/app_config.php b/core/upgrade/app_config.php index 726ce112f4..79c8a5b0ea 100644 --- a/core/upgrade/app_config.php +++ b/core/upgrade/app_config.php @@ -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)"; diff --git a/resources/schema.php b/resources/schema.php index 9c555f17b8..d1a88dc19b 100644 --- a/resources/schema.php +++ b/resources/schema.php @@ -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";