mirror of
https://github.com/elyby/accounts.git
synced 2025-05-31 14:11:46 +05:30
Изменёна кодировка столбца username в usernames_history для организации бинарного поиска
Из Account вынесена логика аутентификации в дочерний AccountIdentity Исправлена логика валидации при вызове на неизменённом нике для формы смены ника
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
<?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());
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user