Skip to content

Commit 2c5a880

Browse files
author
Kevin Gentile
committed
addTimestamps: update updated_at timestamp on row update
1 parent 54ece1f commit 2c5a880

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Phinx/Db/Table.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,7 @@ public function addTimestamps($createdAt = 'created_at', $updatedAt = 'updated_a
551551
->addColumn($updatedAt, 'timestamp', [
552552
'null' => true,
553553
'default' => null,
554+
'update' => 'CURRENT_TIMESTAMP',
554555
'timezone' => $withTimezone,
555556
]);
556557

0 commit comments

Comments
 (0)