]> git.joonet.de Git - adminer.git/commitdiff
Display length in full type
authorJakub Vrana <jakub@vrana.cz>
Tue, 11 May 2010 21:17:11 +0000 (23:17 +0200)
committerJakub Vrana <jakub@vrana.cz>
Wed, 12 May 2010 21:58:47 +0000 (23:58 +0200)
adminer/drivers/mssql.inc.php

index f7f1f44654c94e37c282f28bd9fad207e68bc1fd..399437e5675d50cea532cd4d27c0b127c5946860 100644 (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"],