From 55e8429e751f23947b96df85fe5f09e8f1f9eec0 Mon Sep 17 00:00:00 2001 From: Deon George Date: Tue, 14 May 2019 20:01:45 +1000 Subject: [PATCH] Made migration controlled by a dot file --- init | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/init b/init index 106c7d4..99602d9 100755 --- a/init +++ b/init @@ -18,8 +18,12 @@ if [ "${role}" = "app" -a -e artisan ]; then su www-data -s /bin/sh -c "composer install" && ( test -e .composer.refresh && rm -f .composer.refresh ) fi - echo "Running migration..." - (php artisan migrate) + if [ -r .migrate ]; then + echo "Running migration..." + php artisan migrate + rm -f .migrate + fi + echo "Caching configuration..." (php artisan config:cache && php artisan route:cache && php artisan view:cache) fi