index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2018-04-19 10:57:40 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-04-19 11:00:37 +0200 |
commit | 098856d74848fedc0233aa0530015b912861238f (patch) | |
tree | 9c54b40917ef20c6fe828713cc9003d098376d9a /bin/check-db-structure | |
parent | 89c2daf4f7979550b94e29306f46169a339db0ce (diff) |
-rwxr-xr-x | bin/check-db-structure | 9 |
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/ ' |