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

Index name is too long #22

Open
jonhue opened this issue Apr 1, 2017 · 2 comments
Open

Index name is too long #22

jonhue opened this issue Apr 1, 2017 · 2 comments

Comments

@jonhue
Copy link

jonhue commented Apr 1, 2017

$ rails db:migrate
== 20170401172016 CreateSimpleHashtagHashtags: migrating ======================
-- create_table(:simple_hashtag_hashtags)
   -> 0.0342s
== 20170401172016 CreateSimpleHashtagHashtags: migrated (0.0347s) =============

== 20170401172017 CreateSimpleHashtagHashtaggings: migrating ==================
-- create_table(:simple_hashtag_hashtaggings)
rails aborted!
StandardError: An error has occurred, all later migrations canceled:

Index name 'index_simple_hashtag_hashtaggings_on_hashtaggable_type_and_hashtaggable_id' on table 'simple_hashtag_hashtaggings' is too long; the limit is 64 characters
app_root/db/migrate/20170401172017_create_simple_hashtag_hashtaggings.rb:4:in `change'
bin/rails:4:in `require'
bin/rails:4:in `<main>'
ArgumentError: Index name 'index_simple_hashtag_hashtaggings_on_hashtaggable_type_and_hashtaggable_id' on table 'simple_hashtag_hashtaggings' is too long; the limit is 64 characters
app_root/db/migrate/20170401172017_create_simple_hashtag_hashtaggings.rb:4:in `change'
bin/rails:4:in `require'
bin/rails:4:in `<main>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
@RailsCod3rFuture
Copy link

I forgot how I fixed this error the first time. There's definitely too much going on with the index.

@jonhue
Copy link
Author

jonhue commented Sep 1, 2017

@RailsCod3rFuture I created a pull request #23

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 a pull request may close this issue.

2 participants