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

Commit 2ec0a0c3 by shane adams

Merge branch 'bigint'

2 parents 6b250177 517a580d
Showing with 14 additions and 0 deletions
...@@ -2,6 +2,7 @@ module.exports = { ...@@ -2,6 +2,7 @@ module.exports = {
STRING: 'VARCHAR(255)', STRING: 'VARCHAR(255)',
TEXT: 'TEXT', TEXT: 'TEXT',
INTEGER: 'INTEGER', INTEGER: 'INTEGER',
BIGINT: 'BIGINT',
DATE: 'DATETIME', DATE: 'DATETIME',
BOOLEAN: 'TINYINT(1)', BOOLEAN: 'TINYINT(1)',
FLOAT: 'FLOAT', FLOAT: 'FLOAT',
......
...@@ -205,6 +205,19 @@ describe("[" + Helpers.getTestDialectTeaser() + "] DAOFactory", function() { ...@@ -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) { it('sets auto increment fields', function(done) {
var User = this.sequelize.define('UserWithAutoIncrementField', { var User = this.sequelize.define('UserWithAutoIncrementField', {
userid: { type: Sequelize.INTEGER, autoIncrement: true, primaryKey: true, allowNull: false } 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!