Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#623: updated README (added suggestion for manual column alteration). #633

Merged
merged 2 commits into from
Feb 26, 2015

Conversation

rikettsie
Copy link
Contributor

This is to fix special characters used in tag names (MySql only).
A tag 'name' is stored by the gem as 'binary encoded string', but if collation is not specified as 'utf8_bin' for that column, all the comparisons are not made properly and thus the unicity constraint expressed by the index 'index_tags_on_name' generate the error you experienced.

Thus for a quick circumvention, you could alter the 'tags' table in the column 'name':

ALTER TABLE tags MODIFY name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin;

seuros added a commit that referenced this pull request Feb 26, 2015
#623: updated README (added suggestion for manual column alteration).
@seuros seuros merged commit 16908df into mbleigh:master Feb 26, 2015
@seuros
Copy link
Collaborator

seuros commented Feb 26, 2015

This is awesome. 💚

@rikettsie
Copy link
Contributor Author

Yay! :)
I've just pushed a customized migration for MySql and a rake task in my current master. I would also like to add a specific test.

@seuros
Copy link
Collaborator

seuros commented Feb 26, 2015

Go for it 👍

tekniklr pushed a commit to tekniklr/acts-as-taggable-on that referenced this pull request Mar 19, 2021
mbleigh#623: updated README (added suggestion for manual column alteration).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants