diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-03-20 21:50:19 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-03-20 21:50:19 +0000 |
commit | 9fe45f31ebeb772fdd1bc850c12cd465463e2ef7 (patch) | |
tree | 379e77eae0286f3be90c1741717ce0904807191d /railties | |
parent | a35cf348bf918c7170ff4890d25d2d48a133edc1 (diff) | |
download | rails-9fe45f31ebeb772fdd1bc850c12cd465463e2ef7.tar.gz rails-9fe45f31ebeb772fdd1bc850c12cd465463e2ef7.tar.bz2 rails-9fe45f31ebeb772fdd1bc850c12cd465463e2ef7.zip |
Fixed the PGPORT option used #875
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@943 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties')
-rwxr-xr-x | railties/fresh_rakefile | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/railties/fresh_rakefile b/railties/fresh_rakefile index da3761d799..3ac1d9b12f 100755 --- a/railties/fresh_rakefile +++ b/railties/fresh_rakefile @@ -121,7 +121,7 @@ task :clone_structure_to_test => [ :db_structure_dump, :purge_test_database ] do end when "postgresql" ENV['PGHOST'] = abcs["test"]["host"] if abcs["test"]["host"] - ENV['PGPORT'] = abcs["test"]["host"] if abcs["test"]["port"] + ENV['PGPORT'] = abcs["test"]["port"].to_s if abcs["test"]["port"] ENV['PGPASSWORD'] = abcs["test"]["password"] `psql -U "#{abcs["test"]["username"]}" -f db/#{RAILS_ENV}_structure.sql #{abcs["test"]["database"]}` when "sqlite", "sqlite3" @@ -140,7 +140,7 @@ task :db_structure_dump => :environment do File.open("db/#{RAILS_ENV}_structure.sql", "w+") { |f| f << ActiveRecord::Base.connection.structure_dump } when "postgresql" ENV['PGHOST'] = abcs[RAILS_ENV]["host"] if abcs[RAILS_ENV]["host"] - ENV['PGPORT'] = abcs[RAILS_ENV]["host"] if abcs[RAILS_ENV]["port"] + ENV['PGPORT'] = abcs[RAILS_ENV]["port"].to_s if abcs[RAILS_ENV]["port"] ENV['PGPASSWORD'] = abcs[RAILS_ENV]["password"] `pg_dump -U "#{abcs[RAILS_ENV]["username"]}" -s -x -f db/#{RAILS_ENV}_structure.sql #{abcs[RAILS_ENV]["database"]}` when "sqlite", "sqlite3" @@ -159,7 +159,7 @@ task :purge_test_database => :environment do ActiveRecord::Base.connection.recreate_database(abcs["test"]["database"]) when "postgresql" ENV['PGHOST'] = abcs["test"]["host"] if abcs["test"]["host"] - ENV['PGPORT'] = abcs["test"]["host"] if abcs["test"]["port"] + ENV['PGPORT'] = abcs["test"]["port"].to_s if abcs["test"]["port"] ENV['PGPASSWORD'] = abcs["test"]["password"] `dropdb -U "#{abcs["test"]["username"]}" #{abcs["test"]["database"]}` `createdb -T template0 -U "#{abcs["test"]["username"]}" #{abcs["test"]["database"]}` |