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

Commit a9673fbf by Jan Aagaard Meier

feat(datatypes) Revert datatypes.warn back to console.warn

1 parent 401adaf2
Showing with 6 additions and 3 deletions
...@@ -5,10 +5,10 @@ var util = require('util') ...@@ -5,10 +5,10 @@ var util = require('util')
, _ = require('lodash') , _ = require('lodash')
, Wkt = require('wellknown') , Wkt = require('wellknown')
, sequelizeErrors = require('./errors') , sequelizeErrors = require('./errors')
, warnings = {}
, Validator = require('validator') , Validator = require('validator')
, moment = require('moment-timezone') , moment = require('moment-timezone')
, hstore = require('./dialects/postgres/hstore') , hstore = require('./dialects/postgres/hstore');
, deprecate = require('depd')('DataTypes');
/** /**
* A convenience class holding commonly used data types. The datatypes are used when defining a new model using `Sequelize.define`, like this: * A convenience class holding commonly used data types. The datatypes are used when defining a new model using `Sequelize.define`, like this:
...@@ -53,7 +53,10 @@ ABSTRACT.prototype.toSql = function() { ...@@ -53,7 +53,10 @@ ABSTRACT.prototype.toSql = function() {
return this.key; return this.key;
}; };
ABSTRACT.warn = function(link, text) { ABSTRACT.warn = function(link, text) {
deprecate(text + '\n>> Check: ' + link); if (!warnings[text]) {
warnings[text] = true;
console.warn('>> WARNING:', text, '\n>> Check:', link);
}
}; };
ABSTRACT.prototype.stringify = function (value, options) { ABSTRACT.prototype.stringify = function (value, options) {
if (this.$stringify) { if (this.$stringify) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!