From 098856d74848fedc0233aa0530015b912861238f Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 19 Apr 2018 10:57:40 +0200 Subject: bin/check-db-structure, misc/database-layout.dump: tried to make dump nicer --- bin/check-db-structure | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'bin/check-db-structure') diff --git a/bin/check-db-structure b/bin/check-db-structure index c92182c..cb63c42 100755 --- a/bin/check-db-structure +++ b/bin/check-db-structure @@ -10,6 +10,14 @@ while read -r procedure; do printf 'SHOW CREATE PROCEDURE `%s`;\n' "${procedure}" done +} | \ + mysql_run_query | \ + sed ' + s/ \(SELECT\|FROM\|\(LEFT \|RIGHT \)\?JOIN\|ON\|WHERE\) /\n\t\1 /g + s/(SELECT/(\nSELECT/g + ' +# shellcheck disable=SC2016 +{ printf 'SHOW TABLES' | \ mysql_run_query | \ while read -r table; do @@ -19,4 +27,5 @@ mysql_run_query | \ sed ' s/ AUTO_INCREMENT=[0-9]\+ / /g + s/^ /\t/ ' -- cgit v1.2.3-70-g09d2