Skip to content

Commit

Permalink
Fix: If doctrine:migrate --dry-run fails, run backup
Browse files Browse the repository at this point in the history
  • Loading branch information
jonnitto committed Dec 15, 2020
1 parent 1530d18 commit e0e6f90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tasks/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,<br>a backup of the database will be created…');
dbBackup();
}
Expand Down

0 comments on commit e0e6f90

Please sign in to comment.