DB: app/migrations/20180330090144_user_fields.php
This commit is contained in:
parent
3ac1bfe40c
commit
643dff96c1
1 changed files with 30 additions and 0 deletions
30
app/migrations/20180330090144_user_fields.php
Normal file
30
app/migrations/20180330090144_user_fields.php
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
class UserFields extends AbstractMigration
|
||||
{
|
||||
/**
|
||||
* Add regdate column
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$this->table('user')
|
||||
->addColumn('name', 'string', [
|
||||
'limit' => 128,
|
||||
'null' => true,
|
||||
'after' => 'username'
|
||||
])
|
||||
->addColumn('github_id', 'integer', [
|
||||
'limit' => 14,
|
||||
'null' => true,
|
||||
'after' => 'password'
|
||||
])
|
||||
->addColumn('github_user', 'string', [
|
||||
'limit' => 80,
|
||||
'null' => true,
|
||||
'after' => 'github_id'
|
||||
])->save();
|
||||
}
|
||||
}
|
||||
Reference in a new issue