2014-10-28 38 views
0

我运行MySQL版本14.14 DISTRIB 40年5月5日,使用readline的6.2时间戳字段上的默认值无效?怎么了?

当我试着做下面的查询Debian的Linux-GNU(i686的),我得到一个错误的说法,“为'无效的默认值created_at'“

我在某处读到这可能是由于MySQL模式,但在my.ini中没有设置该模式。

查询是:

CREATE TABLE `rets_feeds` (
`id` tinyint(4) NOT NULL AUTO_INCREMENT, 
`board` varchar(20) DEFAULT NULL COMMENT 'The board providing the feed.', 
`feedurl` varchar(255) DEFAULT NULL COMMENT 'The URL to log into the feed.', 
`username` varchar(255) DEFAULT NULL COMMENT 'Feed Username', 
`password` varchar(255) DEFAULT NULL COMMENT 'Feed Password', 
`active` char(1) DEFAULT '1', 
`last_query_at` datetime DEFAULT NULL COMMENT 'The last time the RETS feed queried the server and returned results.', 
`created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Record Creation Date', 
`updated_at` datetime NOT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT 'Record Update Date', 
PRIMARY KEY (`id`) 
) ENGINE=InnoDB DEFAULT CHARSET=utf8 

回答