diff --git a/railties/CHANGELOG b/railties/CHANGELOG index eed9a4e4b19e855bb66dc315df3c2a0b555dd4ca..ced871f3b1584c096ab464f9bad463370ff79102 100644 --- a/railties/CHANGELOG +++ b/railties/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* If specified, pass PostgreSQL client character encoding to createdb. #2703 [Kazuhiko ] + * Catch CGI multipart parse errors. Wrap dispatcher internals in a failsafe response handler. [Jeremy Kemper] * The freeze_gems Rake task accepts the VERSION environment variable to decide which version of Rails to pull into vendor/rails. [Chad Fowler, Jeremy Kemper] diff --git a/railties/lib/tasks/databases.rake b/railties/lib/tasks/databases.rake index 97c07f97f9d1d03eb265d5361cb7896c4276d642..c9a081502e7ed5a08f77650d950b9d83a79c796b 100644 --- a/railties/lib/tasks/databases.rake +++ b/railties/lib/tasks/databases.rake @@ -101,8 +101,9 @@ task :purge_test_database => :environment do ENV['PGHOST'] = abcs["test"]["host"] if abcs["test"]["host"] ENV['PGPORT'] = abcs["test"]["port"].to_s if abcs["test"]["port"] ENV['PGPASSWORD'] = abcs["test"]["password"].to_s if abcs["test"]["password"] + enc_option = "-E #{abcs["test"]["encoding"]}" if abcs["test"]["encoding"] `dropdb -U "#{abcs["test"]["username"]}" #{abcs["test"]["database"]}` - `createdb -T template0 -U "#{abcs["test"]["username"]}" #{abcs["test"]["database"]}` + `createdb #{enc_option} -T template0 -U "#{abcs["test"]["username"]}" #{abcs["test"]["database"]}` when "sqlite","sqlite3" File.delete(abcs["test"]["dbfile"]) if File.exist?(abcs["test"]["dbfile"]) when "sqlserver"