Skip to content

Database Migration Error #169

@jscanning

Description

@jscanning

I am attempting to integrate this ratyrate gem into my rails application. After installing the gem running rails g ratyrate [my user equivalent] when I subsequently attempt to migrate the database, I continually get the following error:

$ rails db:migrate
== 20190508052745 CreateRates: migrating ======================================
-- create_table(:rates)
   -> 0.0033s
-- add_index(:rates, :rater_id)
rails aborted!
StandardError: An error has occurred, this and all later migrations canceled:

Index name 'index_rates_on_rater_id' on table 'rates' already exists
...

The only way I've found to bypass this problem is to comment out or remove the add_index lines from the create_rates and create_rating_caches migrations, but I'm not sure if I would lose the functionality of the gem. Regardless I'm getting this issue from a fresh install.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions