#2016: Update script

This commit is contained in:
Toks
2013-10-26 18:42:36 -04:00
parent d0e9d4519a
commit 7b53999566

View File

@@ -7,8 +7,10 @@ ActiveRecord::Base.connection.execute("set statement_timeout = 0")
CurrentUser.user = User.admins.first CurrentUser.user = User.admins.first
CurrentUser.ip_addr = "127.0.0.1" CurrentUser.ip_addr = "127.0.0.1"
Pool.deleted.where("post_count > 0").find_each do |pool| CurrentUser.without_safe_mode do
Post.where("id in (?)", pool.post_id_array).tag_match("-pool:#{pool.id}").find_each do |post| Pool.deleted.where("post_count > 0").find_each do |pool|
post.add_pool!(pool, true) Post.where("id in (?)", pool.post_id_array).tag_match("-pool:#{pool.id}").find_each do |post|
post.add_pool!(pool, true)
end
end end
end end