fix: gen-migrations workflow
Some checks failed
gen-migrations / gen-migrations (push) Failing after 12s
Some checks failed
gen-migrations / gen-migrations (push) Failing after 12s
This commit is contained in:
parent
2c288ef32f
commit
5169bcbfd2
@ -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/{}"
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user