diff --git a/config/application.config.php-dist-BO b/config/application.config.php-dist-BO index b7e2a90..090d11a 100644 --- a/config/application.config.php-dist-BO +++ b/config/application.config.php-dist-BO @@ -6,6 +6,13 @@ * @see https://github.com/zendframework/ZFTool */ $env = getenv('APP_ENV') ?: 'production'; + +if(file_exists('data/cache/upgrade')){ + $env = 'upgrade'; + putenv('APP_ENV',$env); + unlink('data/cache/upgrade'); +} + return array( 'modules' => array( 'DoctrineModule', diff --git a/config/application.config.php-dist-FO b/config/application.config.php-dist-FO index ee624df..069f670 100644 --- a/config/application.config.php-dist-FO +++ b/config/application.config.php-dist-FO @@ -6,6 +6,13 @@ * @see https://github.com/zendframework/ZFTool */ $env = getenv('APP_ENV') ?: 'production'; + +if(file_exists('data/cache/upgrade')){ + $env = 'upgrade'; + putenv('APP_ENV',$env); + unlink('data/cache/upgrade'); +} + return array( 'modules' => array( 'DoctrineModule', diff --git a/scripts/update-all.sh b/scripts/update-all.sh index 6cf2598..1e54a58 100755 --- a/scripts/update-all.sh +++ b/scripts/update-all.sh @@ -71,3 +71,6 @@ fi php ./public/index.php orm:clear-cache:metadata php ./public/index.php orm:clear-cache:query php ./public/index.php orm:clear-cache:result + +# Clear ZF2 cache +touch ./data/cache/upgrade && chmod 777 ./data/cache/upgrade