summaryrefslogtreecommitdiff
path: root/lib/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tasks')
-rw-r--r--lib/tasks/migrate/migrate_iids.rake15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/tasks/migrate/migrate_iids.rake b/lib/tasks/migrate/migrate_iids.rake
index bc612cd69a7..33271e1a2bb 100644
--- a/lib/tasks/migrate/migrate_iids.rake
+++ b/lib/tasks/migrate/migrate_iids.rake
@@ -30,4 +30,19 @@ task migrate_iids: :environment do
end
puts 'done'
+ puts 'Milestones'.yellow
+ Milestone.where(iid: nil).find_each(batch_size: 100) do |m|
+ begin
+ m.set_iid
+ if m.update_attribute(:iid, m.iid)
+ print '.'
+ else
+ print 'F'
+ end
+ rescue
+ print 'F'
+ end
+ end
+
+ puts 'done'
end