diff options
author | Andrew White <pixeltrix@users.noreply.github.com> | 2015-11-02 12:08:19 +0000 |
---|---|---|
committer | Andrew White <pixeltrix@users.noreply.github.com> | 2015-11-02 12:08:19 +0000 |
commit | fb6f0d406bb9c4fed7fb63b91fe67ad209487a5f (patch) | |
tree | 9500ccb45c90be7df7627f3cf995d4c68b7b2903 /activerecord/lib/active_record | |
parent | 10a80e39feb8f5da0ff50f1b04c3f84e7bbbbb54 (diff) | |
parent | 322068fe85278ea26e26da6dfd7c5612dab15a72 (diff) | |
download | rails-fb6f0d406bb9c4fed7fb63b91fe67ad209487a5f.tar.gz rails-fb6f0d406bb9c4fed7fb63b91fe67ad209487a5f.tar.bz2 rails-fb6f0d406bb9c4fed7fb63b91fe67ad209487a5f.zip |
Merge pull request #22061 from kamipo/remove_default_charset_and_collation
Remove `DEFAULT_CHARSET` and `DEFAULT_COLLATION`
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/tasks/mysql_database_tasks.rb | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/activerecord/lib/active_record/tasks/mysql_database_tasks.rb b/activerecord/lib/active_record/tasks/mysql_database_tasks.rb index 8929aa85c8..100df9c6c6 100644 --- a/activerecord/lib/active_record/tasks/mysql_database_tasks.rb +++ b/activerecord/lib/active_record/tasks/mysql_database_tasks.rb @@ -1,8 +1,6 @@ module ActiveRecord module Tasks # :nodoc: class MySQLDatabaseTasks # :nodoc: - DEFAULT_CHARSET = ENV['CHARSET'] || 'utf8' - DEFAULT_COLLATION = ENV['COLLATION'] || 'utf8_unicode_ci' ACCESS_DENIED_ERROR = 1045 delegate :connection, :establish_connection, to: ActiveRecord::Base @@ -87,12 +85,6 @@ module ActiveRecord Hash.new.tap do |options| options[:charset] = configuration['encoding'] if configuration.include? 'encoding' options[:collation] = configuration['collation'] if configuration.include? 'collation' - - # Set default charset only when collation isn't set. - options[:charset] ||= DEFAULT_CHARSET unless options[:collation] - - # Set default collation only when charset is also default. - options[:collation] ||= DEFAULT_COLLATION if options[:charset] == DEFAULT_CHARSET end end |