Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/check-db-structure9
1 files changed, 9 insertions, 0 deletions
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/
'