summaryrefslogtreecommitdiffstats
path: root/bin/udd-query.sh
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-01-06 01:49:37 +0100
committerHolger Levsen <holger@layer-acht.org>2015-01-06 01:49:37 +0100
commitb45b4658307711999581788dba85826bd857aef6 (patch)
tree900f1ad0390050173394813a513ba415ca58ad02 /bin/udd-query.sh
parent05c2b419071da0aaa48ea6cfefaa3b527dd8822a (diff)
downloadjenkins.debian.net-b45b4658307711999581788dba85826bd857aef6.tar.xz
udd: also describe tables
Diffstat (limited to 'bin/udd-query.sh')
-rwxr-xr-xbin/udd-query.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/bin/udd-query.sh b/bin/udd-query.sh
index 50ac1de8..92de9829 100755
--- a/bin/udd-query.sh
+++ b/bin/udd-query.sh
@@ -27,7 +27,13 @@ list_tables() {
FROM information_schema.tables
ORDER BY table_schema,table_name;"
udd_query
- cat $UDD
+ echo
+ for TABLE in $(cat $UDD | cut -d "|" -f2) ; do
+ SQL_QUERY="SELECT column_name, data_type, character_maximum_length
+ FROM INFORMATION_SCHEMA.COLUMNS where table_name = '$TABLE';"
+ cat $UDD
+ echo
+ done
rm $UDD
}