diff --git a/db/migrate/20210410100006_fix_last_changed_by_on_steps.rb b/db/migrate/20210410100006_fix_last_changed_by_on_steps.rb index 1e5e2302d..2d6adb46c 100644 --- a/db/migrate/20210410100006_fix_last_changed_by_on_steps.rb +++ b/db/migrate/20210410100006_fix_last_changed_by_on_steps.rb @@ -15,7 +15,7 @@ class FixLastChangedByOnSteps < ActiveRecord::Migration[6.1] # because we're not recording the changes to last_modified_by_id def up - Step.where(last_modified_by_id: nil).each do |step| + Step.where(last_modified_by_id: nil).find_each do |step| # Try to find corresponding activity, if step was changed activity should exist # we cannot completely rely on that, so for the fallback we use the step user activity = Activity