sequelize/sequelize — pull request #2647 by qjroberts (2014-12-03 04:40:38+00:00)
Title: Fix increment and decrement usage with schemata

When working with Postgres and schemas lately, I noticed that increment/decrement operations did not work if I tried to specify a schema on my models. Other operations (select, delete, save, etc.) worked though, so we narrowed it down into 2 locations.

It looks like `.addSchema()` wasn't updated to only take in a single parameter (`this.Model`) and `.incrementQuery()` was incorrectly quoting the table name (which would work unless using a schema).

Code to duplicate (fails on current master, works with the PR):

```javascript
var Sequelize = require('sequelize')
, sequelize = new Sequelize('test', 'postgres', '', {
logging: false,
dialect: 'postgres'
})
, myModel;

sequelize.dropSchema('mySchema')
.then(function createSchema() {
return sequelize.createSchema('myschema');
})
.then(function createModel() {

myModel = sequelize.define('myModel', {
id: {
type: Sequelize.INTEGER,
primaryKey: true
},
incremental: {
type: Sequelize.INTEGER,
defaultValue: 0
}
}, {
schema: 'myschema'
});

return sequelize.sync();
})
.then(function createInstance() {
return myModel.create({ id: 1, incremental: 2 });
})
.then(function incrementResult(instance) {
return instance.increment('incremental', { by: 1 });
})
.then(function nope(result) {
console.log('Increment worked!', result);
})
.catch(function failure(err) {
console.log('Increment failed', err);
});
```