28 lines
585 B
28 lines
585 B
6 years ago
|
<?php
|
||
|
|
||
|
use yii\db\Migration;
|
||
|
|
||
|
/**
|
||
|
* Class m180822_182716_add_users_languages_fields
|
||
|
*/
|
||
|
class m180822_182716_add_users_languages_fields extends Migration
|
||
|
{
|
||
|
/**
|
||
|
* {@inheritdoc}
|
||
|
*/
|
||
|
public function safeUp()
|
||
|
{
|
||
|
$this->addColumn('{{%users}}', 'backend_language', $this->string(10));
|
||
|
$this->addColumn('{{%users}}', 'frontend_language', $this->string(10));
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* {@inheritdoc}
|
||
|
*/
|
||
|
public function safeDown()
|
||
|
{
|
||
|
$this->dropColumn('{{%users}}', 'backend_language');
|
||
|
$this->dropColumn('{{%users}}', 'frontend_language');
|
||
|
}
|
||
|
}
|