mirror of
https://github.com/vrana/adminer.git
synced 2025-08-10 00:28:34 +02:00
PostgreSQL: Export ENUM types (bug #587)
This commit is contained in:
@@ -909,11 +909,11 @@ function input($field, $value, $function) {
|
||||
$functions = (isset($_GET["select"]) || $reset ? array("orig" => lang('original')) : array()) + $adminer->editFunctions($field);
|
||||
$disabled = stripos($field["default"], "GENERATED ALWAYS AS ") === 0 ? " disabled=''" : "";
|
||||
$attrs = " name='fields[$name]'$disabled";
|
||||
if ($jush == "pgsql" && in_array($field["type"], (array) $structured_types[lang('User types')])) {
|
||||
$enums = get_vals("SELECT enumlabel FROM pg_enum WHERE enumtypid = " . $types[$field["type"]] . " ORDER BY enumsortorder");
|
||||
if (in_array($field["type"], (array) $structured_types[lang('User types')])) {
|
||||
$enums = type_values($types[$field["type"]]);
|
||||
if ($enums) {
|
||||
$field["type"] = "enum";
|
||||
$field["length"] = "'" . implode("','", array_map('addslashes', $enums)) . "'";
|
||||
$field["length"] = $enums;
|
||||
}
|
||||
}
|
||||
if ($field["type"] == "enum") {
|
||||
|
Reference in New Issue
Block a user