Update Table.php
修正方法内的默认值
This commit is contained in:
parent
35bfc1fc8e
commit
b2960f9b86
|
@ -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' => ''
|
||||
|
|
Loading…
Reference in New Issue
Block a user