ArgumentError: Index name 'index_rates_on_rater_id' on table 'rates' already exists
Opened this issue · 2 comments
Deleted user commented
ArgumentError: Index name 'index_rates_on_rater_id' on table 'rates' already exists
When running migrations Rails 5.1
jreyesr commented
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.
iiewad commented
I've got this error. Please fixed it :(
thx.