提交 91853b8a 编写于 作者: J Jeremy Kemper

SQLite: the clone_structure_to_test Rake task should always use the test...

SQLite: the clone_structure_to_test Rake task should always use the test environment.  References #2846.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2990 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 54dfb291
*SVN*
* SQLite: the clone_structure_to_test Rake task should always use the test environment. #2846 [Rick Olson]
* Make sure that legacy db tasks also reference :database for SQLite #2830 [kazuhiko@fdiary.net]
* Pass __FILE__ when evaluating plugins' init.rb. #2817 [james.adam@gmail.com]
......
......@@ -78,7 +78,7 @@ task :clone_structure_to_test => [ :db_structure_dump, :purge_test_database ] do
ENV['PGPASSWORD'] = abcs["test"]["password"].to_s if abcs["test"]["password"]
`psql -U "#{abcs["test"]["username"]}" -f db/#{RAILS_ENV}_structure.sql #{abcs["test"]["database"]}`
when "sqlite", "sqlite3"
dbfile = abcs[RAILS_ENV]["database"] || abcs[RAILS_ENV]["dbfile"]
dbfile = abcs["test"]["database"] || abcs["test"]["dbfile"]
`#{abcs["test"]["adapter"]} #{dbfile} < db/#{RAILS_ENV}_structure.sql`
when "sqlserver"
`osql -E -S #{abcs["test"]["host"]} -d #{abcs["test"]["database"]} -i db\\#{RAILS_ENV}_structure.sql`
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册