Update Table.php

修正方法内的默认值
This commit is contained in:
joewulf 2016-10-17 11:31:02 +08:00 committed by 云无心
parent 35bfc1fc8e
commit b2960f9b86

View File

@ -567,8 +567,8 @@ class Table
*/
public function addTimestamps($createdAtColumnName = 'create_time', $updatedAtColumnName = 'update_time')
{
$createdAtColumnName = is_null($createdAtColumnName) ? 'created_at' : $createdAtColumnName;
$updatedAtColumnName = is_null($updatedAtColumnName) ? 'updated_at' : $updatedAtColumnName;
$createdAtColumnName = is_null($createdAtColumnName) ? 'create_time' : $createdAtColumnName;
$updatedAtColumnName = is_null($updatedAtColumnName) ? 'update_time' : $updatedAtColumnName;
$this->addColumn($createdAtColumnName, 'timestamp', array(
'default' => 'CURRENT_TIMESTAMP',
'update' => ''