simple_hashtag icon indicating copy to clipboard operation
simple_hashtag copied to clipboard

Index name is too long

Open jonhue opened this issue 7 years ago • 2 comments

$ 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)

jonhue avatar Apr 01 '17 17:04 jonhue

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

RailsCod3rFuture avatar Sep 01 '17 04:09 RailsCod3rFuture

@RailsCod3rFuture I created a pull request #23

jonhue avatar Sep 01 '17 06:09 jonhue