From 4c8456852771ab81b195ef465936cd6d9fe2e661 Mon Sep 17 00:00:00 2001 From: Benoit VIGNAL Date: Tue, 5 Nov 2024 18:14:31 +0100 Subject: [PATCH] Add ignore migration bool check --- docker/frankenphp/docker-entrypoint.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docker/frankenphp/docker-entrypoint.sh b/docker/frankenphp/docker-entrypoint.sh index f40e99f..6329f95 100755 --- a/docker/frankenphp/docker-entrypoint.sh +++ b/docker/frankenphp/docker-entrypoint.sh @@ -31,13 +31,14 @@ if [ "$1" = 'frankenphp' ] || [ "$1" = 'php' ] || [ "$1" = 'bin/console' ]; then fi - if [ $IGNORE_MIGRATION == "false" ]; then + if [ $IGNORE_MIGRATION == "true" ]; then + echo "Doctrine migration has been ignored because 'IGNORE_MIGRATION' env var is set to 'true'." + echo "Setting it to anything else will make the doctrine migration to be executed." + else echo "Executing doctrine migration" if [ "$( find ./migrations -iname '*.php' -print -quit )" ]; then php bin/console doctrine:migrations:migrate --no-interaction --all-or-nothing fi - else - echo "Doctrine migration has been ignored because IGNORE_MIGRATION env var is present" fi fi