diff options
Diffstat (limited to 'db/migrate/20150425164651_change_collation_for_tag_names.acts_as_taggable_on_engine.rb')
-rw-r--r-- | db/migrate/20150425164651_change_collation_for_tag_names.acts_as_taggable_on_engine.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/db/migrate/20150425164651_change_collation_for_tag_names.acts_as_taggable_on_engine.rb b/db/migrate/20150425164651_change_collation_for_tag_names.acts_as_taggable_on_engine.rb new file mode 100644 index 00000000000..bfb06bc7cda --- /dev/null +++ b/db/migrate/20150425164651_change_collation_for_tag_names.acts_as_taggable_on_engine.rb @@ -0,0 +1,10 @@ +# 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 |