mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
dbconsole should not require a username for postgresql. [#207 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
This commit is contained in:
parent
150717344a
commit
77f873acf2
1 changed files with 2 additions and 1 deletions
|
@ -40,10 +40,11 @@ when "mysql"
|
||||||
exec(find_cmd('mysql5', 'mysql'), *args)
|
exec(find_cmd('mysql5', 'mysql'), *args)
|
||||||
|
|
||||||
when "postgresql"
|
when "postgresql"
|
||||||
|
ENV['PGUSER'] = config["username"] if config["username"]
|
||||||
ENV['PGHOST'] = config["host"] if config["host"]
|
ENV['PGHOST'] = config["host"] if config["host"]
|
||||||
ENV['PGPORT'] = config["port"].to_s if config["port"]
|
ENV['PGPORT'] = config["port"].to_s if config["port"]
|
||||||
ENV['PGPASSWORD'] = config["password"].to_s if config["password"]
|
ENV['PGPASSWORD'] = config["password"].to_s if config["password"]
|
||||||
exec(find_cmd('psql'), '-U', config["username"], config["database"])
|
exec(find_cmd('psql'), config["database"])
|
||||||
|
|
||||||
when "sqlite"
|
when "sqlite"
|
||||||
exec(find_cmd('sqlite'), config["database"])
|
exec(find_cmd('sqlite'), config["database"])
|
||||||
|
|
Loading…
Reference in a new issue