On 4 March 2010 18:22, Hassan Schroeder <[email protected]> wrote: > Well, sorry, why are you "rolling back" at all? Why not just run the > new migration? I can't remember every needing to do a rollback for > other than a single most recent migration (due to some obvious > d'oh! screwup like a typo).
So why are you using migrations at all? And why have data in them?! I work in a team with other developers, on code that gets deployed onto test, staging and live servers - migrations get run all the time. Of course, on my "bedroom" projects where I'm the only person doing anything on the code, I almost never re-run migrations. >> I can't believe you're making me go through these hoops to show >> you how bad a practice it is to put data in your migrations > > This seems to be a lesson in "at some point old migrations will fail if > (when) your models change enough" rather than anything to do with > migrations and data. No - old migrations only fail if you access your models from them. You asked for an example... you got one. If you choose to ignore the advice (or you think it doesn't apply to you) that's okay - it's only advice; a convention; a recommendation. Not a command :-) That's the beauty of Rails; convention over configuration. Stick to the conventions and you make everyone's life easier (including your own)... but hey ho, it's your choice. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

