aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-03-20 14:29:59 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-03-20 14:29:59 +0000
commit58bf8f430ea4837e79700ba6d89e3eccfaa9c865 (patch)
treed0ec514ace8c0039deda7da7a67c083f085870aa
parentdabf90624932ef49214383b0e0bd7d3b80fbc39f (diff)
downloadrails-58bf8f430ea4837e79700ba6d89e3eccfaa9c865.tar.gz
rails-58bf8f430ea4837e79700ba6d89e3eccfaa9c865.tar.bz2
rails-58bf8f430ea4837e79700ba6d89e3eccfaa9c865.zip
Fixed the Rakefile's interaction with postgresql to quote the user name and use template0 when dumping so the functions doesn't get dumped too #855 [pburleson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@929 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r--railties/CHANGELOG5
-rwxr-xr-xrailties/fresh_rakefile8
2 files changed, 9 insertions, 4 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG
index 5dd56364a0..4c197ae8c3 100644
--- a/railties/CHANGELOG
+++ b/railties/CHANGELOG
@@ -1,3 +1,8 @@
+*SVN*
+
+* Fixed the Rakefile's interaction with postgresql to quote the user name and use template0 when dumping so the functions doesn't get dumped too #855 [pburleson]
+
+
*0.10.1* (7th March, 2005)
* Fixed rake stats to ignore editor backup files like model.rb~ #791 [skanthak]
diff --git a/railties/fresh_rakefile b/railties/fresh_rakefile
index 0ae3530af7..e503f236fd 100755
--- a/railties/fresh_rakefile
+++ b/railties/fresh_rakefile
@@ -120,7 +120,7 @@ task :clone_structure_to_test => [ :db_structure_dump, :purge_test_database ] do
ActiveRecord::Base.connection.execute(table)
end
when "postgresql"
- `psql -U #{abcs["test"]["username"]} -h #{abcs["test"]["host"]} -f db/#{RAILS_ENV}_structure.sql #{abcs["test"]["database"]}`
+ `psql -U "#{abcs["test"]["username"]}" -h #{abcs["test"]["host"]} -f db/#{RAILS_ENV}_structure.sql #{abcs["test"]["database"]}`
when "sqlite", "sqlite3"
`#{abcs[RAILS_ENV]["adapter"]} #{abcs["test"]["dbfile"]} < db/#{RAILS_ENV}_structure.sql`
else
@@ -136,7 +136,7 @@ task :db_structure_dump => :environment do
ActiveRecord::Base.establish_connection(abcs[RAILS_ENV])
File.open("db/#{RAILS_ENV}_structure.sql", "w+") { |f| f << ActiveRecord::Base.connection.structure_dump }
when "postgresql"
- `pg_dump -U #{abcs[RAILS_ENV]["username"]} -h #{abcs[RAILS_ENV]["host"]} -s -f db/#{RAILS_ENV}_structure.sql #{abcs[RAILS_ENV]["database"]}`
+ `pg_dump -U "#{abcs[RAILS_ENV]["username"]}" -h #{abcs[RAILS_ENV]["host"]} -s -f db/#{RAILS_ENV}_structure.sql #{abcs[RAILS_ENV]["database"]}`
when "sqlite", "sqlite3"
`#{abcs[RAILS_ENV]["adapter"]} #{abcs[RAILS_ENV]["dbfile"]} .schema > db/#{RAILS_ENV}_structure.sql`
else
@@ -152,8 +152,8 @@ task :purge_test_database => :environment do
ActiveRecord::Base.establish_connection(abcs[RAILS_ENV])
ActiveRecord::Base.connection.recreate_database(abcs["test"]["database"])
when "postgresql"
- `dropdb -U #{abcs["test"]["username"]} -h #{abcs["test"]["host"]} #{abcs["test"]["database"]}`
- `createdb -U #{abcs["test"]["username"]} -h #{abcs["test"]["host"]} #{abcs["test"]["database"]}`
+ `dropdb -U "#{abcs["test"]["username"]}" -h #{abcs["test"]["host"]} #{abcs["test"]["database"]}`
+ `createdb -T template0 -U "#{abcs["test"]["username"]}" -h #{abcs["test"]["host"]} #{abcs["test"]["database"]}`
when "sqlite","sqlite3"
File.delete(abcs["test"]["dbfile"]) if File.exist?(abcs["test"]["dbfile"])
else