A generator for migrations for your plugins
Reported by Tekin | June 14th, 2008 @ 03:36 AM
OK, I've had a crack at creating a generator for new migrations in your plugins. As James pointed out, it would be better if the standard rails migration generator was overridden to provide this functionality, but I'm not sure how to do this while not changing its standard behaviour, i.e. the use of attribute pairs to add/remove columns.
Any suggestions for potential usage?
Standard usage:
./script/generate migration AddBodyToPost body:text
Plugin usage:
./script/generate migration ????
Comments and changes to this ticket
-
James Adam June 14th, 2008 @ 04:09 PM
See my comment here (http://github.com/tekin/engines/...), but I'm not sure if we need a generator for this - apologies if my initial comment caused confusion.
-
Tekin June 15th, 2008 @ 01:27 AM
Yeah, it's not ideal having three similarly named generators, it is potentially confusing..
I've also been creating migrations manually in the plugins, but I'm now using Sven's fork which works great with 2.1 and this generator has been helpful as it creates time-stamped migrations.
In actual fact, this generator only becomes useful with Sven's fork, as timestamped migrations may cause issues given your recent commit to fix the bug where migrations weren't running sequentially.
I'd really like to see Sven's fork merged with trunk for proper 2.1 compatibility. Any plans to do so?
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
The rails engines plugin itself
