Skip to content

Commit

Permalink
Merge pull request #32 from rikwillems/fix-setup-upgrade
Browse files Browse the repository at this point in the history
No setup upgrade but db-schema and db-data upgrade
  • Loading branch information
osrecio authored Feb 25, 2019
2 parents 66d1ee4 + c099345 commit 79912ae
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 4 additions & 1 deletion recipe/magento_2_1/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,7 @@

namespace Deployer;

task('database:upgrade', '{{bin/php}} {{magento_bin}} setup:upgrade --keep-generated');
task('database:upgrade', function () {
run('{{bin/php}} {{release_path}}/{{magento_bin}} setup:db-schema:upgrade --no-interaction');
run('{{bin/php}} {{release_path}}/{{magento_bin}} setup:db-data:upgrade --no-interaction');
});
7 changes: 5 additions & 2 deletions recipe/magento_2_2/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@
});

task('database:upgrade', function () {
get('database_upgrade_needed') ?
run('{{bin/php}} {{release_path}}/{{magento_bin}} setup:upgrade --keep-generated --no-interaction') :
if (get('database_upgrade_needed')) {
run('{{bin/php}} {{release_path}}/{{magento_bin}} setup:db-schema:upgrade --no-interaction');
run('{{bin/php}} {{release_path}}/{{magento_bin}} setup:db-data:upgrade --no-interaction');
} else {
writeln('Skipped -> All Modules are up to date');
}
});

0 comments on commit 79912ae

Please sign in to comment.