index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2018-05-09 09:48:21 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-05-09 09:48:21 +0200 |
commit | d9b9a2f81e539357feab0d2cc2e3042c5844294c (patch) | |
tree | f807d2c3731e01ed5fbb9b053ae94b2a7bc2fe08 /bin | |
parent | c35534f22082b9d5bf23797bd3fbb36f8b738254 (diff) |
-rwxr-xr-x | bin/check-db-structure | 23 |
diff --git a/bin/check-db-structure b/bin/check-db-structure index 3b85756..5f7d9c2 100755 --- a/bin/check-db-structure +++ b/bin/check-db-structure @@ -5,6 +5,8 @@ # shellcheck source=../conf/default.conf . "${0%/*}/../conf/default.conf" +# stored functions + # shellcheck disable=SC2016 { printf 'SELECT `proc`.`name` FROM `mysql`.`proc` WHERE `proc`.`Db`="buildmaster"' | \ @@ -18,6 +20,9 @@ s/ \(SELECT\|FROM\|\(LEFT \|RIGHT \)\?JOIN\|ON\|WHERE\) /\n\t\1 /g s/(SELECT/(\nSELECT/g ' + +# table headers + # shellcheck disable=SC2016 { printf 'SHOW TABLES' | \ @@ -31,3 +36,21 @@ s/ AUTO_INCREMENT=[0-9]\+ / /g s/^ /\t/ ' + +# content of "constant" tables +mysqldump --skip-lock-tables 'buildmaster' \ + 'architectures' \ + 'dependency_types' \ + 'email_actions' \ + 'fail_reasons' \ + 'git_repositories' \ + 'repositories' \ + 'repository_moves' \ + 'repository_stabilities' \ + 'repository_stability_relations' \ + 'upstream_repositories' | \ + grep '^INSERT ' | \ + sed ' + s/),(/),\n (/g + s/VALUES (/VALUES\n (/g + ' |