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

Commit

Permalink
specify tag table name for mysql collation query
Browse files Browse the repository at this point in the history
  • Loading branch information
Priyank Gupta committed Jun 7, 2016
1 parent 67764da commit a574444
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/acts-as-taggable-on.rb
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def self.apply_binary_collation(bincoll)
coll = 'utf8_general_ci'
coll = 'utf8_bin' if bincoll
begin
ActiveRecord::Migration.execute("ALTER TABLE tags MODIFY name varchar(255) CHARACTER SET utf8 COLLATE #{coll};")
ActiveRecord::Migration.execute("ALTER TABLE #{Tag.table_name} 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
Expand Down

0 comments on commit a574444

Please sign in to comment.