Archived
1
0
Fork 0

migration: 20181003134001_user_type.php

This commit is contained in:
Henrik Hautakoski 2018-10-04 09:44:25 +02:00
parent da4f7a6f79
commit ad2258607a
No known key found for this signature in database
GPG key ID: 839F3A7EAFAEAFAA

View file

@ -0,0 +1,19 @@
<?php
use Phinx\Migration\AbstractMigration;
class UserType extends AbstractMigration
{
public function up()
{
$this->table('user')
->addColumn('type', 'enum', [
'null' => false,
'default' => 'user',
'values' => [ 'user', 'admin' ],
'after' => 'regdate'
])
->save();
}
}