Fix 'rake db:create' is ignore encoding when using postgres [#5717 state:resolved]

Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
This commit is contained in:
yalab 2010-10-01 01:26:22 +09:00 committed by Santiago Pastorino
parent 33733d5d1d
commit 91deff08c9

@ -108,7 +108,7 @@ namespace :db do
end
end
when 'postgresql'
@encoding = config[:encoding] || ENV['CHARSET'] || 'utf8'
@encoding = config['encoding'] || ENV['CHARSET'] || 'utf8'
begin
ActiveRecord::Base.establish_connection(config.merge('database' => 'postgres', 'schema_search_path' => 'public'))
ActiveRecord::Base.connection.create_database(config['database'], config.merge('encoding' => @encoding))