From 98811479f007a0271d0499dbcc886bbd4c1d2908 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Thu, 24 Nov 2005 01:55:39 +0000 Subject: [PATCH] r3307@asus: jeremy | 2005-11-23 17:52:14 -0800 Apply [3110] to stable. PostgreSQL: the purge_test_database Rake task shouldn't explicitly specify the template0 template when creating a fresh test database. References #2964. git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3180 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- railties/CHANGELOG | 2 ++ railties/lib/tasks/databases.rake | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/railties/CHANGELOG b/railties/CHANGELOG index bbde9f64d9..794e307b84 100644 --- a/railties/CHANGELOG +++ b/railties/CHANGELOG @@ -6,6 +6,8 @@ * Make help for the console command more explicit about how to specify the desired environment in which to run the console. #2911. [anonymous] +* PostgreSQL: the purge_test_database Rake task shouldn't explicitly specify the template0 template when creating a fresh test database. #2964 [dreamer3@gmail.com] + * Introducing the session_migration generator. Creates an add_session_table migration. Allows generator to specify migrations directory. #2958, #2960 [Rick Olson] * Update to Prototype 1.4.0_rc4. Closes #2943 (old Array.prototype.reverse behavior can be obtained by passing false as an argument). [Sam Stephenson] diff --git a/railties/lib/tasks/databases.rake b/railties/lib/tasks/databases.rake index 5f393a801a..7f7d9d02a2 100644 --- a/railties/lib/tasks/databases.rake +++ b/railties/lib/tasks/databases.rake @@ -105,7 +105,7 @@ task :purge_test_database => :environment do 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 #{enc_option} -T template0 -U "#{abcs["test"]["username"]}" #{abcs["test"]["database"]}` + `createdb #{enc_option} -U "#{abcs["test"]["username"]}" #{abcs["test"]["database"]}` when "sqlite","sqlite3" dbfile = abcs["test"]["database"] || abcs["test"]["dbfile"] File.delete(dbfile) if File.exist?(dbfile) -- GitLab