debian-mirror-gitlab/db/migrate/20150425164651_change_collation_for_tag_names.acts_as_taggable_on_engine.rb
2016-06-16 23:09:34 +05:30

12 lines
413 B
Ruby

# rubocop:disable all
# This migration comes from acts_as_taggable_on_engine (originally 5)
# This migration is added to circumvent issue #623 and have special characters
# work properly
class ChangeCollationForTagNames < ActiveRecord::Migration
def up
if ActsAsTaggableOn::Utils.using_mysql?
execute("ALTER TABLE tags MODIFY name varchar(255) CHARACTER SET utf8 COLLATE utf8_bin;")
end
end
end