24 lines
655 B

7 years ago
<?php
use yii\db\Migration;
/**
* Class m180107_203555_change_users_field_requirements
*/
class m180107_203555_change_users_field_requirements extends Migration
{
public function up()
{
$this->alterColumn('{{%users}}', 'username', $this->string());
$this->alterColumn('{{%users}}', 'password_hash', $this->string());
$this->alterColumn('{{%users}}', 'email', $this->string());
}
public function down()
{
$this->alterColumn('{{%users}}', 'username', $this->string()->notNull());
$this->alterColumn('{{%users}}', 'password_hash', $this->string()->notNull());
$this->alterColumn('{{%users}}', 'email', $this->string()->notNull());
}
}