Enable migration to be ignored, even if we have to migrate

This commit is contained in:
Deon George 2022-02-06 15:10:24 +11:00
parent 6d37d4ae78
commit 546ebcc610

4
init
View File

@ -104,6 +104,7 @@ if [ "${role}" = "app" -a -e artisan ]; then
su www-data -s /bin/sh -c "(php artisan optimize && php artisan view:cache)"
fi
if [ -z "${IGNORE_MIGRATION}" ]; then
if [ -r .migrate ]; then
echo "* Running migration..."
# If DB_HOST not set, source the env file
@ -119,6 +120,9 @@ if [ "${role}" = "app" -a -e artisan ]; then
su www-data -s /bin/sh -c "php artisan migrate" && rm -f .migrate
fi
else
[ -r .migrate ] && echo "! NOTE: Migration ignored due to IGNORE_MIGRATION"
fi
# If passport is installed
if [ -d ${php}/vendor/laravel/passport ]; then