From be021a809c29b79a501ae7e0146c08a39d963e48 Mon Sep 17 00:00:00 2001 From: Yasuo Honda Date: Wed, 12 Sep 2018 09:49:44 +0000 Subject: Validate if `utf8mb4` character set and longer index key prefix is supported Once #33608 merged If users create a new database using MySQL 5.1.x, it will fail to create databases since MySQL 5.1 does not know `utf8mb4` character set. This pull request removes `encoding: utf8mb4` from `mysql.yml.tt` to let create_database method handles default character set by MySQL server version. `supports_longer_index_key_prefix?` method will need to validate if MySQL 5.5 and 5.6 server configured correctly to support longer index key prefix, but not yet. --- .../rails/generators/rails/app/templates/config/databases/mysql.yml.tt | 1 - 1 file changed, 1 deletion(-) (limited to 'railties/lib/rails') 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 dda979555a..82608e7a0f 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,7 +11,6 @@ # default: &default adapter: mysql2 - encoding: utf8mb4 pool: <%%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> username: root password: -- cgit v1.2.3