about summary refs log tree commit diff
path: root/db/migrate/20190521003909_rewrite_scoped_tag_delims.rb
blob: a7b2c02249e3cd372c9082dfd7f8cbade3aa69f8 (plain) (blame)
1
2
3
4
5
6
7
8
9
class RewriteScopedTagDelims < ActiveRecord::Migration[5.2]
  disable_ddl_transaction!
  def up
    Tag.where("tags.name LIKE '%:%'").find_each do |tag|
      tag.name.gsub!(':', '.')
      tag.save
    end
  end
end