Rails' ActiveRecord has saved_change_to_attribute
method:
https://api.rubyonrails.org/classes/ActiveRecord/AttributeMethods/Dirty.html#method-i-saved_change_to_attribute
It can detect which column has been changed then do something.
Didn't find any method with Go's ORM library gorm
. Is it possible?