这个臭味还没有回答,原因我已经开始错过Ruby on Rails …
以下是Timestamp dt的文档:
http://dev.mysql.com/doc/refman/5.0/en/timestamp.html
In a CREATE TABLE statement,the first TIMESTAMP column can be declared in any of the following ways:
With both DEFAULT CURRENT_TIMESTAMP and ON UPDATE CURRENT_TIMESTAMP clauses,the column has the current timestamp for its default value,and is automatically updated.
With neither DEFAULT nor ON UPDATE clauses,it is the same as DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP.
With a DEFAULT CURRENT_TIMESTAMP clause and no ON UPDATE clause,the column has the current timestamp for its default value but is not automatically updated.
With no DEFAULT clause and with an ON UPDATE CURRENT_TIMESTAMP clause,the column has a default of 0 and is automatically updated.
With a constant DEFAULT value,the column has the given default and is not automatically initialized to the current timestamp. If the column also has an ON UPDATE CURRENT_TIMESTAMP clause,it is automatically updated; otherwise,it has a constant default and is not automatically updated.