I have a table has a string column contains json data each record is like
{"id":1,"type":"car","name":"bmw"}
{"id":2,"type":"car","name":"Fiat"}
{"id":3,"type":"truck","name":"RAM"}
now I need to make a migration to remove name's element from json string by rails ActiveRecord::Migration[5.0] to becomes like this
{"id":1,"type":"car"}
{"id":2,"type":"car"}
{"id":3,"type":"truck"}
find_each
to reduce the memory impact. And make sure you have an extra postgres connection to spare, otherwise you'll have server workers or background threads with no access to the DB when they need it.