Skip to content

Commit

Permalink
fix: Allow Sequelize CLI to use options set in config.json
Browse files Browse the repository at this point in the history
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 <mhajoha@gmail.com>
  • Loading branch information
MHajoha committed Jul 7, 2020
1 parent 7b14845 commit 6862166
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .sequelizerc.example
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
3 changes: 3 additions & 0 deletions config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const config = require('./lib/config')

module.exports = config.db

0 comments on commit 6862166

Please sign in to comment.