mirror of
https://github.com/github/rails.git
synced 2026-02-07 04:35:20 -05:00
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
This commit is contained in:
@@ -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]
|
||||
|
||||
|
||||
@@ -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(/\\/,'-')
|
||||
|
||||
Reference in New Issue
Block a user