foodsoft/db/migrate/20181204010000_change_marked_as_deleted_names.rb

7 lines
292 B
Ruby
Raw Permalink Normal View History

class ChangeMarkedAsDeletedNames < ActiveRecord::Migration[4.2]
def up
execute "UPDATE groups SET name = REPLACE(name, '\\u2020', '\u2020') WHERE deleted_at IS NOT NULL"
execute "UPDATE suppliers SET name = REPLACE(name, '\\u2020', '\u2020') WHERE deleted_at IS NOT NULL"
end
end