数据迁移
This commit is contained in:
parent
f7a88a63e0
commit
90acb7816f
|
@ -4,7 +4,7 @@ class UpdateForgeAndUserActivity < ActiveRecord::Migration
|
|||
transaction do
|
||||
for i in 1 ... user_count do i
|
||||
UserActivity.page(i).per(30).each do |user_act|
|
||||
if user_act.act_type = 'Issue'
|
||||
if user_act.act_type == 'Issue'
|
||||
if user_act.act
|
||||
if user_act.act.journals.count > 0
|
||||
user_act.updated_at = user_act.act.journals.maximum("created_on")
|
||||
|
@ -22,7 +22,7 @@ class UpdateForgeAndUserActivity < ActiveRecord::Migration
|
|||
transaction do
|
||||
for i in 1 ... for_count do i
|
||||
ForgeActivity.page(i).per(30).each do |for_act|
|
||||
if for_act.forge_act_type = 'Issue'
|
||||
if for_act.forge_act_type == 'Issue'
|
||||
if for_act.forge_act
|
||||
if for_act.forge_act.journals.count > 0
|
||||
for_act.updated_at = for_act.forge_act.journals.maximum("created_on")
|
||||
|
|
Loading…
Reference in New Issue