For data-only modifications, you can use a simple transaction do statement like anywhere else:
class TransactionTest < ActiveRecord::Migration
execute “insert into some_table(some_column) values(‘some_value’)”
For a cool slideshow that deals with this a little check out page 18 of:
If you want to make the switch to a database that supports transactions for ddl (like postgres), you can also install this plugin and it should solve most of your problems:
I haven’t tried that latest plugin, but I regularly use transaction do for my more complicated data manipulations scripts.