mirror of
https://github.com/discourse/discourse.git
synced 2025-06-12 22:03:50 +08:00
Disable ddl transactions for realz!
This commit is contained in:
@ -1,8 +1,7 @@
|
|||||||
class MigrateWordCounts < ActiveRecord::Migration
|
class MigrateWordCounts < ActiveRecord::Migration
|
||||||
|
disable_ddl_transaction!
|
||||||
|
|
||||||
def up
|
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 }
|
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
|
while post_ids.length > 0
|
||||||
3.times do
|
3.times do
|
||||||
|
Reference in New Issue
Block a user