diff options
author | Rémy Coutable <remy@rymai.me> | 2017-09-19 19:11:08 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-09-19 19:11:08 +0300 |
commit | 02b398d3e9fee38b84296ce1519c039ee6c1a3ad (patch) | |
tree | 2e2f6f55a267b4b013aa1342fd406859ac0fa582 /scripts/schema_changed.sh | |
parent | e0332ecf6e64ef5d5a925f209d62d2d781e73834 (diff) | |
parent | 9cd0d68fe90f27ad297317cd8cc5e8f81c2d75a9 (diff) |
Merge branch 'dz-check-schema' into 'master'
Add rake task to check db schema is valid
Closes #37568
See merge request gitlab-org/gitlab-ce!14365
Diffstat (limited to 'scripts/schema_changed.sh')
-rw-r--r-- | scripts/schema_changed.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/schema_changed.sh b/scripts/schema_changed.sh new file mode 100644 index 00000000000..5de2b35571d --- /dev/null +++ b/scripts/schema_changed.sh @@ -0,0 +1,10 @@ +function schema_changed() { + if [[ ! -z `git diff --name-only -- db/schema.rb` ]]; then + echo "db/schema.rb after rake db:migrate:reset is different from one in the repository" + exit 1 + else + echo "db/schema.rb after rake db:migrate:reset matches one in the repository" + fi +} + +schema_changed |