mirror of
https://github.com/elyby/accounts.git
synced 2025-05-31 14:11:46 +05:30
Update ely/php-code-style and run updated CS fixer
This commit is contained in:
@@ -8,10 +8,10 @@ class m171222_200114_migrate_to_utf8md4_unicode_ci extends Migration {
|
||||
$this->execute('SET FOREIGN_KEY_CHECKS=0');
|
||||
|
||||
$dbName = $this->db->createCommand('SELECT DATABASE()')->queryScalar();
|
||||
$this->execute("ALTER DATABASE {{%$dbName}} CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci");
|
||||
$this->execute("ALTER DATABASE {{%{$dbName}}} CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci");
|
||||
$tables = $this->db->createCommand('SHOW TABLES')->queryColumn();
|
||||
foreach ($tables as $table) {
|
||||
$this->execute("ALTER TABLE {{%$table}} CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci");
|
||||
$this->execute("ALTER TABLE {{%{$table}}} CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci");
|
||||
}
|
||||
|
||||
$this->execute('ALTER TABLE {{%usernames_history}} MODIFY username VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL');
|
||||
@@ -23,10 +23,10 @@ class m171222_200114_migrate_to_utf8md4_unicode_ci extends Migration {
|
||||
$this->execute('SET FOREIGN_KEY_CHECKS=0');
|
||||
|
||||
$dbName = $this->db->createCommand('SELECT DATABASE()')->queryScalar();
|
||||
$this->execute("ALTER DATABASE {{%$dbName}} CHARACTER SET = utf8 COLLATE = utf8_general_ci");
|
||||
$this->execute("ALTER DATABASE {{%{$dbName}}} CHARACTER SET = utf8 COLLATE = utf8_general_ci");
|
||||
$tables = $this->db->createCommand('SHOW TABLES')->queryColumn();
|
||||
foreach ($tables as $table) {
|
||||
$this->execute("ALTER TABLE {{%$table}} CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci");
|
||||
$this->execute("ALTER TABLE {{%{$table}}} CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci");
|
||||
}
|
||||
|
||||
$this->execute('ALTER TABLE {{%usernames_history}} MODIFY username VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL');
|
||||
|
Reference in New Issue
Block a user