From bba7d98c36f34fada389ca9d8a3dc76436fc9f04 Mon Sep 17 00:00:00 2001 From: Orion Kindel Date: Thu, 20 Jul 2023 00:31:54 -0500 Subject: [PATCH] fix: gen-migrations workflow --- scripts/build.sh | 2 -- scripts/diff.sh | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/build.sh b/scripts/build.sh index 5f100a2..265a71b 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -49,5 +49,3 @@ docker compose up -d "$base_or_head" isready initdb || (docker compose logs "$base_or_head" && exit 1) ls ./schema/ | xargs -I{} bash -c "set -e; $(declare -f query_file); query_file \"$(db dnim)\" ./schema/{}" || (docker compose logs "$base_or_head" && exit 1) - -cd "../" diff --git a/scripts/diff.sh b/scripts/diff.sh index b4e5e18..b63b1da 100755 --- a/scripts/diff.sh +++ b/scripts/diff.sh @@ -24,7 +24,8 @@ if [[ -z "$base" ]] || [[ -z "$head" ]]; then fi if [[ ! -f "$migration" ]]; then - docker compose down -v + docker stop base head + docker rm base head ./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)