Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use the username specified in config/databases.yml to run rake based …

…database calls.
  • Loading branch information...
commit fbc2db02cf60383ffa91edb983eb93b5825b8ba6 1 parent 635731b
@parndt parndt authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 Rakefile
View
4 Rakefile
@@ -68,7 +68,7 @@ namespace :db do
driver = FriendlyId::Test::Database.driver
config = FriendlyId::Test::Database.config[driver]
commands = {
- "mysql" => "mysql -e 'create database #{config["database"]};' >/dev/null",
+ "mysql" => "mysql -u #{config['username']} -e 'create database #{config["database"]};' >/dev/null",
"postgres" => "psql -c 'create database #{config['database']};' -U #{config['username']} >/dev/null"
}
%x{#{commands[driver] || true}}
@@ -80,7 +80,7 @@ namespace :db do
driver = FriendlyId::Test::Database.driver
config = FriendlyId::Test::Database.config[driver]
commands = {
- "mysql" => "mysql -e 'drop database #{config["database"]};' >/dev/null",
+ "mysql" => "mysql -u #{config['username']} -e 'drop database #{config["database"]};' >/dev/null",
"postgres" => "psql -c 'drop database #{config['database']};' -U #{config['username']} >/dev/null"
}
%x{#{commands[driver] || true}}
Please sign in to comment.
Something went wrong with that request. Please try again.