Skip to content

Commit

Permalink
Add ignore migration bool check
Browse files Browse the repository at this point in the history
  • Loading branch information
froozeify committed Nov 5, 2024
1 parent b27a0a6 commit 4c84568
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions docker/frankenphp/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4c84568

Please sign in to comment.