提交 bf2ee896 编写于 作者: B Brian Lopez 提交者: Jeremy Kemper

add support for mysql2 adapter to dbconsole

[#4532 state:committed]
Signed-off-by: NJeremy Kemper <jeremy@bitsweat.net>
上级 53c1cd6c
...@@ -55,7 +55,7 @@ def find_cmd(*commands) ...@@ -55,7 +55,7 @@ def find_cmd(*commands)
end end
case config["adapter"] case config["adapter"]
when "mysql" when /^mysql/
args = { args = {
'host' => '--host', 'host' => '--host',
'port' => '--port', 'port' => '--port',
...@@ -114,4 +114,4 @@ def find_cmd(*commands) ...@@ -114,4 +114,4 @@ def find_cmd(*commands)
# Has to set the RAILS_ENV before config/application is required # Has to set the RAILS_ENV before config/application is required
if ARGV.first && !ARGV.first.index("-") && env = ARGV.first if ARGV.first && !ARGV.first.index("-") && env = ARGV.first
ENV['RAILS_ENV'] = %w(production development test).find { |e| e.index(env) } || env ENV['RAILS_ENV'] = %w(production development test).find { |e| e.index(env) } || env
end end
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册