Skip to content

Commit 6862166

Browse files
committed
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 <[email protected]>
1 parent 7b14845 commit 6862166

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.sequelizerc.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ const path = require('path')
22
const config = require('./lib/config')
33

44
module.exports = {
5-
config: path.resolve('config.json'),
5+
config: path.resolve('config.js'),
66
'migrations-path': path.resolve('lib', 'migrations'),
77
'models-path': path.resolve('lib', 'models'),
8-
url: process.env['CMD_DB_URL'] || config.dbURL
8+
url: config.dbURL
99
}

config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
const config = require('./lib/config')
2+
3+
module.exports = config.db

0 commit comments

Comments
 (0)