diff --git a/console/migrations/m130524_201442_init.php b/console/migrations/m130524_201442_init.php index 6b649f4..e680fe0 100644 --- a/console/migrations/m130524_201442_init.php +++ b/console/migrations/m130524_201442_init.php @@ -9,7 +9,7 @@ class m130524_201442_init extends Migration $tableOptions = null; if ($this->db->driverName === 'mysql') { // http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci - $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; + $tableOptions = 'CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE=InnoDB'; } $this->createTable('{{%user}}', [ diff --git a/console/migrations/m180107_203500_create_user_networks_table.php b/console/migrations/m180107_203500_create_user_networks_table.php index 3f9109e..ff36881 100644 --- a/console/migrations/m180107_203500_create_user_networks_table.php +++ b/console/migrations/m180107_203500_create_user_networks_table.php @@ -9,7 +9,7 @@ class m180107_203500_create_user_networks_table extends Migration { public function up() { - $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB'; + $tableOptions = 'CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci ENGINE=InnoDB'; $this->createTable('{{%user_networks}}', [ 'id' => $this->primaryKey(), diff --git a/console/migrations/m180110_121107_create_post_types_table.php b/console/migrations/m180110_121107_create_post_types_table.php index df9852f..f6e34ee 100644 --- a/console/migrations/m180110_121107_create_post_types_table.php +++ b/console/migrations/m180110_121107_create_post_types_table.php @@ -12,7 +12,7 @@ class m180110_121107_create_post_types_table extends Migration */ public function up() { - $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; + $tableOptions = 'CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE=InnoDB'; $this->createTable('{{%post_types}}', [ 'id' => $this->primaryKey(), diff --git a/console/migrations/m180110_121109_create_post_tags_table.php b/console/migrations/m180110_121109_create_post_tags_table.php index b3cd27f..f0407e8 100644 --- a/console/migrations/m180110_121109_create_post_tags_table.php +++ b/console/migrations/m180110_121109_create_post_tags_table.php @@ -9,7 +9,7 @@ class m180110_121109_create_post_tags_table extends Migration { public function up() { - $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; + $tableOptions = 'CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE=InnoDB'; $this->createTable('{{%post_tags}}', [ 'id' => $this->primaryKey(), diff --git a/console/migrations/m180110_121335_create_post_categories_table.php b/console/migrations/m180110_121335_create_post_categories_table.php index cfa9f5f..61769fe 100644 --- a/console/migrations/m180110_121335_create_post_categories_table.php +++ b/console/migrations/m180110_121335_create_post_categories_table.php @@ -9,7 +9,7 @@ class m180110_121335_create_post_categories_table extends Migration { public function up() { - $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; + $tableOptions = 'CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE=InnoDB'; $this->createTable('{{%post_categories}}', [ 'id' => $this->primaryKey(), diff --git a/console/migrations/m180110_121552_create_posts_table.php b/console/migrations/m180110_121552_create_posts_table.php index 7fdba55..d70cafd 100644 --- a/console/migrations/m180110_121552_create_posts_table.php +++ b/console/migrations/m180110_121552_create_posts_table.php @@ -9,7 +9,7 @@ class m180110_121552_create_posts_table extends Migration { public function up() { - $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; + $tableOptions = 'CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE=InnoDB'; $this->createTable('{{%posts}}', [ 'id' => $this->primaryKey(), diff --git a/console/migrations/m180110_132623_create_post_tag_assignments_table.php b/console/migrations/m180110_132623_create_post_tag_assignments_table.php index 5c838b1..24c5134 100644 --- a/console/migrations/m180110_132623_create_post_tag_assignments_table.php +++ b/console/migrations/m180110_132623_create_post_tag_assignments_table.php @@ -9,7 +9,7 @@ class m180110_132623_create_post_tag_assignments_table extends Migration { public function up() { - $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB'; + $tableOptions = 'CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci ENGINE=InnoDB'; $this->createTable('{{%post_tag_assignments}}', [ 'post_id' => $this->integer()->notNull(), diff --git a/console/migrations/m180110_140332_create_post_comments_table.php b/console/migrations/m180110_140332_create_post_comments_table.php index a9a655c..3ef5ff1 100644 --- a/console/migrations/m180110_140332_create_post_comments_table.php +++ b/console/migrations/m180110_140332_create_post_comments_table.php @@ -9,7 +9,7 @@ class m180110_140332_create_post_comments_table extends Migration { public function up() { - $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; + $tableOptions = 'CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE=InnoDB'; $this->createTable('{{%post_comments}}', [ 'id' => $this->primaryKey(), diff --git a/console/migrations/m180124_165317_create_slider_table.php b/console/migrations/m180124_165317_create_slider_table.php index 5397be3..5e00e49 100644 --- a/console/migrations/m180124_165317_create_slider_table.php +++ b/console/migrations/m180124_165317_create_slider_table.php @@ -12,7 +12,7 @@ class m180124_165317_create_slider_table extends Migration */ public function up() { - $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; + $tableOptions = 'CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE=InnoDB'; $this->createTable('{{%slider}}', [ 'id' => $this->primaryKey(), diff --git a/console/migrations/m180126_061916_create_session_table.php b/console/migrations/m180126_061916_create_session_table.php index c31f68e..4ae8343 100644 --- a/console/migrations/m180126_061916_create_session_table.php +++ b/console/migrations/m180126_061916_create_session_table.php @@ -15,7 +15,7 @@ class m180126_061916_create_session_table extends Migration $tableOptions = null; if ($this->db->driverName === 'mysql') { // http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci - $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; + $tableOptions = 'CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE=InnoDB'; } $this->createTable('{{%session}}', [ diff --git a/console/migrations/m180604_124108_create_settings_table.php b/console/migrations/m180604_124108_create_settings_table.php index 7a8eb10..adbe847 100644 --- a/console/migrations/m180604_124108_create_settings_table.php +++ b/console/migrations/m180604_124108_create_settings_table.php @@ -14,7 +14,7 @@ class m180604_124108_create_settings_table extends Migration { $tableOptions = null; if ($this->db->driverName === 'mysql') { - $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB'; + $tableOptions = 'CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci ENGINE=InnoDB'; } $this->createTable( '{{%settings}}', diff --git a/console/migrations/m180604_205444_create_modules_table.php b/console/migrations/m180604_205444_create_modules_table.php index fc574cd..59d7da2 100644 --- a/console/migrations/m180604_205444_create_modules_table.php +++ b/console/migrations/m180604_205444_create_modules_table.php @@ -14,7 +14,7 @@ class m180604_205444_create_modules_table extends Migration { $tableOptions = null; if ($this->db->driverName === 'mysql') { - $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB'; + $tableOptions = 'CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci ENGINE=InnoDB'; } $this->createTable( '{{%modules}}', diff --git a/console/migrations/m180709_202649_create_menu_table.php b/console/migrations/m180709_202649_create_menu_table.php index ca1dc91..54f8059 100644 --- a/console/migrations/m180709_202649_create_menu_table.php +++ b/console/migrations/m180709_202649_create_menu_table.php @@ -14,7 +14,7 @@ class m180709_202649_create_menu_table extends Migration { $tableOptions = null; if ($this->db->driverName === 'mysql') { - $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB'; + $tableOptions = 'CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci ENGINE=InnoDB'; } $this->createTable('{{%menu}}', [ diff --git a/console/migrations/m180709_202659_create_menu_items_table.php b/console/migrations/m180709_202659_create_menu_items_table.php index 0a9f6d5..ffa129d 100644 --- a/console/migrations/m180709_202659_create_menu_items_table.php +++ b/console/migrations/m180709_202659_create_menu_items_table.php @@ -14,7 +14,7 @@ class m180709_202659_create_menu_items_table extends Migration { $tableOptions = null; if ($this->db->driverName === 'mysql') { - $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB'; + $tableOptions = 'CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci ENGINE=InnoDB'; } $this->createTable('{{%menu_items}}', [ diff --git a/console/migrations/m180824_081717_create_menu_lng_table.php b/console/migrations/m180824_081717_create_menu_lng_table.php index 73b57d4..d765127 100644 --- a/console/migrations/m180824_081717_create_menu_lng_table.php +++ b/console/migrations/m180824_081717_create_menu_lng_table.php @@ -14,7 +14,7 @@ class m180824_081717_create_menu_lng_table extends Migration { $tableOptions = null; if ($this->db->driverName === 'mysql') { - $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB'; + $tableOptions = 'CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci ENGINE=InnoDB'; } $this->createTable('{{%menu_lng}}', [ diff --git a/console/migrations/m180826_204039_create_menu_items_lng_lng_table.php b/console/migrations/m180826_204039_create_menu_items_lng_lng_table.php index 4034070..e71377a 100644 --- a/console/migrations/m180826_204039_create_menu_items_lng_lng_table.php +++ b/console/migrations/m180826_204039_create_menu_items_lng_lng_table.php @@ -14,7 +14,7 @@ class m180826_204039_create_menu_items_lng_lng_table extends Migration { $tableOptions = null; if ($this->db->driverName === 'mysql') { - $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB'; + $tableOptions = 'CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci ENGINE=InnoDB'; } $this->createTable('{{%menu_items_lng}}', [ diff --git a/console/migrations/m180910_182109_create_settings_lng_table.php b/console/migrations/m180910_182109_create_settings_lng_table.php index 73978fc..89eb5b5 100644 --- a/console/migrations/m180910_182109_create_settings_lng_table.php +++ b/console/migrations/m180910_182109_create_settings_lng_table.php @@ -14,7 +14,7 @@ class m180910_182109_create_settings_lng_table extends Migration { $tableOptions = null; if ($this->db->driverName === 'mysql') { - $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; + $tableOptions = 'CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE=InnoDB'; } $this->createTable('{{%settings_lng}}', [ diff --git a/environments/dev/common/config/main-local.php b/environments/dev/common/config/main-local.php index ae52fb9..28c8d0a 100644 --- a/environments/dev/common/config/main-local.php +++ b/environments/dev/common/config/main-local.php @@ -7,7 +7,7 @@ return [ 'dsn' => '', 'username' => '', 'password' => '', - 'charset' => 'utf8', + 'charset' => 'utf8mb4', ], 'mailer' => [ 'class' => 'yii\swiftmailer\Mailer', diff --git a/environments/prod/common/config/main-local.php b/environments/prod/common/config/main-local.php index 70c75c7..1a047c6 100644 --- a/environments/prod/common/config/main-local.php +++ b/environments/prod/common/config/main-local.php @@ -7,7 +7,7 @@ return [ 'dsn' => '', 'username' => '', 'password' => '', - 'charset' => 'utf8', + 'charset' => 'utf8mb4', ], 'mailer' => [ 'class' => 'yii\swiftmailer\Mailer',