Skip to content

Commit

Permalink
Merge pull request mbleigh#650 from rikettsie/master
Browse files Browse the repository at this point in the history
mbleigh#623 collation parameter is ignored if it generates an exception.
  • Loading branch information
seuros committed Apr 30, 2015
2 parents c65adf2 + 2bb5967 commit 5fc7451
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 5fc7451

Please sign in to comment.