From 35bfc1fc8eccf494993863ff2476c6bfa45bde6b Mon Sep 17 00:00:00 2001 From: joewulf Date: Mon, 17 Oct 2016 11:25:49 +0800 Subject: [PATCH] Update Table.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修正框架默认的字段为 create_time 和 update_time --- phinx/src/Phinx/Db/Table.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phinx/src/Phinx/Db/Table.php b/phinx/src/Phinx/Db/Table.php index d400fc0..db06c44 100644 --- a/phinx/src/Phinx/Db/Table.php +++ b/phinx/src/Phinx/Db/Table.php @@ -565,7 +565,7 @@ class Table * * @return Table */ - public function addTimestamps($createdAtColumnName = 'created_at', $updatedAtColumnName = 'updated_at') + public function addTimestamps($createdAtColumnName = 'create_time', $updatedAtColumnName = 'update_time') { $createdAtColumnName = is_null($createdAtColumnName) ? 'created_at' : $createdAtColumnName; $updatedAtColumnName = is_null($updatedAtColumnName) ? 'updated_at' : $updatedAtColumnName;