Default should not be handled by database engine

This commit is contained in:
Anatoliy Chakkaev 2012-02-20 22:44:02 +04:00
parent 11b4436fd1
commit 35e872368a
2 changed files with 9 additions and 10 deletions

View File

@ -463,6 +463,5 @@ function datatype(p) {
dt = 'TINYINT(1)';
break;
}
dt += (typeof p.default !== 'undefined') ? ' DEFAULT ' + p.default.toString() : '';
return dt;
}

View File

@ -590,7 +590,7 @@ function testOrm(schema) {
test.ok(post.published === false);
post.updateAttributes({title: 'hey', published: true}, function () {
Post.find(id, function (err, post) {
test.ok(post.published === true);
test.ok(!!post.published, 'Update boolean field');
test.ok(post.id);
test.done();
});