提交 91deff08 编写于 作者: Y yalab 提交者: Santiago Pastorino

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

Signed-off-by: NSantiago Pastorino <santiago@wyeworks.com>
上级 33733d5d
......@@ -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))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册