Update ely/php-code-style and run updated CS fixer

This commit is contained in:
ErickSkrauch
2019-02-26 02:26:02 +03:00
parent ea4ebd19ef
commit b20825a051
67 changed files with 250 additions and 252 deletions

View File

@@ -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');