Skip to content

Commit

Permalink
Merge pull request #760 from priyank-gupta/collation_tag_table_name
Browse files Browse the repository at this point in the history
Specify Tag table name for mysql collation query
  • Loading branch information
seuros committed Jun 7, 2016
2 parents dde41a4 + 02f1f69 commit c6e2c3d
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 c6e2c3d

Please sign in to comment.