mirror of
https://github.com/vrana/adminer.git
synced 2025-08-08 15:47:00 +02:00
MariaDB: Add support for UUID data type
- MariaDB >= 10.7 - UUID string data type - uuid() function for UUID type on new/edit item form
This commit is contained in:
@@ -107,7 +107,7 @@ function min_version($version, $maria_db = "", $connection2 = null) {
|
||||
$server_info = $match[1];
|
||||
$version = $maria_db;
|
||||
}
|
||||
return (version_compare($server_info, $version) >= 0);
|
||||
return $version && version_compare($server_info, $version) >= 0;
|
||||
}
|
||||
|
||||
/** Get connection charset
|
||||
@@ -1495,6 +1495,10 @@ function edit_form($table, $fields, $row, $update) {
|
||||
$value = "";
|
||||
$function = "now";
|
||||
}
|
||||
if ($field["type"] == "uuid" && $value == "uuid()") {
|
||||
$value = "";
|
||||
$function = "uuid";
|
||||
}
|
||||
input($field, $value, $function);
|
||||
echo "\n";
|
||||
}
|
||||
|
Reference in New Issue
Block a user