File tree Expand file tree Collapse file tree 5 files changed +39
-15
lines changed
build-packages/magento-scripts/lib/tasks Expand file tree Collapse file tree 5 files changed +39
-15
lines changed Original file line number Diff line number Diff line change 1+ const adjustMagentoConfiguration = {
2+ title : 'Adjusting Magento Database Configuration' ,
3+ task : async ( ctx ) => {
4+ const { mysqlConnection } = ctx ;
5+
6+ // delete varnish configuration if exists
7+ await mysqlConnection . query ( `
8+ DELETE FROM core_config_data WHERE path LIKE '%varnish%';
9+ ` ) ;
10+
11+ // update cache policy to not use varnish
12+ await mysqlConnection . query ( `
13+ UPDATE core_config_data
14+ SET value = ?
15+ WHERE path = ?;
16+ ` , [ '0' , 'system/full_page_cache/caching_application' ] ) ;
17+ }
18+ } ;
19+
20+ module . exports = adjustMagentoConfiguration ;
Original file line number Diff line number Diff line change 11const flushRedisConfig = require ( './flush-redis-config' ) ;
22const waitingForRedis = require ( './waiting-for-redis' ) ;
33const migrateDatabase = require ( './migrate-database' ) ;
4- const configureElasticsearch = require ( './configure-elasticsearch' ) ;
54const createAdmin = require ( './create-admin' ) ;
65const setDeploymentMode = require ( './set-deployment-mode' ) ;
76const setBaseUrl = require ( './set-base-url' ) ;
@@ -16,11 +15,10 @@ const setupMagento = {
1615 flushRedisConfig ,
1716 waitingForRedis ,
1817 migrateDatabase ,
19- configureElasticsearch ,
20- createAdmin ,
21- setDeploymentMode ,
2218 setBaseUrl ,
2319 setUrlRewrite ,
20+ createAdmin ,
21+ setDeploymentMode ,
2422 postDeploy ,
2523 disable2fa
2624 ] , {
Original file line number Diff line number Diff line change 22/* eslint-disable no-param-reassign */
33// const runComposerCommand = require('../../../util/run-composer');
44const runMagentoCommand = require ( '../../../util/run-magento' ) ;
5+ const adjustMagentoConfiguration = require ( './adjust-magento-configuration' ) ;
6+ const configureElasticsearch = require ( './configure-elasticsearch' ) ;
57const installMagento = require ( './install-magento' ) ;
8+ const upgradeMagento = require ( './upgrade-magento' ) ;
69
710const migrateDatabase = {
811 title : 'Migrating database' ,
@@ -19,7 +22,8 @@ const migrateDatabase = {
1922 task . output = 'No Magento is installed in DB!\nInstalling...' ;
2023
2124 return task . newListr ( [
22- installMagento
25+ installMagento ,
26+ configureElasticsearch
2327 ] , {
2428 concurrent : false ,
2529 exitOnError : true ,
@@ -39,23 +43,25 @@ const migrateDatabase = {
3943 }
4044 case 1 : {
4145 return task . newListr ( [
42- installMagento
46+ installMagento ,
47+ configureElasticsearch
4348 ] , {
4449 concurrent : false ,
4550 exitOnError : true ,
4651 ctx
4752 } ) ;
4853 }
4954 case 2 : {
50- task . output = 'Upgrading magento' ;
51- await runMagentoCommand ( 'setup:upgrade' , {
52- magentoVersion,
53- callback : ( t ) => {
54- task . output = t ;
55- }
55+ task . output = 'Migrating database: upgrade magento' ;
56+ return task . newListr ( [
57+ adjustMagentoConfiguration ,
58+ configureElasticsearch ,
59+ upgradeMagento
60+ ] , {
61+ concurrent : false ,
62+ exitOnError : true ,
63+ ctx
5664 } ) ;
57- task . title = 'Migrating database: upgraded!' ;
58- break ;
5965 }
6066 default : {
6167 // TODO: handle these statuses ?
File renamed without changes.
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ const { getCachedPorts } = require('../../../config/get-port-config');
44const themeSymlink = require ( './theme-symlink' ) ;
55const installTheme = require ( './install-theme' ) ;
66const themeSubtask = require ( './theme-subtask' ) ;
7- const upgradeMagento = require ( './upgrade-magento' ) ;
7+ const upgradeMagento = require ( '../../magento/setup-magento /upgrade-magento' ) ;
88const disablePageCache = require ( './disable-page-cache' ) ;
99const checkThemeFolder = require ( './check-theme-folder' ) ;
1010
You can’t perform that action at this time.
0 commit comments