From e0e6f9074f433e67839a6b5054a1e6a3f50ade49 Mon Sep 17 00:00:00 2001 From: Jon Uhlmann Date: Tue, 15 Dec 2020 22:44:06 +0100 Subject: [PATCH] Fix: If doctrine:migrate --dry-run fails, run backup --- tasks/database.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/database.php b/tasks/database.php index 73e0894..121978d 100644 --- a/tasks/database.php +++ b/tasks/database.php @@ -85,7 +85,7 @@ */ task('database:backup:automatic', static function () { - if (run('{{flow_command}} doctrine:migrate --dry-run') !== 'No migrations to execute.') { + if (run('{{flow_command}} doctrine:migrate --dry-run 2>&1 || true') !== 'No migrations to execute.') { writebox('Because there are migrations to execute,
a backup of the database will be created…'); dbBackup(); }