ratyrate icon indicating copy to clipboard operation
ratyrate copied to clipboard

ArgumentError: Index name 'index_rates_on_rater_id' on table 'rates' already exists

Open ghost opened this issue 7 years ago • 2 comments

ArgumentError: Index name 'index_rates_on_rater_id' on table 'rates' already exists

When running migrations Rails 5.1

ghost avatar Feb 13 '18 16:02 ghost

Got this too. AFAIK, this is caused by the second migration created by Ratyrate, the one with name "[whatever]_create_rates.rb". Ratyrate attempts to create an index, add_index :rates, :rater_id, but, as I see, it is automatically created by the line t.belongs_to :rater. See here, "Add an appropriate index. Defaults to true". I solved it by simply commenting the index line before migrating. Might need some extra attention. I'm going to try and see which code generates it.

jreyesr avatar Mar 25 '18 02:03 jreyesr

I've got this error. Please fixed it :( thx.

iiewad avatar May 14 '18 07:05 iiewad