Skip to content

Commit

Permalink
Update Table.php
Browse files Browse the repository at this point in the history
修正方法内的默认值
  • Loading branch information
joewulf authored and yunwuxin committed Oct 17, 2016
1 parent 35bfc1f commit b2960f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions phinx/src/Phinx/Db/Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -567,8 +567,8 @@ public function hasForeignKey($columns, $constraint = null)
*/
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' => ''
Expand Down

0 comments on commit b2960f9

Please sign in to comment.