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

Commit bfb566ef by Jan Scheurer

Increment enumIdx as intended, fixes issue #1020 updated test

Fix b1559103 did not effect the "not-force" sync where the same issue
occurred. Since the enumIdx was never incremented I assume that this commit
establishes the originally intended behavior.
1 parent f61a3938
...@@ -141,6 +141,7 @@ module.exports = (function() { ...@@ -141,6 +141,7 @@ module.exports = (function() {
chainer2.add(self.sequelize.query(self.QueryGenerator.pgEnumAdd(getTableName, keys[i], value, options))) chainer2.add(self.sequelize.query(self.QueryGenerator.pgEnumAdd(getTableName, keys[i], value, options)))
} }
}) })
enumIdx++
} }
} }
} }
......
...@@ -106,10 +106,14 @@ if (dialect.match(/^postgres/)) { ...@@ -106,10 +106,14 @@ if (dialect.match(/^postgres/)) {
// now sync one more time: // now sync one more time:
DummyModel.sync({force: true}).done(function(err) { DummyModel.sync({force: true}).done(function(err) {
expect(err).not.to.be.ok expect(err).not.to.be.ok
// sync without dropping
DummyModel.sync().done(function(err) {
expect(err).not.to.be.ok
done(); done();
}) })
}) })
}) })
})
it('should be able to add enum types', function(done) { it('should be able to add enum types', function(done) {
var self = this var self = this
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!