Skip to content

Commit

Permalink
Added host (-h) paramters to createdb and dropdb (DataMapper/PostgreS…
Browse files Browse the repository at this point in the history
…QL).
  • Loading branch information
Aigeruth committed Jul 5, 2011
1 parent 968e44e commit 7e35bde
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions padrino-gen/lib/padrino-gen/padrino-tasks/datamapper.rb
Expand Up @@ -50,7 +50,7 @@
puts "=> Creating database '#{database}'"
case config[:adapter]
when 'postgres'
system("createdb", "-E", charset, "-U", user, database)
system("createdb", "-E", charset, "-h", host, "-U", user, database)
puts "<= dm:create executed"
when 'mysql'
query = [
Expand All @@ -74,7 +74,7 @@
puts "=> Dropping database '#{database}'"
case config[:adapter]
when 'postgres'
system("dropdb", "-U", user, database)
system("dropdb", "-h", host, "-U", user, database)
puts "<= dm:drop executed"
when 'mysql'
query = [
Expand All @@ -96,4 +96,4 @@
desc "Create the database migrate and initialize with the seed data"
task :setup => [:create, :migrate, :seed]
end
end
end

0 comments on commit 7e35bde

Please sign in to comment.