From 6862166064f72078cd6236aa2a256312413140f2 Mon Sep 17 00:00:00 2001 From: Maximilian Haye Date: Tue, 7 Jul 2020 14:08:29 +0200 Subject: [PATCH] fix: Allow Sequelize CLI to use options set in config.json Adds a config.js which uses lib/config to provide the Sequelize CLI with the same options as the application. Fixes #1396 Signed-off-by: Maximilian Haye --- .sequelizerc.example | 4 ++-- config.js | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 config.js diff --git a/.sequelizerc.example b/.sequelizerc.example index 868712f4..e7a489e6 100644 --- a/.sequelizerc.example +++ b/.sequelizerc.example @@ -2,8 +2,8 @@ const path = require('path') const config = require('./lib/config') module.exports = { - config: path.resolve('config.json'), + config: path.resolve('config.js'), 'migrations-path': path.resolve('lib', 'migrations'), 'models-path': path.resolve('lib', 'models'), - url: process.env['CMD_DB_URL'] || config.dbURL + url: config.dbURL } diff --git a/config.js b/config.js new file mode 100644 index 00000000..c8ad532f --- /dev/null +++ b/config.js @@ -0,0 +1,3 @@ +const config = require('./lib/config') + +module.exports = config.db