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

Commit d2fc5019 by Sascha Depold

Merge branch 'master' of github.com:sdepold/sequelize

2 parents 4b570383 b2018f20
Showing with 14 additions and 0 deletions
......@@ -2,6 +2,7 @@ module.exports = {
STRING: 'VARCHAR(255)',
TEXT: 'TEXT',
INTEGER: 'INTEGER',
BIGINT: 'BIGINT',
DATE: 'DATETIME',
BOOLEAN: 'TINYINT(1)',
FLOAT: 'FLOAT',
......
......@@ -205,6 +205,19 @@ describe(Helpers.getTestDialectTeaser("DAOFactory"), function() {
})
})
it('sets a 64 bit int in bigint', function(done) {
var User = this.sequelize.define('UserWithBigIntFields', {
big: Sequelize.BIGINT
})
User.sync({ force: true }).success(function() {
User.create({ big: '9223372036854775807' }).on('success', function(user) {
expect(user.big).toEqual( '9223372036854775807' )
done()
})
})
})
it('sets auto increment fields', function(done) {
var User = this.sequelize.define('UserWithAutoIncrementField', {
userid: { type: Sequelize.INTEGER, autoIncrement: true, primaryKey: true, allowNull: false }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!