Skip to content

Commit

Permalink
Fix: Respect change of output of doctrine:migrate --dry-run
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Uhlmann authored Apr 14, 2021
1 parent 2478fb5 commit 2132dd3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tasks/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@
*/

task('database:backup:automatic', static function () {
if (run('{{flow_command}} doctrine:migrate --dry-run 2>&1 || true') !== 'No migrations to execute.') {
$dryRun = run('{{flow_command}} doctrine:migrate --dry-run 2>&1 || true');
if (strpos($dryRun, 'Already at the latest version') === false && strpos($dryRun, 'No migrations to execute.') === false) {
writebox('Because there are migrations to execute,<br>a backup of the database will be created…');
dbBackup();
}
Expand Down

0 comments on commit 2132dd3

Please sign in to comment.