This commit is contained in:
Toks
2013-10-06 16:56:39 -04:00
parent 5005614e97
commit c5b5ca9825
7 changed files with 76 additions and 10 deletions

View File

@@ -0,0 +1,13 @@
class UpdateAliasedImplicationConsequents < ActiveRecord::Migration
def change
execute "set statement_timeout = 0"
TagImplication.find_each do |ti|
ta = TagAlias.where("antecedent_name = ? AND status != ?", ti.consequent_name, "pending").first
if ta
ti.consequent_name = ta.consequent_name
ti.save
ta.update_posts
end
end
end
end