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

Do not apply binary collation every time on rails boot for MySQL users #977

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

shawnali63
Copy link

Fixes #905

Background: To fix collation issue with MySQL we added
ActsAsTaggableOn.force_binary_collation = true

Reason: With force_binary_collation = true option we execute following script every time on rails boot which is trying to update database which is not yet available.

ActiveRecord::Migration.execute("ALTER TABLE tags MODIFY name varchar(255) CHARACTER SET utf8 COLLATE utf8_bin;")

This script should be executed only once not every time when rails is booted. User must set collation by re-running migration generator or run this rake task:

rake acts_as_taggable_on_engine:tag_names:collate_bin

@shawnali63 shawnali63 closed this Nov 21, 2019
@shawnali63 shawnali63 reopened this Nov 21, 2019
@matthewhively
Copy link

I wish this would get merged, the ALTER TABLE statements executed every boot is anoying.

@skaidra-bake
Copy link

Hey guys, is there an ETA for when this would get merged in? thanks

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.

ActsAsTaggableOn.force_binary_collation breaks db:create
3 participants