mirror of
https://github.com/elyby/accounts.git
synced 2024-11-17 02:32:59 +05:30
18 lines
520 B
PHP
18 lines
520 B
PHP
|
<?php
|
||
|
|
||
|
use console\db\Migration;
|
||
|
|
||
|
class m160512_194546_account_language extends Migration {
|
||
|
|
||
|
public function safeUp() {
|
||
|
$this->addColumn('{{%accounts}}', 'lang', $this->string(5)->notNull()->defaultValue('en')->after('password_hash_strategy'));
|
||
|
$this->dropColumn('{{%accounts}}', 'password_reset_token');
|
||
|
}
|
||
|
|
||
|
public function safeDown() {
|
||
|
$this->dropColumn('{{%accounts}}', 'lang');
|
||
|
$this->addColumn('{{%accounts}}', 'password_reset_token', $this->string()->unique());
|
||
|
}
|
||
|
|
||
|
}
|