DB Migration: 20180321203158_user_reg_date.php
This commit is contained in:
parent
a8d6317d94
commit
3ac1bfe40c
1 changed files with 18 additions and 0 deletions
18
app/migrations/20180321203158_user_reg_date.php
Normal file
18
app/migrations/20180321203158_user_reg_date.php
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Phinx\Migration\AbstractMigration;
|
||||||
|
|
||||||
|
class UserRegDate extends AbstractMigration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Add regdate column
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
$this->table('user')
|
||||||
|
->addColumn('regdate', 'datetime', [
|
||||||
|
'default' => 'CURRENT_TIMESTAMP',
|
||||||
|
'after' => 'email'
|
||||||
|
])->save();
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in a new issue