From: Matthew Gamble Date: Sat, 5 Dec 2015 23:14:55 +0000 (+1100) Subject: Add plugin for printing table structure in expanded format X-Git-Tag: v4.3.0~52 X-Git-Url: https://git.joonet.de/?a=commitdiff_plain;h=4801da091bc53938f9c67cf74c46cedd306d3c25;p=adminer.git Add plugin for printing table structure in expanded format Instead of trying to squeeze everything into three columns, this plugin uses multiple columns for each part of a column's structure. --- diff --git a/plugins/table-structure.php b/plugins/table-structure.php new file mode 100644 index 00000000..5d8e5c05 --- /dev/null +++ b/plugins/table-structure.php @@ -0,0 +1,31 @@ +\n"; + echo "" . lang('Column') . "" . lang('Type') . "" . lang('Nullable') . "" . lang('Default') . (support("comment") ? "" . lang('Comment') : "") . "\n"; + foreach ($fields as $field) { + echo "" . h($field["field"]) . ($field["primary"] ? " (PRIMARY)" : ""); + echo "" . h($field["full_type"]) . ""; + echo ($field["auto_increment"] ? " " . lang('Auto Increment') . "" : ""); + echo ($field["collation"] ? " " . h($field["collation"]) . "" : ""); + echo "" . ($field["null"] ? lang('Yes') : lang('No')); + echo "" . (isset($field["default"]) ? h($field["default"]) : " "); + echo (support("comment") ? "" . nbsp($field["comment"]) : ""); + echo "\n"; + } + echo "\n"; + return true; + } +}