mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
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:
parent
33733d5d1d
commit
91deff08c9
1 changed files with 1 additions and 1 deletions
|
@ -108,7 +108,7 @@ namespace :db do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
when 'postgresql'
|
when 'postgresql'
|
||||||
@encoding = config[:encoding] || ENV['CHARSET'] || 'utf8'
|
@encoding = config['encoding'] || ENV['CHARSET'] || 'utf8'
|
||||||
begin
|
begin
|
||||||
ActiveRecord::Base.establish_connection(config.merge('database' => 'postgres', 'schema_search_path' => 'public'))
|
ActiveRecord::Base.establish_connection(config.merge('database' => 'postgres', 'schema_search_path' => 'public'))
|
||||||
ActiveRecord::Base.connection.create_database(config['database'], config.merge('encoding' => @encoding))
|
ActiveRecord::Base.connection.create_database(config['database'], config.merge('encoding' => @encoding))
|
||||||
|
|
Loading…
Reference in a new issue