mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -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:
parent
91853b8a0d
commit
d685e2cf18
2 changed files with 2 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
||||||
*SVN*
|
*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]
|
* 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"]}`
|
`dropdb -U "#{abcs["test"]["username"]}" #{abcs["test"]["database"]}`
|
||||||
`createdb #{enc_option} -T template0 -U "#{abcs["test"]["username"]}" #{abcs["test"]["database"]}`
|
`createdb #{enc_option} -T template0 -U "#{abcs["test"]["username"]}" #{abcs["test"]["database"]}`
|
||||||
when "sqlite","sqlite3"
|
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)
|
File.delete(dbfile) if File.exist?(dbfile)
|
||||||
when "sqlserver"
|
when "sqlserver"
|
||||||
dropfkscript = "#{abcs["test"]["host"]}.#{abcs["test"]["database"]}.DP1".gsub(/\\/,'-')
|
dropfkscript = "#{abcs["test"]["host"]}.#{abcs["test"]["database"]}.DP1".gsub(/\\/,'-')
|
||||||
|
|
Loading…
Reference in a new issue