Archived
1
0
Fork 0

DB: app/migrations/20180330090144_user_fields.php

This commit is contained in:
Henrik Hautakoski 2018-03-30 11:15:25 +02:00
parent 3ac1bfe40c
commit 643dff96c1

View 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();
}
}