diff options
-rw-r--r-- | railties/CHANGELOG | 2 | ||||
-rw-r--r-- | railties/lib/tasks/databases.rake | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG index f981a8b5f1..b355e7ad70 100644 --- a/railties/CHANGELOG +++ b/railties/CHANGELOG @@ -1,6 +1,6 @@ *SVN* -* SQLite: the clone_structure_to_test Rake task should always use the test environment. #2846 [Rick Olson] +* SQLite: the clone_structure_to_test and purge_test_database Rake tasks should always use the test environment. #2846 [Rick Olson] * Make sure that legacy db tasks also reference :database for SQLite #2830 [kazuhiko@fdiary.net] diff --git a/railties/lib/tasks/databases.rake b/railties/lib/tasks/databases.rake index 7ec2c81914..752de7733d 100644 --- a/railties/lib/tasks/databases.rake +++ b/railties/lib/tasks/databases.rake @@ -107,7 +107,7 @@ task :purge_test_database => :environment do `dropdb -U "#{abcs["test"]["username"]}" #{abcs["test"]["database"]}` `createdb #{enc_option} -T template0 -U "#{abcs["test"]["username"]}" #{abcs["test"]["database"]}` when "sqlite","sqlite3" - dbfile = abcs[RAILS_ENV]["database"] || abcs[RAILS_ENV]["dbfile"] + dbfile = abcs["test"]["database"] || abcs["test"]["dbfile"] File.delete(dbfile) if File.exist?(dbfile) when "sqlserver" dropfkscript = "#{abcs["test"]["host"]}.#{abcs["test"]["database"]}.DP1".gsub(/\\/,'-') |