2016-05-12 14:20:30 +05:30
|
|
|
<?php
|
|
|
|
|
|
|
|
use console\db\Migration;
|
|
|
|
|
|
|
|
class m160512_080955_usernames_history_encoding extends Migration {
|
|
|
|
|
2024-12-02 15:40:55 +05:30
|
|
|
public function safeUp(): void {
|
2016-05-12 14:20:30 +05:30
|
|
|
$this->getDb()->createCommand('
|
|
|
|
ALTER TABLE {{%usernames_history}}
|
|
|
|
MODIFY username VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL
|
|
|
|
')->execute();
|
|
|
|
}
|
|
|
|
|
2024-12-02 15:40:55 +05:30
|
|
|
public function safeDown(): void {
|
2016-05-12 14:20:30 +05:30
|
|
|
$this->alterColumn('{{%usernames_history}}', 'username', $this->string()->notNull());
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|