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

Commit edb7066c by Sascha Depold

Fix docs generator and docs

1 parent 7c9d1d7b
# Next
- [BUG] fix showIndexQuery so appropriate indexes are returned when a schema is used
- [BUG] Fix showIndexQuery so appropriate indexes are returned when a schema is used
- [BUG] Fix addIndexQuery error when the model has a schema
- [BUG] Fix app crash in sqlite while running in special unique constraint errors [3730](https://github.com/sequelize/sequelize/pull/3730)
- [BUG] Fix API doc generation
#### Backwards compatibility changes
- The error that is thrown when a column is declared to be an enum but without any values used to "Values for ENUM haven't been defined" and is now "Values for ENUM have not been defined".
# 2.1.3
- [BUG] Fix regression introduced in 2.1.2: updatedAt not set anymore [3667](https://github.com/sequelize/sequelize/pull/3667)
......@@ -189,7 +193,7 @@
- [FEATURE] Added `find()` hooks
#### Backwards compatibility changes
- The `fieldName` property, used in associations with a foreign key object `(A.hasMany(B, { foreignKey: { ... }})`, has been renamed to `name` to avoid confusion with `field`.
- The `fieldName` property, used in associations with a foreign key object `(A.hasMany(B, { foreignKey: { ... }})`, has been renamed to `name` to avoid confusion with `field`.
- The naming of the join table entry for N:M association getters is now singular (like includes)
- Signature of hooks has changed to pass options to all hooks. Any hooks previously defined like `Model.beforeCreate(values)` now need to be `Model.beforeCreate(values, options)` etc.
- Results returned by hooks are ignored - changes to results by hooks should be made by reference
......@@ -212,7 +216,7 @@ We are working our way to the first 2.0.0 release candidate.
- [BUG] Fix default scope being overwritten [#2087](https://github.com/sequelize/sequelize/issues/2087)
- [BUG] Fixed updatedAt timestamp not being set in bulk create when validate = true. [#1962](https://github.com/sequelize/sequelize/issues/1962)
- [INTERNALS] Replaced lingo with inflection
- [INTERNALS] Removed underscore.string dependency and moved a couple of helper functions from `Utils._` to `Utils`
- [INTERNALS] Removed underscore.string dependency and moved a couple of helper functions from `Utils._` to `Utils`
- [INTERNALS] Update dependencies
+ validator 3.2.0 -> 3.16.1
+ moment 2.5.0 -> 2.7.0
......
......@@ -23,7 +23,6 @@ if (program.file) {
{file:'lib/sequelize.js', output: 'sequelize'},
{file:'lib/instance.js', output: 'instance'},
{file:'lib/model.js', output: 'model'},
{file:'lib/querying.js', output: 'querying'},
{file:'lib/hooks.js', output: 'hooks'},
{file:'lib/associations/mixin.js', output: 'associations'},
{file:'lib/promise.js', output: 'promise'},
......@@ -68,7 +67,7 @@ Comment.prototype.getName = function () {
tag = this.getTag('property');
if (tag) {
return tag.types[0];
return tag.string;
}
tag = this.getTag('method');
......
......@@ -57,7 +57,7 @@ module.exports = (function() {
* Returns the Model the instance was created from.
* @see {Model}
* @property Model
* @return Model
* @return {Model}
*/
initValues.call(this, values, options);
......@@ -764,7 +764,7 @@ module.exports = (function() {
* @param {Array} [options.skip] An array of strings. All properties that are in this array will not be validated
* @see {InstanceValidator}
*
* @return {Promise<undefined|Errors.ValidationError}
* @return {Promise<undefined|Errors.ValidationError>}
*/
Instance.prototype.validate = function(options) {
return new InstanceValidator(this, options).validate();
......@@ -874,7 +874,7 @@ module.exports = (function() {
return this.Model.runHooks('beforeRestore', this, options);
}
}).then(function() {
this.setDataValue(this.Model._timestampAttributes.deletedAt, null);
this.setDataValue(this.Model._timestampAttributes.deletedAt, null);
return this.save(_.extend(_.clone(options), {hooks : false, omitNull : false}));
}).tap(function() {
// Run after hook
......
......@@ -84,7 +84,7 @@ module.exports = (function() {
if (attribute.type instanceof DataTypes.ENUM) {
if (!attribute.values.length) {
throw new Error('Values for ENUM haven\'t been defined.');
throw new Error('Values for ENUM have not been defined.');
}
attribute.validate = attribute.validate || {
......@@ -1592,7 +1592,7 @@ module.exports = (function() {
*
* @param {Object} values
* @param {Object} options
* @param {Object options.where Options to describe the scope of the search.
* @param {Object} options.where Options to describe the scope of the search.
* @param {Array} [options.fields] Fields to update (defaults to all fields)
* @param {Boolean} [options.validate=true] Should each row be subject to validation before it is inserted. The whole insert will fail if one row fails validation
* @param {Boolean} [options.hooks=true] Run before / after bulk update hooks?
......
......@@ -877,7 +877,7 @@ describe(Support.getTestDialectTeaser('Sequelize'), function() {
self.sequelize.define('omnomnom', {
bla: { type: DataTypes.ENUM }
});
}).to.throw(Error, 'Values for ENUM haven\'t been defined.');
}).to.throw(Error, 'Values for ENUM have not been defined.');
});
it('correctly stores values', function() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!