修改时间戳的字段名,与框架的相同

This commit is contained in:
yunwuxin 2016-05-18 18:03:51 +08:00
parent 8d8a15bf43
commit e1b9f3eee5

View File

@ -559,11 +559,11 @@ class Table
*/
public function addTimestamps()
{
$this->addColumn('created_at', 'timestamp', array(
$this->addColumn('create_time', 'timestamp', array(
'default' => 'CURRENT_TIMESTAMP',
'update' => ''
))
->addColumn('updated_at', 'timestamp', array(
->addColumn('update_time', 'timestamp', array(
'null' => true,
'default' => null
));