In Rails / Activerecord I have changed a field to make it required; I want to run
AppVersion.where('content_rating IS NULL').each {|av| av.update_column('content_rating', 7) }
to ensure that content_rating is not null.
From what I read, Migrations are not a good place to actually change records. Is there a "do this once" way to run code within the Rails structure?