增】加默认值

This commit is contained in:
JaguarJack
2019-01-21 10:44:15 +08:00
parent 8a31920b9d
commit 8ba0301d03
2 changed files with 3 additions and 3 deletions

View File

@@ -35,7 +35,7 @@ class Users extends Migrator
->addColumn('remember_token', 'string',['limit' => 255, 'default'=>'','comment'=>'记住token'])
->addColumn('login_ip', 'string',['limit' => 50, 'default'=>'','comment'=>'登录IP'])
->addColumn('created_at', 'timestamp', ['default' => 'CURRENT_TIMESTAMP', 'comment' => '更新时间'])
->addColumn('login_at', 'timestamp', [ 'comment' => '最近登录时间'])
->addColumn('login_at', 'timestamp', [ 'default' => null, 'comment' => '最近登录时间'])
->addIndex(['name', 'email'], ['unique' => true])
->create();
}