Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

r3022@asus: jeremy | 2005-11-12 18:40:42 -0800

 merge to stable
 r3024@asus:  jeremy | 2005-11-12 19:00:49 -0800
 Apply [2992] to stable.  SQLite: the clone_structure_to_test and purge_test_database Rake tasks should always use the test environment.  References #2846.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@2993 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit 9403f471b435cb4a4dd6e625358de01f1c2035a7 1 parent 17836f4
@jeremy jeremy authored
Showing with 2 additions and 2 deletions.
  1. +1 −1  railties/CHANGELOG
  2. +1 −1  railties/lib/tasks/databases.rake
View
2  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]
View
2  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(/\\/,'-')
Please sign in to comment.
Something went wrong with that request. Please try again.