

Rails Migration Memory Therapy - eVizitei
http://codeclimber.blogspot.com/2009/05/curse-you-rake-dbmigrate.html

======
trezor
I know this isn't very Ruby or rails specific, but if you are doing big
changes to your db on big datasets and you don't use transactions, you deserve
whatever comes your way.

Realize you've fucked up? A quick _ROLLBACK TRANSACTION_ and you are safely
back where you started. This is so freaking simple, I can't believe people
aren't using it.

~~~
rufo
This. Model.transaction do ... end is not that hard.

Also, in Rails 2.3 you can do .find_each, which will iterate over each record
in 1000-chunk batches.

