diff --git a/ot-node.js b/ot-node.js index 840affbaa6..aa541254f0 100644 --- a/ot-node.js +++ b/ot-node.js @@ -9,7 +9,6 @@ const Logger = require('./modules/logger/logger'); const constants = require('./modules/constants'); const pjson = require('./package.json'); const configjson = require('./config/config.json'); -const appRootPath = require('app-root-path'); class OTNode { constructor(config) { @@ -83,7 +82,6 @@ class OTNode { repository: 'https://github.com/OriginTrail/ot-node', branch: this.config.autoUpdate.branch, tempLocation: this.config.autoUpdate.backupDirectory, - executeOnComplete: `cd ${appRootPath.path} && npx sequelize --config=./config/sequelizeConfig.js db:migrate`, exitOnComplete: true, }; @@ -122,6 +120,7 @@ class OTNode { this.logger.info('Operational database module: sequelize implementation'); // eslint-disable-next-line global-require const db = require('./models'); + execSync('npx sequelize --config=./config/sequelizeConfig.js db:migrate'); await db.sequelize.sync(); } catch (e) { this.logger.error({ diff --git a/package-lock.json b/package-lock.json index d5fbf820d3..b02e0406c9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "origintrail_node", - "version": "6.0.0-beta.1.34-hotfix.2", + "version": "6.0.0-beta.1.34-hotfix.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "origintrail_node", - "version": "6.0.0-beta.1.34-hotfix.2", + "version": "6.0.0-beta.1.34-hotfix.3", "license": "ISC", "dependencies": { "app-root-path": "^3.0.0", diff --git a/package.json b/package.json index 98a8be764d..083868bc55 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "origintrail_node", - "version": "6.0.0-beta.1.34-hotfix.2", + "version": "6.0.0-beta.1.34-hotfix.3", "description": "OTNode v6 Beta 1", "main": "index.js", "scripts": {