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

Commit 2e768918 by Sascha Depold

also support camelcase as timestamp columns

1 parent 3f0f52d9
Showing with 5 additions and 0 deletions
......@@ -43,5 +43,9 @@ module.exports = {
'it should add deletedAt if safeDelete is true': function() {
var User = sequelize.define('User' + parseInt(Math.random() * 999999999), {}, { safeDelete: true })
assert.eql(User.attributes, {id:"INT NOT NULL auto_increment PRIMARY KEY", deletedAt:"DATETIME", updatedAt:"DATETIME NOT NULL", createdAt:"DATETIME NOT NULL"})
},
'timestamp columns should be camelcase if camelcase is passed': function() {
var User = sequelize.define('User' + parseInt(Math.random() * 999999999), {}, { safeDelete: true, camelcase: true })
assert.eql(User.attributes, {id:"INT NOT NULL auto_increment PRIMARY KEY", deleted_at:"DATETIME", updated_at:"DATETIME NOT NULL", created_at:"DATETIME NOT NULL"})
}
}
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!