Browse Source

MySqL migrations to utf8mb4

master
Error202 4 years ago
parent
commit
09ef50d3cd
  1. 2
      console/migrations/m130524_201442_init.php
  2. 2
      console/migrations/m180107_203500_create_user_networks_table.php
  3. 2
      console/migrations/m180110_121107_create_post_types_table.php
  4. 2
      console/migrations/m180110_121109_create_post_tags_table.php
  5. 2
      console/migrations/m180110_121335_create_post_categories_table.php
  6. 2
      console/migrations/m180110_121552_create_posts_table.php
  7. 2
      console/migrations/m180110_132623_create_post_tag_assignments_table.php
  8. 2
      console/migrations/m180110_140332_create_post_comments_table.php
  9. 2
      console/migrations/m180124_165317_create_slider_table.php
  10. 2
      console/migrations/m180126_061916_create_session_table.php
  11. 2
      console/migrations/m180604_124108_create_settings_table.php
  12. 2
      console/migrations/m180604_205444_create_modules_table.php
  13. 2
      console/migrations/m180709_202649_create_menu_table.php
  14. 2
      console/migrations/m180709_202659_create_menu_items_table.php
  15. 2
      console/migrations/m180824_081717_create_menu_lng_table.php
  16. 2
      console/migrations/m180826_204039_create_menu_items_lng_lng_table.php
  17. 2
      console/migrations/m180910_182109_create_settings_lng_table.php
  18. 2
      environments/dev/common/config/main-local.php
  19. 2
      environments/prod/common/config/main-local.php

2
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}}', [

2
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(),

2
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(),

2
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(),

2
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(),

2
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(),

2
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(),

2
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(),

2
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(),

2
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}}', [

2
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}}',

2
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}}',

2
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}}', [

2
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}}', [

2
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}}', [

2
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}}', [

2
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}}', [

2
environments/dev/common/config/main-local.php

@ -7,7 +7,7 @@ return [
'dsn' => '',
'username' => '',
'password' => '',
'charset' => 'utf8',
'charset' => 'utf8mb4',
],
'mailer' => [
'class' => 'yii\swiftmailer\Mailer',

2
environments/prod/common/config/main-local.php

@ -7,7 +7,7 @@ return [
'dsn' => '',
'username' => '',
'password' => '',
'charset' => 'utf8',
'charset' => 'utf8mb4',
],
'mailer' => [
'class' => 'yii\swiftmailer\Mailer',

Loading…
Cancel
Save