@@ -54,6 +54,12 @@ This method now tests for equality with [`_.isEqual`](https://lodash.com/docs/4.
This method now throws `Sequelize.AggregateError` instead of `Bluebird.AggregateError`. All errors are now exposed as `errors` key.
### QueryInterface
#### `addConstraint`
This method now only takes 2 parameters, `tableName` and `options`. Previously the second parameter could be a list of column names to apply the constraint to, this list must now be passed as `options.fields` property.
* @param {string} tableName Table name where you want to add a constraint
* @param {object} options An object to define the constraint name, type etc
* @param {string} options.type Type of constraint. One of the values in available constraints(case insensitive)
* @param {Array} options.fields Array of column names to apply the constraint over
* @param {string} [options.name] Name of the constraint. If not specified, sequelize automatically creates a named constraint based on constraint type, table & column names
* @param {string} [options.defaultValue] The value for the default constraint
* @param {object} [options.where] Where clause/expression for the CHECK constraint
* @param {Array} [options.attributes] Array of column names to apply the constraint over
* @param {object} [options.references] Object specifying target table, column name to create foreign key constraint
* @param {string} [options.references.table] Target table name
* @param {string} [options.references.field] Target column name