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

Commit 2110276a by Rodrigo Saboya Committed by Sushant

Backporting b6e1c154 to the v3 branch. (#7148)

* Backporting b6e1c154 to the v3 branch.

* [ci-skip] changelog

* [ci skip] changelog pr code
1 parent f20b983b
# Future
- [CHANGED] Updated deprecated `node-uuid` package to `uuid` [#7148](https://github.com/sequelize/sequelize/pull/7148)
# 3.30.0 # 3.30.0
- [FIXED] `removeColumn` method to support dropping primaryKey column (MSSQL) [#7081](https://github.com/sequelize/sequelize/pull/7081) - [FIXED] `removeColumn` method to support dropping primaryKey column (MSSQL) [#7081](https://github.com/sequelize/sequelize/pull/7081)
- [ADDED] Support `sourceKey` for `hasMany` relationships [#4258](https://github.com/sequelize/sequelize/issues/4258) - [ADDED] Support `sourceKey` for `hasMany` relationships [#4258](https://github.com/sequelize/sequelize/issues/4258)
......
...@@ -10,7 +10,7 @@ var Utils = require('../../utils') ...@@ -10,7 +10,7 @@ var Utils = require('../../utils')
, BelongsTo = require('../../associations/belongs-to') , BelongsTo = require('../../associations/belongs-to')
, BelongsToMany = require('../../associations/belongs-to-many') , BelongsToMany = require('../../associations/belongs-to-many')
, HasMany = require('../../associations/has-many') , HasMany = require('../../associations/has-many')
, uuid = require('node-uuid') , uuid = require('uuid')
, semver = require('semver'); , semver = require('semver');
/* istanbul ignore next */ /* istanbul ignore next */
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
var Utils = require('../../utils') var Utils = require('../../utils')
, AbstractQuery = require('../abstract/query') , AbstractQuery = require('../abstract/query')
, uuid = require('node-uuid') , uuid = require('uuid')
, sequelizeErrors = require('../../errors.js') , sequelizeErrors = require('../../errors.js')
, _ = require('lodash'); , _ = require('lodash');
......
...@@ -5,7 +5,7 @@ var DataTypes = require('./data-types') ...@@ -5,7 +5,7 @@ var DataTypes = require('./data-types')
, _ = require('lodash').runInContext() // Prevent anyone messing with template settings by creating a fresh copy , _ = require('lodash').runInContext() // Prevent anyone messing with template settings by creating a fresh copy
, parameterValidator = require('./utils/parameter-validator') , parameterValidator = require('./utils/parameter-validator')
, inflection = require('inflection') , inflection = require('inflection')
, uuid = require('node-uuid') , uuid = require('uuid')
, deprecate = require('depd')('Utils') , deprecate = require('depd')('Utils')
, primitives = ['string', 'number', 'boolean']; , primitives = ['string', 'number', 'boolean'];
......
...@@ -40,12 +40,12 @@ ...@@ -40,12 +40,12 @@
"lodash": "4.12.0", "lodash": "4.12.0",
"moment": "^2.13.0", "moment": "^2.13.0",
"moment-timezone": "^0.5.4", "moment-timezone": "^0.5.4",
"node-uuid": "~1.4.4",
"retry-as-promised": "^2.0.0", "retry-as-promised": "^2.0.0",
"semver": "^5.0.1", "semver": "^5.0.1",
"shimmer": "1.1.0", "shimmer": "1.1.0",
"terraformer-wkt-parser": "^1.1.0", "terraformer-wkt-parser": "^1.1.0",
"toposort-class": "^1.0.1", "toposort-class": "^1.0.1",
"uuid": "^3.0.0",
"validator": "^5.2.0", "validator": "^5.2.0",
"wkx": "0.2.0" "wkx": "0.2.0"
}, },
...@@ -74,6 +74,7 @@ ...@@ -74,6 +74,7 @@
"sinon-chai": "^2.8.0", "sinon-chai": "^2.8.0",
"sqlite3": "^3.1.4", "sqlite3": "^3.1.4",
"tedious": "^1.13.2", "tedious": "^1.13.2",
"uuid-validate": "^0.0.2",
"watchr": "~2.4.11" "watchr": "~2.4.11"
}, },
"keywords": [ "keywords": [
......
...@@ -10,7 +10,7 @@ var chai = require('chai') ...@@ -10,7 +10,7 @@ var chai = require('chai')
, _ = require('lodash') , _ = require('lodash')
, moment = require('moment') , moment = require('moment')
, current = Support.sequelize , current = Support.sequelize
, uuid = require('node-uuid') , uuid = require('uuid')
, DataTypes = require('../../lib/data-types') , DataTypes = require('../../lib/data-types')
, dialect = Support.getTestDialect(); , dialect = Support.getTestDialect();
......
...@@ -10,7 +10,7 @@ var chai = require('chai') ...@@ -10,7 +10,7 @@ var chai = require('chai')
, dialect = Support.getTestDialect() , dialect = Support.getTestDialect()
, config = require(__dirname + '/../config/config') , config = require(__dirname + '/../config/config')
, sinon = require('sinon') , sinon = require('sinon')
, uuid = require('node-uuid') , validateUUID = require('uuid-validate')
, current = Support.sequelize; , current = Support.sequelize;
describe(Support.getTestDialectTeaser('Instance'), function() { describe(Support.getTestDialectTeaser('Instance'), function() {
...@@ -705,8 +705,8 @@ describe(Support.getTestDialectTeaser('Instance'), function() { ...@@ -705,8 +705,8 @@ describe(Support.getTestDialectTeaser('Instance'), function() {
it('should store a valid uuid in uuidv1 and uuidv4 that can be parsed to something of length 16', function() { it('should store a valid uuid in uuidv1 and uuidv4 that can be parsed to something of length 16', function() {
var user = this.User.build({ username: 'a user'}); var user = this.User.build({ username: 'a user'});
expect(uuid.parse(user.uuidv1)).to.have.length(16); expect(validateUUID(user.uuidv1, 1)).to.be.true;
expect(uuid.parse(user.uuidv4)).to.have.length(16); expect(validateUUID(user.uuidv4, 4)).to.be.true;
}); });
it('should store a valid uuid if the field is a primary key named id', function() { it('should store a valid uuid if the field is a primary key named id', function() {
......
...@@ -5,7 +5,7 @@ var Support = require(__dirname + '/../support') ...@@ -5,7 +5,7 @@ var Support = require(__dirname + '/../support')
, Sequelize = Support.Sequelize , Sequelize = Support.Sequelize
, chai = require('chai') , chai = require('chai')
, util = require('util') , util = require('util')
, uuid = require('node-uuid') , uuid = require('uuid')
, expectsql = Support.expectsql , expectsql = Support.expectsql
, current = Support.sequelize , current = Support.sequelize
, expect = chai.expect; , expect = chai.expect;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!