1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-10 16:44:17 +02:00

Display length in full type

This commit is contained in:
Jakub Vrana
2010-05-11 23:17:11 +02:00
parent 9f10f2282d
commit de08000b0b

View File

@@ -320,11 +320,12 @@ LEFT JOIN sys.default_constraints d ON c.default_object_id = d.parent_column_id
WHERE o.schema_id = SCHEMA_ID(" . $connection->quote(get_schema()) . ") AND o.type IN ('S', 'U', 'V') AND o.name = " . $connection->quote($table)
);
while ($row = $result->fetch_assoc()) {
$length = $row["max_length"]; //! precision, scale
$return[$row["name"]] = array(
"field" => $row["name"],
"full_type" => $row["type"],
"full_type" => $row["type"] . ($length ? "($length)" : ""),
"type" => $row["type"],
"length" => $row["max_length"], //! precision, scale
"length" => $length,
"default" => $row["default"],
"null" => $row["is_nullable"],
"auto_increment" => $row["is_identity"],