diff options
author | Yasuo Honda <yasuo.honda@gmail.com> | 2018-10-30 12:17:48 +0000 |
---|---|---|
committer | Yasuo Honda <yasuo.honda@gmail.com> | 2018-10-30 12:17:48 +0000 |
commit | 639f8fd9e51e6aa0405ac8cebdced8abe9bedaf3 (patch) | |
tree | dacb3cc1ca99b001b4bb6450b2a0caa1624086eb | |
parent | 5431e17733366da1fd10f2cd3039d66a56012683 (diff) | |
download | rails-639f8fd9e51e6aa0405ac8cebdced8abe9bedaf3.tar.gz rails-639f8fd9e51e6aa0405ac8cebdced8abe9bedaf3.tar.bz2 rails-639f8fd9e51e6aa0405ac8cebdced8abe9bedaf3.zip |
Restore `encoding: utf8mb4` in database.yml
rails/rails#33853 and rails/rails#33929 removed `encoding: utf8mb4` from database.yml
since at that time MySQL 5.1 is supported with the master branch.
Since MySQL 5.1 has been dropped, we can restore `encoding: utf8mb4` in database.yml
-rw-r--r-- | guides/source/configuring.md | 1 | ||||
-rw-r--r-- | railties/lib/rails/generators/rails/app/templates/config/databases/mysql.yml.tt | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/guides/source/configuring.md b/guides/source/configuring.md index 61bb35cf93..d03943ba4a 100644 --- a/guides/source/configuring.md +++ b/guides/source/configuring.md @@ -1011,6 +1011,7 @@ If you choose to use MySQL or MariaDB instead of the shipped SQLite3 database, y ```yaml development: adapter: mysql2 + encoding: utf8mb4 database: blog_development pool: 5 username: root diff --git a/railties/lib/rails/generators/rails/app/templates/config/databases/mysql.yml.tt b/railties/lib/rails/generators/rails/app/templates/config/databases/mysql.yml.tt index 5860563908..b6c2e7448a 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/databases/mysql.yml.tt +++ b/railties/lib/rails/generators/rails/app/templates/config/databases/mysql.yml.tt @@ -11,6 +11,7 @@ # default: &default adapter: mysql2 + encoding: utf8mb4 pool: <%%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> username: root password: |