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

Handle too long index name #56

westonganger opened this issue Apr 21, 2015 · 1 comment


None yet
3 participants
Copy link

commented Apr 21, 2015

MySQL has a limitation on the length of the index name, not sure if it applies to other databases as well

Would be nice if it automatically shortened the name of the index

Its done like this with the extra name attribute

add_index :studies, ["user_id", "university_id", \
          "subject_name_id", "subject_type_id"], 
          :unique => true, :name => 'my_index'

@plentz plentz added the enhancement label Apr 21, 2015


This comment has been minimized.

Copy link

commented Sep 14, 2018

PostgreSQL also has this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.