Commit 6d638edf authored by Stan Hu's avatar Stan Hu

Merge branch 'ab/check-schema-versions-added' into 'master'

Check schema versions information file was added (CI)

See merge request gitlab-org/gitlab!37722
parents f6ec55c3 8095f764
......@@ -10,6 +10,16 @@ schema_changed() {
else
printf "Schema changes are correctly applied to db/structure.sql\n"
fi
if [ ! -z "$(git add -A -n db/schema_migrations)" ]; then
printf "Schema version files have not been committed to the repository:\n"
printf "The following files should be committed:\n"
diff=$(git add -A -n db/schema_migrations)
printf "%s" "$diff"
exit 2
else
printf "Schema changes are correctly applied to db/structure.sql and db/schema_migrations/\n"
fi
}
schema_changed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment