Skip to content

Commit 5fc7451

Browse files
committed
Merge pull request #650 from rikettsie/master
#623 collation parameter is ignored if it generates an exception.
2 parents c65adf2 + 2bb5967 commit 5fc7451

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/acts-as-taggable-on.rb

+5-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,11 @@ def self.apply_binary_collation(bincoll)
106106
if bincoll == true
107107
coll = 'utf8_bin'
108108
end
109-
ActiveRecord::Migration.execute("ALTER TABLE tags MODIFY name varchar(255) CHARACTER SET utf8 COLLATE #{coll};")
109+
begin
110+
ActiveRecord::Migration.execute("ALTER TABLE tags MODIFY name varchar(255) CHARACTER SET utf8 COLLATE #{coll};")
111+
rescue Exception => e
112+
puts "Trapping #{e.class}: collation parameter ignored while migrating for the first time."
113+
end
110114
end
111115
end
112116

0 commit comments

Comments
 (0)