Hello,
I’m trying to learn good habits and use migration along with my very
first steps with RoR and Engines.
I have few questions for the advanced users of Engines :
- Generating the migrate files
- I cd in my engine dir, then /absolutepath_to_ror_app/script/generate
migration AddCommentsTable - script complains about db directory not existing
- mkdir db
- /absolutepath_to_ror_app/script/generate migration AddCommentsTable
again - migrate file is generated in my app root/db directory not inside the
engine !
- No matter, I mv the migrate file inside engine/db
- rake migrate_engine ENGINE=publish
- rake creates schema info and engine schema info but the content of the
migrate file is not executed (or if it is, it doesn’t produce the
expected result)
To get generated schema into MySQL, I need to migrate and rake into the
root app dir, not inside the engine
Obviously, there is something wrong but I don’t understand the reason…