diff --git a/lib/acts-as-taggable-on.rb b/lib/acts-as-taggable-on.rb index c5e34d416..c93927d7a 100644 --- a/lib/acts-as-taggable-on.rb +++ b/lib/acts-as-taggable-on.rb @@ -106,7 +106,11 @@ def self.apply_binary_collation(bincoll) if bincoll == true coll = 'utf8_bin' end - ActiveRecord::Migration.execute("ALTER TABLE tags MODIFY name varchar(255) CHARACTER SET utf8 COLLATE #{coll};") + begin + ActiveRecord::Migration.execute("ALTER TABLE tags MODIFY name varchar(255) CHARACTER SET utf8 COLLATE #{coll};") + rescue Exception => e + puts "Trapping #{e.class}: collation parameter ignored while migrating for the first time." + end end end