Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/check-db-structure19
1 files changed, 19 insertions, 0 deletions
diff --git a/bin/check-db-structure b/bin/check-db-structure
new file mode 100755
index 0000000..f0cdf89
--- /dev/null
+++ b/bin/check-db-structure
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+# shellcheck source=../conf/default.conf
+. "${0%/*}/../conf/default.conf"
+
+# shellcheck disable=SC2016
+{
+ printf 'SELECT `proc`.`name` FROM `mysql`.`proc` WHERE `proc`.`Db`="buildmaster"' | \
+ mysql_run_query | \
+ while read -r procedure; do
+ printf 'SHOW CREATE PROCEDURE `%s`;\n' "${procedure}"
+ done
+ printf 'SHOW TABLES' | \
+ mysql_run_query | \
+ while read -r table; do
+ printf 'SHOW CREATE TABLE `%s`;\n' "${table}"
+ done
+} | \
+ mysql_run_query