If the helpers provided by Active Record aren't enough you can use the execute method to execute arbitrary SQL: Product.connection.execute( "UPDATE products SET price = 'free' WHERE 1=1" ) source: http://guides.rubyonrails.org/active_record_migrations.html