最佳答案
你必须承认,对于一个刚接触 Rails 和数据库的新手来说,rubyonRails.org 上的官方解释让这四个任务听起来完全一样。语录:
rake db:test:clone Recreate the test database from
the current environment’s database schema
rake db:test:clone_structure Recreate the test database from the
development structure
rake db:test:load Recreate the test database from the current schema.rb
rake db:test:prepare Check for pending migrations and load the test schema
我甚至不知道结构和模式之间的区别。加载当前环境的模式和只加载 schema.rb 有什么区别?
这些任务究竟有多相似(或不同) ?