Migrating my Extension

What’s the secret to creating a migration for my extension that changes
the data yet doesn’t trigger the UserActionObserver?

I already figured out that I need to set MyClass.record_timestamps =
false so that I don’t artificially change the updated_at field, but
changing a value and saving that record still causes the updated_by
field to loose the user_id since migrations don’t have any user

What am I missing?


If it’s something that can be updated wholesale (i.e. the same for every
record, or derived on the same attributes), you can use
MyClass.update_all, which will not cause them to be loaded with


It can’t - it’s a calculation based on each record. I just don’t want
to clobber people’s data.

I’m looking into an alternate approach right now so I may get around the
need altogether. Still, it seems like something AR would allow during a