diff --git a/dist/tasks/importTask.js b/dist/tasks/importTask.js index 7d66004..ddc5d0a 100644 --- a/dist/tasks/importTask.js +++ b/dist/tasks/importTask.js @@ -18,12 +18,10 @@ class ImportTask { this.importTasks.push({ title: 'Importing database', task: () => tslib_1.__awaiter(this, void 0, void 0, function* () { - // Drop database - yield console_1.localhostMagentoRootExec(`magerun2 db:drop -f -q`, config); // Create database yield console_1.localhostMagentoRootExec(`magerun2 db:create -q`, config); // Import SQL file to database - yield console_1.localhostMagentoRootExec(`magerun2 db:import ${config.serverVariables.databaseName}.sql --force --skip-authorization-entry-creation -q`, config); + yield console_1.localhostMagentoRootExec(`magerun2 db:import ${config.serverVariables.databaseName}.sql --force --skip-authorization-entry-creation -q --drop`, config); // Add default admin authorization rules (Fix for missing auth roles) yield console_1.localhostMagentoRootExec(`magerun2 db:add-default-authorization-entries -q`, config); }) diff --git a/dist/tasks/importTask.js.map b/dist/tasks/importTask.js.map index b06e356..8e9d8f8 100644 --- a/dist/tasks/importTask.js.map +++ b/dist/tasks/importTask.js.map @@ -1 +1 @@ -{"version":3,"file":"importTask.js","sourceRoot":"","sources":["../../src/tasks/importTask.ts"],"names":[],"mappings":";;;AAAA,8CAA4D;AAG5D,MAAM,UAAU;IAAhB;QACY,gBAAW,GAAG,EAAE,CAAC;QAEzB,cAAS,GAAG,CAAO,IAAS,EAAE,MAAW,EAAE,EAAE;YACzC,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;YAClC,OAAO,IAAI,CAAC;QAChB,CAAC,CAAA,CAAA;QAED,YAAY;QACZ,aAAQ,GAAG,CAAO,IAAS,EAAE,MAAW,EAAE,EAAE;YACxC,IAAI,CAAC,GAAG,CACJ;gBACI,KAAK,EAAE,sCAAsC;gBAC7C,IAAI,EAAE,CAAC,GAAQ,EAAE,IAAS,EAAS,EAAE,CACrC,IAAI,CAAC,QAAQ,CACT,IAAI,CAAC,WAAW,CACnB;aACJ,CACJ,CAAA;YAED,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CAAC,yBAAyB,MAAM,CAAC,SAAS,CAAC,YAAY,CAAC,IAAI,KAAK,MAAM,CAAC,SAAS,CAAC,YAAY,CAAC,QAAQ,IAAI,MAAM,CAAC,SAAS,CAAC,YAAY,CAAC,MAAM,IAAI,MAAM,CAAC,eAAe,CAAC,WAAW,iLAAiL,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;oBACxZ,CAAC,CAAA;iBACJ,CACJ,CAAC;aACL;YAED,IAAI,CAAC,WAAW,CAAC,IAAI,CACjB;gBACI,KAAK,EAAE,aAAa;gBACpB,IAAI,EAAE,GAAwB,EAAE;oBAC5B,wBAAwB;oBACxB,MAAM,kCAAwB,CAAC,KAAK,GAAG,MAAM,CAAC,eAAe,CAAC,YAAY,GAAG,MAAM,EAAE,MAAM,CAAC,CAAC;gBACjG,CAAC,CAAA;aACJ,CACJ,CAAC;QACN,CAAC,CAAA,CAAA;IACL,CAAC;CAAA;AAED,kBAAe,UAAU,CAAA"} \ No newline at end of file diff --git a/dist/tasks/magentoConfigureTask.js b/dist/tasks/magentoConfigureTask.js index e0e30a0..c78fc65 100644 --- a/dist/tasks/magentoConfigureTask.js +++ b/dist/tasks/magentoConfigureTask.js @@ -74,7 +74,6 @@ class MagentoConfigureTask { dbQueryUpdate = dbQueryUpdate + `UPDATE core_config_data SET value = '${config.settings.currentFolderName}_development_' WHERE path LIKE '%elastic_prefix%';`, dbQueryUpdate = dbQueryUpdate + `UPDATE core_config_data SET value = 'elasticsearch7' WHERE path = 'catalog/search/engine';`; } - // @TODO: Mirasvit // Build up query dbQuery = dbQueryUpdate; yield console_1.localhostMagentoRootExec('magerun2 db:query "' + dbQuery + '"', config); diff --git a/dist/tasks/magentoConfigureTask.js.map b/dist/tasks/magentoConfigureTask.js.map index 5e11b39..c4d2c33 100644 --- a/dist/tasks/magentoConfigureTask.js.map +++ b/dist/tasks/magentoConfigureTask.js.map @@ -1 +1 @@ -{"version":3,"file":"magentoConfigureTask.js","sourceRoot":"","sources":["../../src/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AwB,EAAE;oBAC5B,0CAA0C;oBAC1C,IAAI,MAAM,CAAC,QAAQ,CAAC,iBAAiB,EAAE;wBACnC,MAAM,kCAAwB,CAAC,uHAAuH,EAAE,MAAM,CAAC,CAAC;qBACnK;gBACL,CAAC,CAAA;aACJ,CACJ,CAAC;YAEF,IAAI,CAAC,cAAc,CAAC,IAAI,CACpB;gBACI,KAAK,EAAE,yBAAyB;gBAChC,IAAI,EAAE,GAAwB,EAAE;oBAC5B,kDAAkD;oBAClD,MAAM,kCAAwB,CAAC,yEAAyE,EAAE,MAAM,CAAC,CAAC;gBACtH,CAAC,CAAA;aACJ,CACJ,CAAC;QACN,CAAC,CAAA,CAAA;IACL,CAAC;CAAA;AAED,kBAAe,oBAAoB,CAAA"} \ No newline at end of file +{"version":3,"file":"magentoConfigureTask.js","sourceRoot":"","sources":["../../src/tasks/magentoConfigureTask.ts"],"names":[],"mappings":";;;AAAA,8CAA4D;AAE5D,uFAAmD;AAEnD,MAAM,oBAAoB;IAA1B;QACY,mBAAc,GAAG,EAAE,CAAC;QAE5B,cAAS,GAAG,CAAO,IAAS,EAAE,MAAW,EAAE,EAAE;YACzC,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;YAClC,OAAO,IAAI,CAAC;QAChB,CAAC,CAAA,CAAA;QAED,YAAY;QACZ,aAAQ,GAAG,CAAO,IAAS,EAAE,MAAW,EAAE,EAAE;YACxC,IAAI,CAAC,GAAG,CACJ;gBACI,KAAK,EAAE,2CAA2C;gBAClD,IAAI,EAAE,CAAC,GAAQ,EAAE,IAAS,EAAS,EAAE,CACrC,IAAI,CAAC,QAAQ,CACT,IAAI,CAAC,cAAc,CACtB;aACJ,CACJ,CAAA;YAED,IAAI,CAAC,cAAc,CAAC,IAAI,CACpB;gBACI,KAAK,EAAE,4DAA4D;gBACnE,IAAI,EAAE,GAAwB,EAAE;oBAC5B,IAAI,OAAO,GAAG,EAAE,CAAC;oBACjB,iBAAiB;oB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CAAC,cAAc,CAAC,IAAI,CACpB;gBACI,KAAK,EAAE,4CAA4C;gBACnD,IAAI,EAAE,GAAwB,EAAE;oBAC5B,oCAAoC;oBACpC,MAAM,kCAAwB,CAAC,+DAA+D,EAAE,MAAM,CAAC,CAAC;gBAC5G,CAAC,CAAA;aACJ,CACJ,CAAC;YAEF,IAAI,CAAC,cAAc,CAAC,IAAI,CACpB;gBACI,KAAK,EAAE,yBAAyB;gBAChC,IAAI,EAAE,GAAwB,EAAE;oBAC5B,wBAAwB;oBACxB,MAAM,kCAAwB,CAAC,uBAAuB,EAAE,MAAM,CAAC,CAAC;gBACpE,CAAC,CAAA;aACJ,CACJ,CAAC;YAEF,IAAI,CAAC,cAAc,CAAC,IAAI,CACpB;gBACI,KAAK,EAAE,oBAAoB;gBAC3B,IAAI,EAAE,GAAwB,EAAE;oBAC5B,0CAA0C;oBAC1C,IAAI,MAAM,CAAC,QAAQ,CAAC,iBAAiB,EAAE;wBACnC,MAAM,kCAAwB,CAAC,uHAAuH,EAAE,MAAM,CAAC,CAAC;qBACnK;gBACL,CAAC,CAAA;aACJ,CACJ,CAAC;YAEF,IAAI,CAAC,cAAc,CAAC,IAAI,CACpB;gBACI,KAAK,EAAE,yBAAyB;gBAChC,IAAI,EAAE,GAAwB,EAAE;oBAC5B,kDAAkD;oBAClD,MAAM,kCAAwB,CAAC,yEAAyE,EAAE,MAAM,CAAC,CAAC;gBACtH,CAAC,CAAA;aACJ,CACJ,CAAC;QACN,CAAC,CAAA,CAAA;IACL,CAAC;CAAA;AAED,kBAAe,oBAAoB,CAAA"} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index e7f83b5..7676265 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "mage-db-sync", - "version": "0.5.8", + "version": "0.5.9", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index abc8260..8700a53 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mage-db-sync", - "version": "0.5.8", + "version": "0.5.9", "description": "Database synchronizer for Magento, based on Magerun", "author": { "name": "Jelle Siderius" diff --git a/src/tasks/importTask.ts b/src/tasks/importTask.ts index aa8c1ee..f178830 100644 --- a/src/tasks/importTask.ts +++ b/src/tasks/importTask.ts @@ -25,12 +25,10 @@ class ImportTask { { title: 'Importing database', task: async (): Promise => { - // Drop database - await localhostMagentoRootExec(`magerun2 db:drop -f -q`, config); // Create database await localhostMagentoRootExec(`magerun2 db:create -q`, config); // Import SQL file to database - await localhostMagentoRootExec(`magerun2 db:import ${config.serverVariables.databaseName}.sql --force --skip-authorization-entry-creation -q`, config); + await localhostMagentoRootExec(`magerun2 db:import ${config.serverVariables.databaseName}.sql --force --skip-authorization-entry-creation -q --drop`, config); // Add default admin authorization rules (Fix for missing auth roles) await localhostMagentoRootExec(`magerun2 db:add-default-authorization-entries -q`, config); } diff --git a/src/tasks/magentoConfigureTask.ts b/src/tasks/magentoConfigureTask.ts index d9e22ea..ae9e906 100644 --- a/src/tasks/magentoConfigureTask.ts +++ b/src/tasks/magentoConfigureTask.ts @@ -111,8 +111,6 @@ class MagentoConfigureTask { dbQueryUpdate = dbQueryUpdate + `UPDATE core_config_data SET value = 'elasticsearch7' WHERE path = 'catalog/search/engine';`; } - // @TODO: Mirasvit - // Build up query dbQuery = dbQueryUpdate;