From f49c43875bde791c8c0c42509eeec5a55f148a9f Mon Sep 17 00:00:00 2001 From: Roy Crihfield Date: Fri, 28 Jun 2024 19:27:26 +0800 Subject: [PATCH] simplify startup script --- scripts/startup_script.sh | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/scripts/startup_script.sh b/scripts/startup_script.sh index 9e07753..66a29a5 100755 --- a/scripts/startup_script.sh +++ b/scripts/startup_script.sh @@ -1,5 +1,4 @@ #!/bin/sh -# Runs the db migrations set -e # Default command is "goose up" @@ -11,14 +10,5 @@ fi VDB_PG_CONNECT=postgresql://$DATABASE_USER:$DATABASE_PASSWORD@$DATABASE_HOSTNAME:$DATABASE_PORT/$DATABASE_NAME?sslmode=disable # Run the DB migrations -echo "Connecting with: $VDB_PG_CONNECT" -echo "Running database migrations" -./goose -dir migrations postgres "$VDB_PG_CONNECT" "$@" - -# If the db migrations ran without err -if [[ $? -eq 0 ]]; then - echo "Migration process ran successfully" -else - echo "Could not run migrations. Are the database details correct?" - exit 1 -fi +set -x +exec ./goose -dir migrations postgres "$VDB_PG_CONNECT" "$@"