RE: Transactions and migrations (lots of records)?

Here is a thought of how you might be able to do it, but I haven’t
tested it. This is just pseudocode, but someone might be able to
elaborate further.

maxcount = Order.count
(1…maxcount).step(100) { |i|
transaction do
orders = Order.find(:all, :limit => 100, :offset => maxcount)
## Then do processing here



This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs