mirror of
https://github.com/discourse/discourse.git
synced 2025-09-07 12:02:53 +08:00
Disable ddl transactions for realz!
This commit is contained in:
parent
c53873110f
commit
003ac02a67
1 changed files with 2 additions and 3 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue