From 923f305f0832615a9437c06482a3613a2994d46f Mon Sep 17 00:00:00 2001 From: sm2017 Date: Sat, 3 Aug 2019 10:56:45 +0430 Subject: [PATCH 1/4] Configurable app startup --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index 1d56502..80dfb1a 100644 --- a/app.js +++ b/app.js @@ -1,6 +1,6 @@ 'use strict'; module.exports = app => { - require('./lib/loader')(app); + if (app.config.sequelize.app) require('./lib/loader')(app); }; From be95aff1b2eb37272ce9f57e4bd4432408706fff Mon Sep 17 00:00:00 2001 From: sm2017 Date: Sat, 3 Aug 2019 10:57:55 +0430 Subject: [PATCH 2/4] Configurable agent startup --- agent.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agent.js b/agent.js index 92b0d38..3906f83 100644 --- a/agent.js +++ b/agent.js @@ -1,5 +1,5 @@ 'use strict'; module.exports = agent => { - require('./lib/loader')(agent); + if (agent.config.sequelize.agent) require('./lib/loader')(agent); }; From 20e597873818192a6a1d1705e838ff36b268b830 Mon Sep 17 00:00:00 2001 From: sm2017 Date: Sat, 3 Aug 2019 10:58:31 +0430 Subject: [PATCH 3/4] Update config.default.js --- config/config.default.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/config.default.js b/config/config.default.js index 8fadc8a..633a396 100644 --- a/config/config.default.js +++ b/config/config.default.js @@ -1,6 +1,9 @@ 'use strict'; exports.sequelize = { + app: true, + agent: false, + dialect: 'mysql', database: '', host: 'localhost', From 259ce3f7a2b5a87613f3efa020514bfdc2cd4672 Mon Sep 17 00:00:00 2001 From: sm2017 Date: Wed, 7 Aug 2019 20:22:31 +0430 Subject: [PATCH 4/4] don't import breaking changes --- config/config.default.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/config.default.js b/config/config.default.js index 633a396..92b429a 100644 --- a/config/config.default.js +++ b/config/config.default.js @@ -2,7 +2,7 @@ exports.sequelize = { app: true, - agent: false, + agent: true, dialect: 'mysql', database: '',