<?php

use yii\db\Migration;

/**
 * Handles adding regexp to table `user`.
 */
class m161229_140924_add_regexp_column_to_user_table extends Migration
{
    /**
     * @inheritdoc
     */
    public function up()
    {
        $this->addColumn('user', 'regexp', $this->string(255));
        $this->addColumn('user', 'name', $this->string(255));
    }

    /**
     * @inheritdoc
     */
    public function down()
    {
        $this->dropColumn('user', 'regexp');
        $this->dropColumn('user', 'name');
    }
}
