Skip to content
This repository has been archived by the owner on Mar 19, 2021. It is now read-only.

Commit

Permalink
mbleigh#623 collation parameter is ignored if it generates an exception.
Browse files Browse the repository at this point in the history
  • Loading branch information
rikettsie committed Apr 30, 2015
1 parent fa9ef2c commit 25ff442
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/acts-as-taggable-on.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 25ff442

Please sign in to comment.