fix: gen-migrations workflow
Some checks failed
gen-migrations / gen-migrations (push) Failing after 12s

This commit is contained in:
Orion Kindel 2023-07-19 19:09:20 -05:00
parent 2c288ef32f
commit 5169bcbfd2
Signed by untrusted user who does not match committer: orion
GPG Key ID: 6D4165AE4C928719
2 changed files with 3 additions and 2 deletions

View File

@ -18,6 +18,7 @@ docker compose stop "$base_or_head" 1>/dev/null
docker compose rm -f "$base_or_head" 1>/dev/null
db() {
echo -n "postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD/$1?port=$port"
echo -n "postgresql:///$1?port=$port&user=$POSTGRES_USER&password=$POSTGRES_PASSWORD"
}
@ -62,4 +63,4 @@ docker compose up -d "$base_or_head" 1>/dev/null
isready
initdb
ls ./schema/ | xargs -I{} bash -c "set -e; $(declare -f query_file); query_file $(db dnim) ./schema/{}"
ls ./schema/ | xargs -I{} bash -c "set -e; $(declare -f query_file); query_file \"$(db dnim)\" ./schema/{}"

View File

@ -29,7 +29,7 @@ if [[ ! -f "$migration" ]]; then
until pg_isready -p 5432 1>/dev/null && pg_isready -p 5433 1>/dev/null; do true; done;
migra --unsafe $(db 5432) $(db 5433) || echo "migra exited with code $?. this is /probably/ fine" 1>&2
migra --unsafe "$(db 5432)" "$(db 5433)" || echo "migra exited with code $?. this is /probably/ fine" 1>&2
else
cat "$migration"
fi