rubyonrails.orgに関する正式な説明は、レールとデータベースの初心者にとっては、これら4つのタスクのすべてが正確に同じであると認めなければなりません。引用:db:test:clone、db:test:clone_structure、db:test:load、およびdb:test:prepareの違いは何ですか?
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の読み込みの違いは何ですか?
これらのタスクはどれぐらい似ていますか?
ボトムライン:ほとんど同じことです。 :-p – bricker
warning - 私はdb:test:クローンが正しく私の開発データベースからの列のNULL可能性をコピーしていないことがわかりました。これは、Rails 2.3.12を使用して見つけたので、その後修正された古いバグかもしれません。 –