You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
trustieforge/db/migrate/20150917071652_update_user_...

17 lines
347 B

class UpdateUserActivitiesUpdateAt < ActiveRecord::Migration
def up
count = UserActivity.all.count / 30 + 2
transaction do
for i in 1 ... count do i
UserActivity.page(i).per(30).each do |activity|
activity.updated_at = activity.created_at
activity.save
end
end
end
end
def down
end
end