mirror of
https://github.com/elyby/accounts.git
synced 2024-12-29 00:20:22 +05:30
19 lines
473 B
PHP
19 lines
473 B
PHP
|
<?php
|
||
|
|
||
|
use console\db\Migration;
|
||
|
|
||
|
class m160512_080955_usernames_history_encoding extends Migration {
|
||
|
|
||
|
public function safeUp() {
|
||
|
$this->getDb()->createCommand('
|
||
|
ALTER TABLE {{%usernames_history}}
|
||
|
MODIFY username VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL
|
||
|
')->execute();
|
||
|
}
|
||
|
|
||
|
public function safeDown() {
|
||
|
$this->alterColumn('{{%usernames_history}}', 'username', $this->string()->notNull());
|
||
|
}
|
||
|
|
||
|
}
|