fix: diff should skip schemaless migrations
All checks were successful
gen-migrations / gen-migrations (push) Successful in 6s

This commit is contained in:
Orion Kindel 2023-07-20 12:09:50 -05:00
parent 60a672d45c
commit f9fa3761b5
Signed by untrusted user who does not match committer: orion
GPG Key ID: 6D4165AE4C928719
2 changed files with 4 additions and 3 deletions

@ -1 +1 @@
Subproject commit 359aa9bf7cf72ae7dbe473072bab0f0ecd449813
Subproject commit 2d996399411565af57e30ca2d2082764bd1ed9e1

View File

@ -23,13 +23,14 @@ if [[ -z "$base" ]] || [[ -z "$head" ]]; then
exit 1;
fi
if ! (git diff --quiet "$base..$head" -- ./schema); then
schema_changed=$(git diff --quiet "$base" "$head" -- ./schema)
schema_changed_exit=$?
if [[ $schema_changed_exit="1" ]]; then
echo ""
exit 0;
fi;
if [[ ! -f "$migration" ]]; then
docker compose down -v
./scripts/build.sh base "$base" 1>&2 || (echo "base failed to build" && exit 1)
./scripts/build.sh head "$head" 1>&2 || (echo "head failed to build" && exit 1)