diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2005-11-13 02:50:42 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2005-11-13 02:50:42 +0000 |
commit | d685e2cf18e885a74c601f1a05f59af39e00564d (patch) | |
tree | f555f2a6b96cb15370d8ddf9edab14d51386897a | |
parent | 91853b8a0d437c469fa64d6269f7b3ce4c092a7d (diff) | |
download | rails-d685e2cf18e885a74c601f1a05f59af39e00564d.tar.gz rails-d685e2cf18e885a74c601f1a05f59af39e00564d.tar.bz2 rails-d685e2cf18e885a74c601f1a05f59af39e00564d.zip |
SQLite: the clone_structure_to_test and purge_test_database Rake tasks should always use the test environment. Reference #2846.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2992 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-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(/\\/,'-') |