不要怂,就是干,撸起袖子干!

Commit 00399231 by sdepold

added deprecation warning + fixed logging in migrator.js

1 parent 10f22675
Showing with 8 additions and 4 deletions
...@@ -15,10 +15,12 @@ module.exports = (function() { ...@@ -15,10 +15,12 @@ module.exports = (function() {
to: null, to: null,
logging: console.log logging: console.log
}, options || {}) }, options || {})
}
if(this.options.logging === true) if(this.options.logging === true) {
this.options.logging = console.log console.log('DEPRECATION WARNING: The logging-option should be either a function or false. Default: console.log')
this.options.logging = console.log
}
}
Object.defineProperty(Migrator.prototype, "queryInterface", { Object.defineProperty(Migrator.prototype, "queryInterface", {
get: function() { get: function() {
......
...@@ -16,8 +16,10 @@ module.exports = (function() { ...@@ -16,8 +16,10 @@ module.exports = (function() {
sync: {} sync: {}
}, options || {}) }, options || {})
if(this.options.logging === true) if(this.options.logging === true) {
console.log('DEPRECATION WARNING: The logging-option should be either a function or false. Default: console.log')
this.options.logging = console.log this.options.logging = console.log
}
this.config = { this.config = {
database: database, database: database,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!