07-20-2023, 05:20 AM
You'll have to admit, to a newbie to rails and databases, the official explanation on rubyonrails.org makes all four of these tasks sound exactly the same. Quote:
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
I don't even know the difference between structure and schema. And what's the difference between loading the current environment's schema and just loading schema.rb?
Just how similar (or different) are these tasks?
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
I don't even know the difference between structure and schema. And what's the difference between loading the current environment's schema and just loading schema.rb?
Just how similar (or different) are these tasks?