[ADDED] findById / findByPrimary takes a single value as argument representing the primary key to find.
[CHANGED] belongsToMany>through argument.
[CHANGED] findOne / findAll / findAndCount / findOrCreate now only takes a single options argument instead of a options and queryOptions argument. So set transaction, raw, etc on the first options argument.
[CHANGED] The accessor for belongsToMany>as argument or the target model name pluralized.
[REMOVED] N:M>
[REMOVED] Model.create / Model.bulkCreate / Instance.save no longer takes an array of fields as its second argument, use options.fields instead.
[REMOVED] Query Chainer has been removed
[REMOVED] Migrations have been removed, use umzug instead
[REMOVED] Model.findAllJoin has been removed
[REMOVED] sequelize.query now only takes sql and options as arguments, the second and fourth argument callee and replacements have been removed and should be set via options.instance / options.model and ?options.replacements instead.
[REMOVED] instance.isDirty has been removed, use instance.changed() instead
[REMOVED] instance.values has been removed, use instance.get() instead
[REMOVED] instance.primaryKeyValues has been removed.
[REMOVED] instance.identifiers has been removed, use instance.where() instead
[REMOVED] instance.isDeleted has been removed, simply check the timestamp with get('deletedAt') instead
[REMOVED] instance.increment/decrement now longer takes a number as it's second argument.
[REMOVED/SECURITY] findOne no longer takes a string / integer / binary argument to represent a primaryKey. Use findById instead
[REMOVED/SECURITY] where: "raw query" is no longer legal, you must now explicitely use where: ["raw query", [replacements]]
[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
[BUG] Fix bulkCreate: do not insert NULL for undefined values #3729
[BUG] Fix trying to roll back a comitted transaction if an error occured while comitting resulting in an unhandled rejection #3726
[BUG] Fix regression in beforeUpdate hook where instance.changed() would always be false #3727
[BUG] Fix trying to roll back a comitted transaction if an error occured while comitting
向后兼容改进
Most of the changes in 3.0.0 are BC breaking, read the changelog for 3.0.0 carefully.
The error that is thrown when a column is declared to be an enum butwithout any values used to "Values for ENUM haven't been defined" and is now "Values for ENUM have not been defined".