1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-21 05:41:27 +02:00

MSSQL: Don't trucate displayed comments to 30 chars (use varchar maximum of 8000 upon casting)

This commit is contained in:
Michal Adamec
2020-03-18 17:26:50 +01:00
committed by Jakub Vrana
parent 84063fb7cd
commit 8762895bb3
2 changed files with 2 additions and 1 deletions

View File

@@ -368,7 +368,7 @@ if (isset($_GET["mssql"])) {
}
function fields($table) {
$comments = get_key_vals("SELECT objname, cast(value as varchar) FROM fn_listextendedproperty('MS_DESCRIPTION', 'schema', " . q(get_schema()) . ", 'table', " . q($table) . ", 'column', NULL)");
$comments = get_key_vals("SELECT objname, cast(value as varchar(max)) FROM fn_listextendedproperty('MS_DESCRIPTION', 'schema', " . q(get_schema()) . ", 'table', " . q($table) . ", 'column', NULL)");
$return = array();
foreach (get_rows("SELECT c.max_length, c.precision, c.scale, c.name, c.is_nullable, c.is_identity, c.collation_name, t.name type, CAST(d.definition as text) [default]
FROM sys.all_columns c