Skip to content

Commit 5b564c6

Browse files
authored
Merge pull request #1724 from hackmdio/refactor/sequelize-import
sequelize.import deprecation
2 parents e45194e + 08592f8 commit 5b564c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/models/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ fs.readdirSync(__dirname)
4545
return (file.indexOf('.') !== 0) && (file !== 'index.js')
4646
})
4747
.forEach(function (file) {
48-
var model = sequelize.import(path.join(__dirname, file))
48+
var model = require(path.join(__dirname, file))(sequelize, Sequelize)
4949
db[model.name] = model
5050
})
5151

0 commit comments

Comments
 (0)