[SCI-5635] Use update_column in the migration in order to avoid callbacks

This commit is contained in:
miha 2021-04-13 10:25:01 +02:00
parent b6a4a5326f
commit 4c29de62be

View file

@ -24,9 +24,9 @@ class FixLastChangedByOnSteps < ActiveRecord::Migration[6.1]
.order(created_at: :desc)
.first
if activity && user_id = activity.values.dig('message_items', 'user', 'id')
step.update!(last_modified_by_id: user_id)
step.update_column(:last_modified_by_id, user_id)
else
step.update!(last_modified_by_id: step.user_id)
step.update_column(:last_modified_by_id, step.user_id)
end
end
end