2014-10-28 80 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 

回答