diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-09-12 09:34:55 -0700 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-09-12 09:34:55 -0700 |
commit | f568280ba49e95c05bfa5e27fa75f0cf6029cd09 (patch) | |
tree | e07685ac9b802a3c7f1956687e9c05e7f17f4d90 /activerecord/lib/active_record/railties/databases.rake | |
parent | 924ad60151db70a3a63889a156c4d9f9cfeda431 (diff) | |
parent | 96304855e6057944d8f5913e541f39c23e20088e (diff) | |
download | rails-f568280ba49e95c05bfa5e27fa75f0cf6029cd09.tar.gz rails-f568280ba49e95c05bfa5e27fa75f0cf6029cd09.tar.bz2 rails-f568280ba49e95c05bfa5e27fa75f0cf6029cd09.zip |
Merge pull request #7603 from kennyj/fix_charset_vs_encoding_32
Backported #7572 to 3-2-stable. Use config['encoding'], because database configuration use not charset but encoding.
Diffstat (limited to 'activerecord/lib/active_record/railties/databases.rake')
-rw-r--r-- | activerecord/lib/active_record/railties/databases.rake | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/railties/databases.rake b/activerecord/lib/active_record/railties/databases.rake index 83d9126ccb..aabd0d0bdb 100644 --- a/activerecord/lib/active_record/railties/databases.rake +++ b/activerecord/lib/active_record/railties/databases.rake @@ -44,7 +44,7 @@ db_namespace = namespace :db do def mysql_creation_options(config) @charset = ENV['CHARSET'] || 'utf8' @collation = ENV['COLLATION'] || 'utf8_unicode_ci' - {:charset => (config['charset'] || @charset), :collation => (config['collation'] || @collation)} + {:charset => (config['encoding'] || @charset), :collation => (config['collation'] || @collation)} end def create_database(config) @@ -96,8 +96,8 @@ db_namespace = namespace :db do ActiveRecord::Base.establish_connection(config) else $stderr.puts sqlerr.error - $stderr.puts "Couldn't create database for #{config.inspect}, charset: #{config['charset'] || @charset}, collation: #{config['collation'] || @collation}" - $stderr.puts "(if you set the charset manually, make sure you have a matching collation)" if config['charset'] + $stderr.puts "Couldn't create database for #{config.inspect}, charset: #{config['encoding'] || @charset}, collation: #{config['collation'] || @collation}" + $stderr.puts "(if you set the charset manually, make sure you have a matching collation)" if config['encoding'] end end when /postgresql/ |