I have the following migration:
class CreateFoos < ActiveRecord::Migration
def change
create_table :foos do |t|
t.hstore :foos_properties
end
end
end
In the hstore column, I have 2 keys: :foo
and :bar
. Is it possible to create another migration to remove :foo
? How should it look like?
I've found this:
Foo.update_all([%(foos_properties = delete("foos_properties",?)), 'foo'])
Is that safe? Or should I consider a more sensible approach?