Is it possible to output the SQL change scripts that \'rake db:migrate\' produces?
I put together the capture_migration_sql gem for this purpose. It will dump your migration SQL to files in db/migration_sql.
It's overkill if you just need to find a single SQL statement, but is great to have if your production process requires the raw SQL statements. It can also make reviewing complex database changes in code reviews a bit easier since there's no ruby -> SQL mental math required.