Rails 2.3.2. Ruby 1.8.7. MySQL 5.x
I have used “rake db:schema:dump” to generate a migration structure to
go from development to production. I want to use “rake
db:schema:load” to load it into my new database. Sounds like a plan.
When I run “rake db:schema:load” on the new database (development or
production), I get the following error:
(production gives the same, but database name is mojo_production).
The Select is not in the schema. If I trace it back, I find the
Select is generated from the following method in my Mojo model:
where for_name is a :named_scope generating the select statement
So my questions are:
- WHY does db:schema:load run queries against my database when the
data (and tables) aren’t there?
- HOW do I fix this so it won’t happen again?