Commit 8095f764 authored by Andreas Brandl's avatar Andreas Brandl

Check db/schema_migrations have been committed

Relates to https://gitlab.com/gitlab-org/gitlab/-/issues/218590
parent 365bcd8d
......@@ -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