Disable ddl transactions for realz!

This commit is contained in:
Sam 2013-12-11 11:52:55 +11:00
parent c53873110f
commit 003ac02a67
1 changed files with 2 additions and 3 deletions

View File

@ -1,8 +1,7 @@
class MigrateWordCounts < ActiveRecord::Migration
disable_ddl_transaction!
def up
disable_ddl_transaction
post_ids = execute("SELECT id FROM posts WHERE word_count IS NULL LIMIT 500").map {|r| r['id'].to_i }
while post_ids.length > 0
3.times do