Situation: I used to generate a scaffold to set up my objects in a new Rails project. Besides doing some migrations, I also directly edited MySQL tables, adding and renaming columns, etc. Now I can not run the tests because the automatically generated devices do not match the database schema. Perhaps they are based on the original definitions plus migrations, and my migrations do not fully describe the new structure.
I found that I could use "rake db: test: clone_structure" to duplicate tables in a test database (db: test: prepare, obviously creates them from migrations?), But I cannot figure out how to get which are created from development schemes, not from migrations (or something else).
I realized that there is a Fixtures.create_fixtures method, but where would I put it and how would I use it to restore all my devices?
source share