Skip to content

Commit 79912ae

Browse files
authored
Merge pull request #32 from rikwillems/fix-setup-upgrade
No setup upgrade but db-schema and db-data upgrade
2 parents 66d1ee4 + c099345 commit 79912ae

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

recipe/magento_2_1/database.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,7 @@
77

88
namespace Deployer;
99

10-
task('database:upgrade', '{{bin/php}} {{magento_bin}} setup:upgrade --keep-generated');
10+
task('database:upgrade', function () {
11+
run('{{bin/php}} {{release_path}}/{{magento_bin}} setup:db-schema:upgrade --no-interaction');
12+
run('{{bin/php}} {{release_path}}/{{magento_bin}} setup:db-data:upgrade --no-interaction');
13+
});

recipe/magento_2_2/database.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@
3030
});
3131

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

0 commit comments

Comments
 (0)